This commit is contained in:
2023-05-22 18:46:48 +08:00
93 changed files with 3374 additions and 299 deletions
@@ -73,6 +73,9 @@
<f:RenderField ColumnID="Counts" DataField="Counts" FieldType="String" HeaderText="本次数量" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField ColumnID="SamplingCount" DataField="SamplingCount" FieldType="String" HeaderText="本次抽检数量" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
@@ -30,7 +30,7 @@ namespace FineUIPro.Web.Comprehensive
/// </summary>
public void BindGrid()
{
string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId,Status, U.UnitName,InspectionCode,CN.ProfessionalName,InspectionName,Specifications,
string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId,Status, U.UnitName,InspectionCode,CN.ProfessionalName,InspectionName,Specifications,Unit,
Supplier,Counts,SamplingCount,(CASE WHEN SamplingResult=1 THEN '合格' WHEN SamplingResult=0 THEN '不合格' ELSE '' END) AS SamplingResult,
InspectionDate,AttachUrl,Attribute,RemarkCode,UsedPlace,EquipmentNO from Comprehensive_InspectionEquipment C
left join Base_Unit U on C.UnitId=U.UnitId
@@ -127,7 +127,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
conn.Close();
conn.Dispose();
AddDatasetToSQL(ds.Tables[0], 12);
AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@@ -204,30 +204,30 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
}
string row9 = pds.Rows[i][9].ToString().Trim();
if (!string.IsNullOrEmpty(row9))
{
if (row9 != "合格" && row9 != "不合格")
{
result += (i + 2).ToString() + "," + "本次抽检结果" + "," + "[" + row9 + "]错误!" + "|";
}
}
string row10 = pds.Rows[i][10].ToString();
string row10 = pds.Rows[i][10].ToString().Trim();
if (!string.IsNullOrEmpty(row10))
{
try
if (row10 != "合格" && row10 != "不合格")
{
DateTime date = Convert.ToDateTime(row10.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row10 + "]错误!" + "|";
result += (i + 2).ToString() + "," + "本次抽检结果" + "," + "[" + row10 + "]错误!" + "|";
}
}
string row11 = pds.Rows[i][11].ToString();
if (string.IsNullOrEmpty(row11))
if (!string.IsNullOrEmpty(row11))
{
try
{
DateTime date = Convert.ToDateTime(row11.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row11 + "]错误!" + "|";
}
}
string row12 = pds.Rows[i][12].ToString();
if (string.IsNullOrEmpty(row12))
{
result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|";
}
@@ -347,7 +347,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
conn.Close();
conn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 12);
AddDatasetToSQL2(ds.Tables[0], 13);
}
catch (Exception ex)
{
@@ -411,14 +411,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.Specifications = pds.Rows[i][5].ToString().Trim();
Ins.Supplier = pds.Rows[i][6].ToString().Trim();
Ins.Counts = pds.Rows[i][7].ToString().Trim();
Ins.SamplingCount = pds.Rows[i][8].ToString().Trim();
Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2";
Ins.Unit = pds.Rows[i][8].ToString().Trim();
Ins.SamplingCount = pds.Rows[i][9].ToString().Trim();
Ins.SamplingResult = pds.Rows[i][10].ToString().Trim() == "合格" ? "1" : "2";
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim()))
{
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim());
}
Ins.RemarkCode = pds.Rows[i][11].ToString().Trim();
Ins.RemarkCode = pds.Rows[i][12].ToString().Trim();
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date;
@@ -31,16 +31,17 @@
<f:TextBox ID="txtSpecifications" runat="server" Label="规格" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow ColumnWidths="50% 30% 20%">
<Items>
<f:TextBox ID="txtSupplier" runat="server" Label="供货厂商" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:NumberBox ID="txtCounts" Label="本次数量" runat="server" NoDecimal="true" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
<f:NumberBox ID="txtCounts" Label="本次数量" runat="server" NoDecimal="false" DecimalPrecision="3" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
</f:NumberBox>
<f:TextBox ID="txtUnit" runat="server" Label="单位" MaxLength="50" LabelAlign="Right" LabelWidth="70px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtSamplingCount" Label="本次抽检数量" runat="server" NoDecimal="true" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
<f:NumberBox ID="txtSamplingCount" Label="本次抽检数量" runat="server" DecimalPrecision="3" NoDecimal="false" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
</f:NumberBox>
<f:DropDownList ID="drpSamplingResult" runat="server" CssClass="textboxStyle" Height="22px" Label="本次抽检结果" LabelAlign="Right" LabelWidth="120px">
<f:ListItem Text="-请选择-"></f:ListItem>
@@ -65,6 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.txtCounts.Text = Convert.ToString(inspectionEquipment.Counts);
}
this.txtUnit.Text = inspectionEquipment.Unit;
if (inspectionEquipment.SamplingCount != null)
{
this.txtSamplingCount.Text = Convert.ToString(inspectionEquipment.SamplingCount);
@@ -254,6 +255,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
@@ -378,6 +380,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim();
@@ -547,13 +550,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
if (oldInspectionEquipment == null || ((oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_Compile) || (oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)))
{
//if (oldInspectionEquipment == null || ((oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_Compile) || (oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)))
//{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
}
else
{ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
}
//}
//else
//{ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
//}
}
#endregion
@@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class InspectionEquipmentEdit
{
namespace FineUIPro.Web.CQMS.Comprehensive {
public partial class InspectionEquipmentEdit {
/// <summary>
/// form1 控件。
/// </summary>
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtInspectionCode 控件。
/// </summary>
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInspectionCode;
/// <summary>
/// txtEquipmentNo 控件。
/// </summary>
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentNo;
/// <summary>
/// drpCNProfessionalId 控件。
/// </summary>
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCNProfessionalId;
/// <summary>
/// txtInspectionName 控件。
/// </summary>
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInspectionName;
/// <summary>
/// txtSpecifications 控件。
/// </summary>
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecifications;
/// <summary>
/// txtSupplier 控件。
/// </summary>
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplier;
/// <summary>
/// txtCounts 控件。
/// </summary>
@@ -112,7 +110,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtCounts;
/// <summary>
/// txtUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnit;
/// <summary>
/// txtSamplingCount 控件。
/// </summary>
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSamplingCount;
/// <summary>
/// drpSamplingResult 控件。
/// </summary>
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSamplingResult;
/// <summary>
/// drpAttribute 控件。
/// </summary>
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAttribute;
/// <summary>
/// txtInspectionDate 控件。
/// </summary>
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtInspectionDate;
/// <summary>
/// txtRemarkCode 控件。
/// </summary>
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemarkCode;
/// <summary>
/// txtUsedPlace 控件。
/// </summary>
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUsedPlace;
/// <summary>
/// Panel2 控件。
/// </summary>
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// btnAttach 控件。
/// </summary>
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
@@ -229,7 +236,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
@@ -238,7 +245,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -247,7 +254,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
@@ -256,7 +263,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -265,7 +272,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
@@ -274,7 +281,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@@ -454,14 +454,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
}
Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId);
if (inspectionMachine == null || ((inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_Compile) || (inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)))
{
//if (inspectionMachine == null || ((inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_Compile) || (inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)))
//{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
}
else
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
}
//}
//else
//{
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
//}
}
#endregion
@@ -680,14 +680,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
}
Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
if (inspectionPerson == null || ((inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_Compile) || (inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)))
{
//if (inspectionPerson == null || ((inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_Compile) || (inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)))
//{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
}
else
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
}
//}
//else
//{
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
//}
}
#endregion