diff --git a/DataBase/版本日志/HJGLDB_DS_2026-05-25_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-05-25_bwj.sql new file mode 100644 index 0000000..4ee4a14 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-05-25_bwj.sql @@ -0,0 +1,21 @@ +alter table Sys_DataInTemp add Value21 nvarchar(100) +alter table Sys_DataInTemp add Value22 nvarchar(100) +alter table Sys_DataInTemp add Value23 nvarchar(100) +alter table Sys_DataInTemp add Value24 nvarchar(100) +alter table Sys_DataInTemp add Value25 nvarchar(100) +alter table Sys_DataInTemp add Value26 nvarchar(100) +alter table Sys_DataInTemp add Value27 nvarchar(100) +alter table Sys_DataInTemp add Value28 nvarchar(100) +alter table Sys_DataInTemp add Value29 nvarchar(100) +alter table Sys_DataInTemp add Value30 nvarchar(100) +alter table Sys_DataInTemp add Value31 nvarchar(100) +alter table Sys_DataInTemp add Value32 nvarchar(100) +alter table Sys_DataInTemp add Value33 nvarchar(100) +alter table Sys_DataInTemp add Value34 nvarchar(100) +alter table Sys_DataInTemp add Value35 nvarchar(100) +alter table Sys_DataInTemp add Value36 nvarchar(100) +alter table Sys_DataInTemp add Value37 nvarchar(100) +alter table Sys_DataInTemp add Value38 nvarchar(100) +alter table Sys_DataInTemp add Value39 nvarchar(100) +alter table Sys_DataInTemp add Value40 nvarchar(100) +go \ No newline at end of file diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 572f990..ffae26b 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -638,6 +638,11 @@ namespace BLL /// public const string HardReportSetTemplateUrl = "File\\Excel\\HJGL_DataIn\\硬度值导入模板.xls"; + /// + /// RT质量等级评定导入模板 + /// + public const string RTQualityRatingTemplateUrl = "File\\Excel\\HJGL_DataIn\\RT质量等级评定导入模板.xls"; + /// /// 通用附件上传路径 /// diff --git a/HJGL_DS/BLL/Common/Sys_DataInTempService.cs b/HJGL_DS/BLL/Common/Sys_DataInTempService.cs index 6675e29..fbaa32a 100644 --- a/HJGL_DS/BLL/Common/Sys_DataInTempService.cs +++ b/HJGL_DS/BLL/Common/Sys_DataInTempService.cs @@ -55,6 +55,26 @@ namespace BLL newDataInTemp.Value18 = dataInTemp.Value18; newDataInTemp.Value19 = dataInTemp.Value19; newDataInTemp.Value20 = dataInTemp.Value20; + newDataInTemp.Value21 = dataInTemp.Value21; + newDataInTemp.Value22 = dataInTemp.Value22; + newDataInTemp.Value23 = dataInTemp.Value23; + newDataInTemp.Value24 = dataInTemp.Value24; + newDataInTemp.Value25 = dataInTemp.Value25; + newDataInTemp.Value26 = dataInTemp.Value26; + newDataInTemp.Value27 = dataInTemp.Value27; + newDataInTemp.Value28 = dataInTemp.Value28; + newDataInTemp.Value29 = dataInTemp.Value29; + newDataInTemp.Value30 = dataInTemp.Value30; + newDataInTemp.Value31 = dataInTemp.Value31; + newDataInTemp.Value32 = dataInTemp.Value32; + newDataInTemp.Value33 = dataInTemp.Value33; + newDataInTemp.Value34 = dataInTemp.Value34; + newDataInTemp.Value35 = dataInTemp.Value35; + newDataInTemp.Value36 = dataInTemp.Value36; + newDataInTemp.Value37 = dataInTemp.Value37; + newDataInTemp.Value38 = dataInTemp.Value38; + newDataInTemp.Value39 = dataInTemp.Value39; + newDataInTemp.Value40 = dataInTemp.Value40; newDataInTemp.ToopValue = dataInTemp.ToopValue; db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp); @@ -94,6 +114,26 @@ namespace BLL newDataInTemp.Value18 = dataInTemp.Value18; newDataInTemp.Value19 = dataInTemp.Value19; newDataInTemp.Value20 = dataInTemp.Value20; + newDataInTemp.Value21 = dataInTemp.Value21; + newDataInTemp.Value22 = dataInTemp.Value22; + newDataInTemp.Value23 = dataInTemp.Value23; + newDataInTemp.Value24 = dataInTemp.Value24; + newDataInTemp.Value25 = dataInTemp.Value25; + newDataInTemp.Value26 = dataInTemp.Value26; + newDataInTemp.Value27 = dataInTemp.Value27; + newDataInTemp.Value28 = dataInTemp.Value28; + newDataInTemp.Value29 = dataInTemp.Value29; + newDataInTemp.Value30 = dataInTemp.Value30; + newDataInTemp.Value31 = dataInTemp.Value31; + newDataInTemp.Value32 = dataInTemp.Value32; + newDataInTemp.Value33 = dataInTemp.Value33; + newDataInTemp.Value34 = dataInTemp.Value34; + newDataInTemp.Value35 = dataInTemp.Value35; + newDataInTemp.Value36 = dataInTemp.Value36; + newDataInTemp.Value37 = dataInTemp.Value37; + newDataInTemp.Value38 = dataInTemp.Value38; + newDataInTemp.Value39 = dataInTemp.Value39; + newDataInTemp.Value40 = dataInTemp.Value40; newDataInTemp.ToopValue = dataInTemp.ToopValue; db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp); diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index f7aa33a..05e5a2b 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1273,6 +1273,8 @@ + + @@ -1772,6 +1774,7 @@ + @@ -5707,6 +5710,20 @@ QualityRating.aspx + + QualityRatingDataIn.aspx + ASPXCodeBehind + + + QualityRatingDataIn.aspx + + + QualityRatingDataInEdit.aspx + ASPXCodeBehind + + + QualityRatingDataInEdit.aspx + QualityRatingView.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs index 036840d..4a45bbc 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs @@ -925,10 +925,10 @@ namespace FineUIPro.Web.HJGL.CheckManage } oldTrustItem1.FeedbackMan = this.CurrUser.UserName; oldTrustItem1.FeedbackDate = DateTime.Now; - BLL.HJGL_PW_JointInfoService.JointFileNumWriteBack(oldTrustItem1.JOT_ID, filmNum); - BLL.HJGL_PW_JointInfoService.JointRMaterialWriteBack(oldTrustItem1.JOT_ID, rMatNum); - BLL.HJGL_PW_JointInfoService.JointCheckStateWriteBack(oldTrustItem1.JOT_ID, trust1.CH_NDTMethod, oldTrustItem1.States); - BLL.HJGL_CH_TrustItemService.UpdateTrustItem(oldTrustItem1); + BLL.HJGL_PW_JointInfoService.JointFileNumWriteBack(oldTrustItem1.JOT_ID, filmNum);//拍片数据回写 + BLL.HJGL_PW_JointInfoService.JointRMaterialWriteBack(oldTrustItem1.JOT_ID, rMatNum);//回写R母材数量 + BLL.HJGL_PW_JointInfoService.JointCheckStateWriteBack(oldTrustItem1.JOT_ID, trust1.CH_NDTMethod, oldTrustItem1.States);//检测状态回写 + BLL.HJGL_CH_TrustItemService.UpdateTrustItem(oldTrustItem1);//修改检测明细信息 } } // 删除现有数据 diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx new file mode 100644 index 0000000..e7f49c7 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx @@ -0,0 +1,208 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityRatingDataIn.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.QualityRatingDataIn" %> + + + + + + + 导入RT质量等级评定 + + + + + + +
+ + + + + + + + + + + <%----%> + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.cs new file mode 100644 index 0000000..a4aa4ce --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.cs @@ -0,0 +1,788 @@ +using BLL; +using BLL.Common; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Threading; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.CheckManage +{ + public partial class QualityRatingDataIn : PageBase + { + #region 定义项 + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + if (percent == null) + { + percent = new Dictionary(); + } + this.ProjectId = Request.Params["projectId"]; + this.id.Text = this.CurrUser.UserId; + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + else if (GetRequestEventArgument() == "reloadGrid") + { + BindGrid(); + } + } + #endregion + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10" + + @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20,Value21,Value22,Value23" + + @",ToopValue,Type" + + @" FROM Sys_DataInTemp " + + @" WHERE ProjectId=@ProjectId AND UserId=@UserId AND Type=@Type"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId)); + listStr.Add(new SqlParameter("@Type", "RTQualityRating")); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + + var dataInTempAll = from x in Funs.DB.Sys_DataInTemp + where x.ProjectId ==this.ProjectId && x.UserId == this.CurrUser.UserId && x.Type == "RTQualityRating" + select x; + for (int i = 0; i < Grid1.Rows.Count; i++) + { + var dataInTemp = dataInTempAll.FirstOrDefault(x => x.TempId == Grid1.Rows[i].DataKeys[0].ToString()); + if (dataInTemp != null) + { + if (!string.IsNullOrEmpty(dataInTemp.ToopValue)) + { + Grid1.Rows[i].RowCssClass = "red"; + } + } + } + var errData = from x in dataInTempAll where x.ToopValue != null select x; + this.lbDataCout.Text = errData.Count().ToString(); + } + #endregion + + #region 双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityRatingDataInEdit.aspx?TempId={0}&&projectId={1}", Grid1.SelectedRowID,this.ProjectId, "维护 - "))); + } + #endregion + + #region 导入信息 维护 + /// + /// 导入信息编辑 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityRatingDataInEdit.aspx?TempId={0}&&projectId={1}", Grid1.SelectedRowID,this.ProjectId, "维护 - "))); + } + + /// + /// 删除按钮 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + BLL.Sys_DataInTempService.DeleteDataInTempByDataInTempID(rowID); + } + + ShowNotify("删除成功!", MessageBoxIcon.Success); + this.BindGrid(); + } + #endregion + + #region 分页 排序 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 文件上传 + /// + /// 文件上传 + /// + /// + /// + protected void imgbtnImport_Click(object sender, EventArgs e) + { + try + { + if (this.FileExcel.HasFile == false) + { + ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.FileExcel.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls" && IsXls != ".xlsx") + { + ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + Const.ExcelUrl; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + //指定上传文件名称 + this.hdfileName.Text = BLL.Funs.GetNewFileName() + IsXls; + //上传文件路径 + string filePath = initFullPath + this.hdfileName.Text; + //文件上传服务器 + this.FileExcel.PostedFile.SaveAs(filePath); + //文件上传服务器后的名称 + string fileName = rootPath + Const.ExcelUrl + this.hdfileName.Text; + //读取Excel + DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true); + //验证Excel读取是否有误 + if (!string.IsNullOrEmpty(errorInfos)) + { + ShowNotify(errorInfos, MessageBoxIcon.Warning); + return; + } + if (ds.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + Sys_DataInTemp newDataInTemp = new Sys_DataInTemp(); + newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp)); + newDataInTemp.ProjectId = this.ProjectId; + newDataInTemp.UserId = this.CurrUser.UserId; + newDataInTemp.Time = DateTime.Now; + newDataInTemp.Type = "RTQualityRating"; + newDataInTemp.RowNo = i + 1; + newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString(); + newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString(); + newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString(); + newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString(); + newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString(); + newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString(); + newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString(); + newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString(); + newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString(); + newDataInTemp.Value10 = ds.Tables[0].Rows[i][9].ToString(); + newDataInTemp.Value11 = ds.Tables[0].Rows[i][10].ToString(); + newDataInTemp.Value12 = ds.Tables[0].Rows[i][11].ToString(); + newDataInTemp.Value13 = ds.Tables[0].Rows[i][12].ToString(); + newDataInTemp.Value14 = ds.Tables[0].Rows[i][13].ToString(); + newDataInTemp.Value15 = ds.Tables[0].Rows[i][14].ToString(); + newDataInTemp.Value16 = ds.Tables[0].Rows[i][15].ToString(); + newDataInTemp.Value17 = ds.Tables[0].Rows[i][16].ToString(); + newDataInTemp.Value18 = ds.Tables[0].Rows[i][17].ToString(); + newDataInTemp.Value19 = ds.Tables[0].Rows[i][18].ToString(); + newDataInTemp.Value20 = ds.Tables[0].Rows[i][19].ToString(); + newDataInTemp.Value21 = ds.Tables[0].Rows[i][20].ToString(); + newDataInTemp.Value22 = ds.Tables[0].Rows[i][21].ToString(); + + BLL.Sys_DataInTempService.AddDataInTemp(newDataInTemp); + } + this.BindGrid(); + ShowNotify("数据已导入临时表!", MessageBoxIcon.Success); + File.Delete(fileName);//删除上传的临时文件 + } + else + { + Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success); + return; + } + } + catch (Exception ex) + { + Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存审核事件 + /// + /// 保存审核事件 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Thread t = new Thread(new ThreadStart(() => { btnSaveMethod(this.ProjectId, this.CurrUser.UserId, "RTQualityRating"); })); + t.Start(); + if (percent.ContainsKey(this.CurrUser.UserId)) + { + percent[CurrUser.UserId] = 0; + } + else + { + percent.Add(CurrUser.UserId, 0); + + } + PageContext.RegisterStartupScript("printX()"); + } + protected void btnRefresh_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + protected void btnSaveMethod(string LoginProjectId, string UserId, string type) + { + Model.SGGLDB db = Funs.DB; + var units = from x in db.Base_Unit select x;//施工单位 + var batchs = from x in db.HJGL_BO_Batch where x.ProjectId == LoginProjectId select x;//批次 + var isoInfos = from x in db.HJGL_PW_IsoInfo where x.ProjectId == LoginProjectId select x;//管线 + var jointInfos = from x in db.HJGL_PW_JointInfo where x.ProjectId == LoginProjectId select x;//焊口 + var hardTestReportItemSetView = from x in db.HJGL_View_RTQualityRating where x.ProjectId == LoginProjectId && x.CH_NDTMethod == "20d2cbca-8b3d-434b-b1c1-181796986fa5" select x; + + var dataInTemp = from x in Funs.DB.Sys_DataInTemp + where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == type + orderby x.RowNo + select x; + int okCount = 0; + int i = 0; + int ir = dataInTemp.Count(); + string erreMessage = ""; + + // 按 JOT_ID 分组汇总数据,支持任意多个焊口 + Dictionary jointDataDict = new Dictionary(); + + foreach (var tempData in dataInTemp) + { + if (tempData != null) + { + i++; + percent[UserId] = (int)(100 * i / ir); + string errInfo = string.Empty; + string unitId = string.Empty; + string batchId = string.Empty; + string isoId = string.Empty; + string jotId = string.Empty; + int filmNum = 0; + int rMatNum = 0; + bool bRT = true; + bool needRemake = false; + Model.HJGL_CH_TrustItem trustItem = null; + + Model.HJGL_BO_QualityRating newQualityRating = new Model.HJGL_BO_QualityRating(); + var isExitValue = hardTestReportItemSetView.FirstOrDefault(x => x.UnitName == tempData.Value1.Trim() && x.BatchCode == tempData.Value2.Trim() && x.ISO_IsoNo == tempData.Value3.Trim()); + if (isExitValue != null) + { + if (!string.IsNullOrEmpty(tempData.Value1.Trim())) + { + var getUnit = units.FirstOrDefault(x => x.UnitName == tempData.Value1.Trim()); + if (getUnit == null) + { + errInfo += "施工单位[" + tempData.Value1.Trim() + "]不存在;"; + } + else + { + unitId = getUnit.UnitId; + } + } + else + { + errInfo += "施工单位为必填项;"; + } + if (!string.IsNullOrEmpty(tempData.Value2.Trim())) + { + var getBatch = batchs.FirstOrDefault(x => x.BatchCode == tempData.Value2.Trim()); + if (getBatch == null) + { + errInfo += "批次号[" + tempData.Value2.Trim() + "]不存在;"; + } + else + { + batchId = getBatch.BatchId; + } + } + else + { + errInfo += "批次号为必填项;"; + } + if (!string.IsNullOrEmpty(tempData.Value3.Trim())) + { + var getIso = isoInfos.FirstOrDefault(x => x.BSU_ID == unitId && x.ISO_IsoNo == tempData.Value3.Trim()); + if (getIso == null) + { + errInfo += "管线号[" + tempData.Value3.Trim() + "]该单位下不存在;"; + } + else + { + isoId = getIso.ISO_ID; + newQualityRating.ISO_ID = isoId; + } + } + else + { + errInfo += "管线号为必填项;"; + } + if (!string.IsNullOrEmpty(tempData.Value4.Trim())) + { + var getJoint = jointInfos.FirstOrDefault(x => x.ISO_ID == isoId && x.JOT_JointNo == tempData.Value4.Trim()); + if (getJoint == null) + { + errInfo += "焊口号[" + tempData.Value4.Trim() + "]该管线下不存在;"; + } + else + { + jotId = getJoint.JOT_ID; + newQualityRating.JOT_ID = jotId; + } + } + else + { + errInfo += "焊口号为必填项;"; + } + if (!string.IsNullOrEmpty(tempData.Value5.Trim())) + { + var isExfileNum = from x in db.HJGL_BO_QualityRating where x.JOT_ID == jotId && x.FilmNum == tempData.Value5.Trim() select x; + if (isExfileNum.Count() > 0) + { + errInfo += "焊口号[" + tempData.Value4.Trim() + "]拍片记录已存在;"; + } + else + { + newQualityRating.FilmNum = tempData.Value5.Trim(); + } + } + else + { + errInfo += "底片编号为必填项;"; + } + if (!string.IsNullOrEmpty(tempData.Value6.Trim())) + { + newQualityRating.RepairTag = tempData.Value6.Trim();//返修标记 + } + if (!string.IsNullOrEmpty(tempData.Value7.Trim())) + { + if (tempData.Value7.Trim() != "√") + { + errInfo += "R母材格式错误;"; + } + else + { + newQualityRating.RMaterial = true; + rMatNum++; + } + } + if (!string.IsNullOrEmpty(tempData.Value8.Trim())) + { + if (tempData.Value8.Trim() != "√") + { + errInfo += "重拍格式错误;"; + } + else + { + if (string.IsNullOrEmpty(tempData.Value9.Trim())) + { + errInfo += "重拍原因为必填项;"; + } + else + { + newQualityRating.Remake = true; + newQualityRating.RemakeResult = tempData.Value9.Trim(); + needRemake = true; + } + } + } + if (!string.IsNullOrEmpty(tempData.Value10.Trim())) + { + if (tempData.Value10.Trim() != "√") + { + errInfo += "裂纹格式错误;"; + } + else + { + newQualityRating.Cack = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value11.Trim())) + { + if (tempData.Value11.Trim() != "√") + { + errInfo += "未融合格式错误;"; + } + else + { + newQualityRating.NotFusion = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value12.Trim())) + { + if (tempData.Value12.Trim() != "√") + { + errInfo += "未焊透格式错误;"; + } + else + { + newQualityRating.NotPenetration = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value13.Trim())) + { + if (tempData.Value13.Trim() != "√") + { + errInfo += "条状缺陷格式错误;"; + } + else + { + newQualityRating.StripDefects = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value14.Trim())) + { + if (tempData.Value14.Trim() != "√") + { + errInfo += "圆形缺陷格式错误;"; + } + else + { + newQualityRating.CircularDefects = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value15.Trim())) + { + if (tempData.Value15.Trim() != "√") + { + errInfo += "深孔缺陷格式错误;"; + } + else + { + newQualityRating.DeepHoleDefects = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value16.Trim())) + { + if (tempData.Value16.Trim() != "√") + { + errInfo += "根部内凹格式错误;"; + } + else + { + newQualityRating.RootsConcave = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value17.Trim())) + { + if (tempData.Value17.Trim() != "√") + { + errInfo += "根部咬边格式错误;"; + } + else + { + newQualityRating.RootsBiteEdge = true; + } + } + if (!string.IsNullOrEmpty(tempData.Value20.Trim())) + { + if (tempData.Value20.Trim() != "Ⅰ" && tempData.Value20.Trim() != "Ⅱ" && tempData.Value20.Trim() != "Ⅲ" && tempData.Value20.Trim() != "Ⅳ" && tempData.Value20.Trim() != "Ⅴ" && tempData.Value20.Trim() != "VI") + { + errInfo += "评定结果格式错误;"; + } + else + { + newQualityRating.DefectResult = tempData.Value20.Trim(); + } + } + if (!string.IsNullOrEmpty(tempData.Value21.Trim())) + { + if (tempData.Value21.Trim() != "合格" && tempData.Value21.Trim() != "不合格") + { + errInfo += "是否合格格式错误;"; + } + else + { + newQualityRating.IsPass = tempData.Value21.Trim(); + if (tempData.Value21.Trim() == "不合格") + { + if (string.IsNullOrEmpty(tempData.Value20.Trim())) + { + errInfo += "不合格记录评定结果不能为空;"; + } + else + { + bRT = false; + } + } + filmNum++; + } + } + else + { + errInfo += "是否合格为必填项;"; + } + trustItem = (from x in db.HJGL_CH_TrustItem + join y in db.HJGL_CH_Trust on x.CH_TrustID equals y.CH_TrustID + where y.BatchId == batchId && x.JOT_ID == jotId && x.States == "1" + && y.CH_NDTMethod == "20d2cbca-8b3d-434b-b1c1-181796986fa5" + select x).FirstOrDefault(); + if (trustItem != null) + { + newQualityRating.CH_TrustItemID = trustItem.CH_TrustItemID; + } + else + { + var qu = from x in db.HJGL_BO_QualityRating where x.JOT_ID == jotId && x.FilmNum != tempData.Value5.Trim() select x; + if (qu != null) + { + newQualityRating.CH_TrustItemID = qu.FirstOrDefault().CH_TrustItemID; + } + else + { + errInfo += "委托记录不存在或拍片记录已存在,请核对;"; + } + } + } + else + { + errInfo += "该记录未下委托,请核对;"; + } + if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据 + { + + newQualityRating.SignMan = this.CurrUser.UserId; + newQualityRating.SignDate = DateTime.Now; + newQualityRating.QualityRatingId = SQLHelper.GetNewID(typeof(Model.HJGL_BO_QualityRating)); + BLL.HJGL_BO_QualityRatingService.AddQualityRating(newQualityRating); + + if (!jointDataDict.ContainsKey(jotId)) + { + jointDataDict[jotId] = new JointWriteBackData + { + //TotalFilmNum = 0, + //TotalRMatNum = 0, + TrustItem = BLL.HJGL_CH_TrustItemService.GetTrustItemByID(newQualityRating.CH_TrustItemID) + }; + } + + //jointDataDict[jotId].TotalFilmNum += filmNum; + //jointDataDict[jotId].TotalRMatNum += rMatNum; + //// 状态计算 + //string finalState = bRT ? (needRemake ? "3" : "2") : "4"; + //jointDataDict[jotId].FinalState = finalState; + + + BLL.Sys_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId); + okCount++; + } + if (!string.IsNullOrEmpty(errInfo)) + { + tempData.ToopValue = errInfo; + BLL.Sys_DataInTempService.UpdateDataInTemp(tempData); + erreMessage += errInfo + ";"; + } + } + } + + // ===================== 循环结束:统一回写(所有焊口各执行一次) ===================== + foreach (var kv in jointDataDict) + { + string jotId = kv.Key; + var data = kv.Value; + var trustItem = data.TrustItem; + + if (trustItem == null) continue; + + // 更新委托状态 + //trustItem.States = data.FinalState; + trustItem.FeedbackMan = this.CurrUser.UserName; + trustItem.FeedbackDate = DateTime.Now; + + // 每个 JOT_ID 只调用一次! + int totalRMatNum = 0; + int isPassNum = 0; + int remakeNum = 0; + var qualityRating = (from x in db.HJGL_BO_QualityRating where x.JOT_ID == jotId select x); + foreach (var item in qualityRating) + { + if (item.RMaterial != null) + { + totalRMatNum++; + } + if (item.IsPass == "合格") + { + if (item.Remake == true) + { + remakeNum++;//待重检 + } + else + { + isPassNum++;//检测合格 + } + } + } + if (isPassNum == qualityRating.Count()) + { + if (remakeNum > 0) + { + trustItem.States = "3"; + } + else + { + trustItem.States = "2"; + } + } + else + { + trustItem.States = "4"; + } + BLL.HJGL_PW_JointInfoService.JointFileNumWriteBack(jotId, qualityRating.Count()); + BLL.HJGL_PW_JointInfoService.JointRMaterialWriteBack(jotId, totalRMatNum); + BLL.HJGL_PW_JointInfoService.JointCheckStateWriteBack(jotId, "20d2cbca-8b3d-434b-b1c1-181796986fa5", trustItem.States); + BLL.HJGL_CH_TrustItemService.UpdateTrustItem(trustItem); + } + } + #endregion + + #region 删除所有数据事件 + /// + /// 删除所有数据事件 + /// + /// + /// + protected void btnAllDelete_Click(object sender, EventArgs e) + { + //先删除临时表中 该人员以前导入的数据 + BLL.Sys_DataInTempService.DeleteDataInTempByProjectIdUserId(this.ProjectId, this.CurrUser.UserId, "RTQualityRating"); + this.BindGrid(); + ShowNotify("删除成功!", MessageBoxIcon.Success); + this.lbDataCout.Text = string.Empty; + } + #endregion + + #region 下载模版 + /// + /// 下载模版 + /// + /// + /// + protected void imgbtnUpload_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.RTQualityRatingTemplateUrl; + string filePath = Const.RTQualityRatingTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + #endregion + + public static Dictionary percent { get; set; } + public static Dictionary url { get; set; } + + [System.Web.Services.WebMethod] + public static int getPercent(string id) + { + return percent[id]; + } + + // 汇总数据实体 + public class JointWriteBackData + { + public int TotalFilmNum { get; set; } + public int TotalRMatNum { get; set; } + public string FinalState { get; set; } + public Model.HJGL_CH_TrustItem TrustItem { get; set; } + } + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.designer.cs new file mode 100644 index 0000000..1454ab4 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataIn.aspx.designer.cs @@ -0,0 +1,242 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.CheckManage +{ + + + public partial class QualityRatingDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// id 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField id; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdfileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdfileName; + + /// + /// FileExcel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload FileExcel; + + /// + /// imgbtnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgbtnImport; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnRefresh 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnRefresh; + + /// + /// btnAllDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAllDelete; + + /// + /// imgbtnUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgbtnUpload; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// lbDataCout 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbDataCout; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// ContentPanel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel3; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + + /// + /// ScriptManager2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.ScriptManager ScriptManager2; + } +} diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx new file mode 100644 index 0000000..b19633c --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx @@ -0,0 +1,113 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityRatingDataInEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.QualityRatingDataInEdit" %> + + + + + + + 编辑RT质量等级评定导入 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.cs new file mode 100644 index 0000000..19e1573 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.cs @@ -0,0 +1,418 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.CheckManage +{ + public partial class QualityRatingDataInEdit : PageBase + { + #region 定义项 + /// + /// 临时表主键 + /// + public string TempId + { + get + { + return (string)ViewState["TempId"]; + } + set + { + ViewState["TempId"] = value; + } + } + + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.TempId = Request.Params["TempId"]; + //this.ProjectId = Request.Params["projectId"]; + this.txtValue1.Focus(); + var dataInTemp = BLL.Sys_DataInTempService.GetDataInTempByTempId(this.TempId); + if (dataInTemp != null) + { + this.ProjectId = dataInTemp.ProjectId; + this.txtValue1.Text = dataInTemp.Value1; + this.txtValue2.Text = dataInTemp.Value2; + this.txtValue3.Text = dataInTemp.Value3; + this.txtValue4.Text = dataInTemp.Value4; + this.txtValue5.Text = dataInTemp.Value5; + this.txtValue6.Text = dataInTemp.Value6; + this.txtValue7.Text = dataInTemp.Value7; + this.txtValue8.Text = dataInTemp.Value8; + this.txtValue9.Text = dataInTemp.Value9; + this.txtValue10.Text = dataInTemp.Value10; + this.txtValue11.Text = dataInTemp.Value11; + this.txtValue12.Text = dataInTemp.Value12; + this.txtValue13.Text = dataInTemp.Value13; + this.txtValue14.Text = dataInTemp.Value14; + this.txtValue15.Text = dataInTemp.Value15; + this.txtValue16.Text = dataInTemp.Value16; + this.txtValue17.Text = dataInTemp.Value17; + this.txtValue18.Text = dataInTemp.Value18; + this.txtValue19.Text = dataInTemp.Value19; + this.txtValue20.Text = dataInTemp.Value20; + this.txtValue21.Text = dataInTemp.Value21; + this.txtValue22.Text = dataInTemp.Value22; + + this.lbErrCout.Text = dataInTemp.ToopValue; + } + } + } + #endregion + + #region 保存按钮 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + var dataInTemp = BLL.Sys_DataInTempService.GetDataInTempByTempId(this.TempId); + if (this.ckAll.Checked) + { + var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.ProjectId && x.UserId == this.CurrUser.UserId && x.Type == "RTQualityRating" select x; + if (dataInTemp.Value1 != this.txtValue1.Text.Trim()) + { + var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null)); + if (tempValue1 != null) + { + foreach (var item in tempValue1) + { + item.Value1 = this.txtValue1.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value2 != this.txtValue2.Text.Trim()) + { + var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null)); + if (tempValue2 != null) + { + foreach (var item in tempValue2) + { + item.Value2 = this.txtValue2.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value3 != this.txtValue3.Text.Trim()) + { + var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null)); + if (tempValue3 != null) + { + foreach (var item in tempValue3) + { + item.Value3 = this.txtValue3.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value4 != this.txtValue4.Text.Trim()) + { + var tempValue4 = allDataInTemp.Where(x => x.Value4 == dataInTemp.Value4 || (x.Value4 == null && dataInTemp.Value4 == null)); + if (tempValue4 != null) + { + foreach (var item in tempValue4) + { + item.Value4 = this.txtValue4.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value5 != this.txtValue5.Text.Trim()) + { + var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null)); + if (tempValue5 != null) + { + foreach (var item in tempValue5) + { + item.Value5 = this.txtValue5.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value6 != this.txtValue6.Text.Trim()) + { + var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null)); + if (tempValue6 != null) + { + foreach (var item in tempValue6) + { + item.Value6 = this.txtValue6.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value7 != this.txtValue7.Text.Trim()) + { + var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null)); + if (tempValue7 != null) + { + foreach (var item in tempValue7) + { + item.Value7 = this.txtValue7.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value8 != this.txtValue8.Text.Trim()) + { + var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null)); + if (tempValue8 != null) + { + foreach (var item in tempValue8) + { + item.Value8 = this.txtValue8.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value9 != this.txtValue9.Text.Trim()) + { + var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null)); + if (tempValue9 != null) + { + foreach (var item in tempValue9) + { + item.Value9 = this.txtValue9.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value10 != this.txtValue10.Text.Trim()) + { + var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null)); + if (tempValue10 != null) + { + foreach (var item in tempValue10) + { + item.Value10 = this.txtValue10.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value11 != this.txtValue11.Text.Trim()) + { + var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null)); + if (tempValue11 != null) + { + foreach (var item in tempValue11) + { + item.Value11 = this.txtValue11.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value12 != this.txtValue12.Text.Trim()) + { + var tempValue12 = allDataInTemp.Where(x => x.Value12 == dataInTemp.Value12 || (x.Value12 == null && dataInTemp.Value12 == null)); + if (tempValue12 != null) + { + foreach (var item in tempValue12) + { + item.Value12 = this.txtValue12.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value13 != this.txtValue13.Text.Trim()) + { + var tempValue13 = allDataInTemp.Where(x => x.Value13 == dataInTemp.Value13 || (x.Value13 == null && dataInTemp.Value13 == null)); + if (tempValue13 != null) + { + foreach (var item in tempValue13) + { + item.Value13 = this.txtValue13.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value14 != this.txtValue14.Text.Trim()) + { + var tempValue14 = allDataInTemp.Where(x => x.Value14 == dataInTemp.Value14 || (x.Value14 == null && dataInTemp.Value14 == null)); + if (tempValue14 != null) + { + foreach (var item in tempValue14) + { + item.Value14 = this.txtValue14.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value15 != this.txtValue15.Text.Trim()) + { + var tempValue15 = allDataInTemp.Where(x => x.Value15 == dataInTemp.Value15 || (x.Value15 == null && dataInTemp.Value15 == null)); + if (tempValue15 != null) + { + foreach (var item in tempValue15) + { + item.Value15 = this.txtValue15.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value16 != this.txtValue16.Text.Trim()) + { + var tempValue16 = allDataInTemp.Where(x => x.Value16 == dataInTemp.Value16 || (x.Value16 == null && dataInTemp.Value16 == null)); + if (tempValue16 != null) + { + foreach (var item in tempValue16) + { + item.Value16 = this.txtValue16.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value17 != this.txtValue17.Text.Trim()) + { + var tempValue17 = allDataInTemp.Where(x => x.Value17 == dataInTemp.Value17 || (x.Value17 == null && dataInTemp.Value17 == null)); + if (tempValue17 != null) + { + foreach (var item in tempValue17) + { + item.Value17 = this.txtValue17.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value18 != this.txtValue18.Text.Trim()) + { + var tempValue18 = allDataInTemp.Where(x => x.Value18 == dataInTemp.Value18 || (x.Value18 == null && dataInTemp.Value18 == null)); + if (tempValue18 != null) + { + foreach (var item in tempValue18) + { + item.Value18 = this.txtValue18.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value19 != this.txtValue19.Text.Trim()) + { + var tempValue19 = allDataInTemp.Where(x => x.Value19 == dataInTemp.Value19 || (x.Value19 == null && dataInTemp.Value19 == null)); + if (tempValue19 != null) + { + foreach (var item in tempValue19) + { + item.Value19 = this.txtValue19.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value20 != this.txtValue20.Text.Trim()) + { + var tempValue20 = allDataInTemp.Where(x => x.Value20 == dataInTemp.Value20 || (x.Value20 == null && dataInTemp.Value20 == null)); + if (tempValue20 != null) + { + foreach (var item in tempValue20) + { + item.Value20 = this.txtValue20.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value21 != this.txtValue21.Text.Trim()) + { + var tempValue21 = allDataInTemp.Where(x => x.Value21 == dataInTemp.Value21 || (x.Value21 == null && dataInTemp.Value21 == null)); + if (tempValue21 != null) + { + foreach (var item in tempValue21) + { + item.Value21 = this.txtValue21.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + if (dataInTemp.Value22 != this.txtValue22.Text.Trim()) + { + var tempValue22 = allDataInTemp.Where(x => x.Value22 == dataInTemp.Value22 || (x.Value22 == null && dataInTemp.Value22 == null)); + if (tempValue22 != null) + { + foreach (var item in tempValue22) + { + item.Value22 = this.txtValue22.Text.Trim(); + Funs.DB.SubmitChanges(); + } + } + } + var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue); + if (toopValue != null) + { + foreach (var item in toopValue) + { + item.ToopValue = null; + Funs.DB.SubmitChanges(); + } + } + } + else + { + Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp(); + newDataInTemp.ProjectId = ProjectId; + newDataInTemp.UserId = this.CurrUser.UserId; + newDataInTemp.Time = DateTime.Now; + newDataInTemp.Type = "RTQualityRating"; + newDataInTemp.Value1 = this.txtValue1.Text.Trim(); + newDataInTemp.Value2 = this.txtValue2.Text.Trim(); + newDataInTemp.Value3 = this.txtValue3.Text.Trim(); + newDataInTemp.Value4 = this.txtValue4.Text.Trim(); + newDataInTemp.Value5 = this.txtValue5.Text.Trim(); + newDataInTemp.Value6 = this.txtValue6.Text.Trim(); + newDataInTemp.Value7 = this.txtValue7.Text.Trim(); + newDataInTemp.Value8 = this.txtValue8.Text.Trim(); + newDataInTemp.Value9 = this.txtValue9.Text.Trim(); + newDataInTemp.Value10 = this.txtValue10.Text.Trim(); + newDataInTemp.Value11 = this.txtValue11.Text.Trim(); + newDataInTemp.Value12 = this.txtValue12.Text.Trim(); + newDataInTemp.Value13 = this.txtValue13.Text.Trim(); + newDataInTemp.Value14 = this.txtValue14.Text.Trim(); + newDataInTemp.Value15 = this.txtValue15.Text.Trim(); + newDataInTemp.Value16 = this.txtValue16.Text.Trim(); + newDataInTemp.Value17 = this.txtValue17.Text.Trim(); + newDataInTemp.Value18 = this.txtValue18.Text.Trim(); + newDataInTemp.Value19 = this.txtValue19.Text.Trim(); + newDataInTemp.Value20 = this.txtValue20.Text.Trim(); + newDataInTemp.Value21 = this.txtValue21.Text.Trim(); + newDataInTemp.Value22 = this.txtValue22.Text.Trim(); + if (!string.IsNullOrEmpty(this.TempId)) + { + newDataInTemp.TempId = this.TempId; + newDataInTemp.ToopValue = null; + BLL.Sys_DataInTempService.UpdateDataInTemp(newDataInTemp); + } + } + ShowNotify("信息修改完成!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.designer.cs new file mode 100644 index 0000000..2901d82 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRatingDataInEdit.aspx.designer.cs @@ -0,0 +1,287 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.CheckManage +{ + + + public partial class QualityRatingDataInEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// txtValue1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue1; + + /// + /// txtValue2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue2; + + /// + /// txtValue3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue3; + + /// + /// txtValue4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue4; + + /// + /// txtValue5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue5; + + /// + /// txtValue6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue6; + + /// + /// txtValue7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue7; + + /// + /// txtValue8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue8; + + /// + /// txtValue9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue9; + + /// + /// txtValue10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue10; + + /// + /// txtValue11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue11; + + /// + /// txtValue12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue12; + + /// + /// txtValue13 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue13; + + /// + /// txtValue14 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue14; + + /// + /// txtValue15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue15; + + /// + /// txtValue16 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue16; + + /// + /// txtValue17 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue17; + + /// + /// txtValue18 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue18; + + /// + /// txtValue19 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue19; + + /// + /// txtValue20 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue20; + + /// + /// txtValue21 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue21; + + /// + /// txtValue22 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue22; + + /// + /// ckAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckAll; + + /// + /// lbErrCout 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea lbErrCout; + } +} diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx index 9aa4478..508c865 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx @@ -49,6 +49,9 @@ + + @@ -145,6 +148,10 @@ + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.cs index a84669d..cea1fc1 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.cs @@ -27,6 +27,11 @@ namespace FineUIPro.Web.HJGL.CheckManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + } //this.drpNdtType.DataTextField = "NDT_Code"; //this.drpNdtType.DataValueField = "NDT_ID"; @@ -114,7 +119,7 @@ namespace FineUIPro.Web.HJGL.CheckManage FROM dbo.HJGL_View_RTQualityRating WHERE CH_NDTMethod='20d2cbca-8b3d-434b-b1c1-181796986fa5' AND IsShow=1"; } - + List listStr = new List(); if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { @@ -152,7 +157,7 @@ namespace FineUIPro.Web.HJGL.CheckManage //{ // strSql += @" AND IsShow=1"; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); //DataTable tb = SQLHelper.GetSqlDataReaderToDataTable(strSql, parameter); @@ -298,5 +303,17 @@ namespace FineUIPro.Web.HJGL.CheckManage btnEdit_Click(null, null); } #endregion + + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + string window = String.Format("QualityRatingDataIn.aspx?projectId={0}", this.drpProjectId.SelectedValue, "导入 - "); + PageContext.RegisterStartupScript(Window2.GetSaveStateReference() + + Window2.GetShowReference(window)); + } } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.designer.cs index 10198f1..8cd5dc2 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTQualityRating.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.CheckManage { - - - public partial class RTQualityRating { - +namespace FineUIPro.Web.HJGL.CheckManage +{ + + + public partial class RTQualityRating + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// form1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// drpProjectId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectId; - + /// /// tvControlItem 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar2 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// hdItemsString 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdItemsString; - + /// /// txtBatchCode 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtBatchCode; - + /// /// txtIsoNo 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtIsoNo; - + /// /// ckbShowAll 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbShowAll; - + /// /// btnSearch 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// ToolbarFill1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnEdit 控件。 /// @@ -164,7 +166,16 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + /// /// Grid1 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -209,5 +220,14 @@ namespace FineUIPro.Web.HJGL.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; } } diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 1b40665..070a5f8 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index e6a5fca..b57c71c 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -120169,6 +120169,46 @@ namespace Model private string _Value20; + private string _Value21; + + private string _Value22; + + private string _Value23; + + private string _Value24; + + private string _Value25; + + private string _Value26; + + private string _Value27; + + private string _Value28; + + private string _Value29; + + private string _Value30; + + private string _Value31; + + private string _Value32; + + private string _Value33; + + private string _Value34; + + private string _Value35; + + private string _Value36; + + private string _Value37; + + private string _Value38; + + private string _Value39; + + private string _Value40; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -120231,6 +120271,46 @@ namespace Model partial void OnValue19Changed(); partial void OnValue20Changing(string value); partial void OnValue20Changed(); + partial void OnValue21Changing(string value); + partial void OnValue21Changed(); + partial void OnValue22Changing(string value); + partial void OnValue22Changed(); + partial void OnValue23Changing(string value); + partial void OnValue23Changed(); + partial void OnValue24Changing(string value); + partial void OnValue24Changed(); + partial void OnValue25Changing(string value); + partial void OnValue25Changed(); + partial void OnValue26Changing(string value); + partial void OnValue26Changed(); + partial void OnValue27Changing(string value); + partial void OnValue27Changed(); + partial void OnValue28Changing(string value); + partial void OnValue28Changed(); + partial void OnValue29Changing(string value); + partial void OnValue29Changed(); + partial void OnValue30Changing(string value); + partial void OnValue30Changed(); + partial void OnValue31Changing(string value); + partial void OnValue31Changed(); + partial void OnValue32Changing(string value); + partial void OnValue32Changed(); + partial void OnValue33Changing(string value); + partial void OnValue33Changed(); + partial void OnValue34Changing(string value); + partial void OnValue34Changed(); + partial void OnValue35Changing(string value); + partial void OnValue35Changed(); + partial void OnValue36Changing(string value); + partial void OnValue36Changed(); + partial void OnValue37Changing(string value); + partial void OnValue37Changed(); + partial void OnValue38Changing(string value); + partial void OnValue38Changed(); + partial void OnValue39Changing(string value); + partial void OnValue39Changed(); + partial void OnValue40Changing(string value); + partial void OnValue40Changed(); #endregion public Sys_DataInTemp() @@ -120788,6 +120868,406 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value21", DbType="NVarChar(100)")] + public string Value21 + { + get + { + return this._Value21; + } + set + { + if ((this._Value21 != value)) + { + this.OnValue21Changing(value); + this.SendPropertyChanging(); + this._Value21 = value; + this.SendPropertyChanged("Value21"); + this.OnValue21Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value22", DbType="NVarChar(100)")] + public string Value22 + { + get + { + return this._Value22; + } + set + { + if ((this._Value22 != value)) + { + this.OnValue22Changing(value); + this.SendPropertyChanging(); + this._Value22 = value; + this.SendPropertyChanged("Value22"); + this.OnValue22Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value23", DbType="NVarChar(100)")] + public string Value23 + { + get + { + return this._Value23; + } + set + { + if ((this._Value23 != value)) + { + this.OnValue23Changing(value); + this.SendPropertyChanging(); + this._Value23 = value; + this.SendPropertyChanged("Value23"); + this.OnValue23Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value24", DbType="NVarChar(100)")] + public string Value24 + { + get + { + return this._Value24; + } + set + { + if ((this._Value24 != value)) + { + this.OnValue24Changing(value); + this.SendPropertyChanging(); + this._Value24 = value; + this.SendPropertyChanged("Value24"); + this.OnValue24Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value25", DbType="NVarChar(100)")] + public string Value25 + { + get + { + return this._Value25; + } + set + { + if ((this._Value25 != value)) + { + this.OnValue25Changing(value); + this.SendPropertyChanging(); + this._Value25 = value; + this.SendPropertyChanged("Value25"); + this.OnValue25Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value26", DbType="NVarChar(100)")] + public string Value26 + { + get + { + return this._Value26; + } + set + { + if ((this._Value26 != value)) + { + this.OnValue26Changing(value); + this.SendPropertyChanging(); + this._Value26 = value; + this.SendPropertyChanged("Value26"); + this.OnValue26Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value27", DbType="NVarChar(100)")] + public string Value27 + { + get + { + return this._Value27; + } + set + { + if ((this._Value27 != value)) + { + this.OnValue27Changing(value); + this.SendPropertyChanging(); + this._Value27 = value; + this.SendPropertyChanged("Value27"); + this.OnValue27Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value28", DbType="NVarChar(100)")] + public string Value28 + { + get + { + return this._Value28; + } + set + { + if ((this._Value28 != value)) + { + this.OnValue28Changing(value); + this.SendPropertyChanging(); + this._Value28 = value; + this.SendPropertyChanged("Value28"); + this.OnValue28Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value29", DbType="NVarChar(100)")] + public string Value29 + { + get + { + return this._Value29; + } + set + { + if ((this._Value29 != value)) + { + this.OnValue29Changing(value); + this.SendPropertyChanging(); + this._Value29 = value; + this.SendPropertyChanged("Value29"); + this.OnValue29Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value30", DbType="NVarChar(100)")] + public string Value30 + { + get + { + return this._Value30; + } + set + { + if ((this._Value30 != value)) + { + this.OnValue30Changing(value); + this.SendPropertyChanging(); + this._Value30 = value; + this.SendPropertyChanged("Value30"); + this.OnValue30Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value31", DbType="NVarChar(100)")] + public string Value31 + { + get + { + return this._Value31; + } + set + { + if ((this._Value31 != value)) + { + this.OnValue31Changing(value); + this.SendPropertyChanging(); + this._Value31 = value; + this.SendPropertyChanged("Value31"); + this.OnValue31Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value32", DbType="NVarChar(100)")] + public string Value32 + { + get + { + return this._Value32; + } + set + { + if ((this._Value32 != value)) + { + this.OnValue32Changing(value); + this.SendPropertyChanging(); + this._Value32 = value; + this.SendPropertyChanged("Value32"); + this.OnValue32Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value33", DbType="NVarChar(100)")] + public string Value33 + { + get + { + return this._Value33; + } + set + { + if ((this._Value33 != value)) + { + this.OnValue33Changing(value); + this.SendPropertyChanging(); + this._Value33 = value; + this.SendPropertyChanged("Value33"); + this.OnValue33Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value34", DbType="NVarChar(100)")] + public string Value34 + { + get + { + return this._Value34; + } + set + { + if ((this._Value34 != value)) + { + this.OnValue34Changing(value); + this.SendPropertyChanging(); + this._Value34 = value; + this.SendPropertyChanged("Value34"); + this.OnValue34Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value35", DbType="NVarChar(100)")] + public string Value35 + { + get + { + return this._Value35; + } + set + { + if ((this._Value35 != value)) + { + this.OnValue35Changing(value); + this.SendPropertyChanging(); + this._Value35 = value; + this.SendPropertyChanged("Value35"); + this.OnValue35Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value36", DbType="NVarChar(100)")] + public string Value36 + { + get + { + return this._Value36; + } + set + { + if ((this._Value36 != value)) + { + this.OnValue36Changing(value); + this.SendPropertyChanging(); + this._Value36 = value; + this.SendPropertyChanged("Value36"); + this.OnValue36Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value37", DbType="NVarChar(100)")] + public string Value37 + { + get + { + return this._Value37; + } + set + { + if ((this._Value37 != value)) + { + this.OnValue37Changing(value); + this.SendPropertyChanging(); + this._Value37 = value; + this.SendPropertyChanged("Value37"); + this.OnValue37Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value38", DbType="NVarChar(100)")] + public string Value38 + { + get + { + return this._Value38; + } + set + { + if ((this._Value38 != value)) + { + this.OnValue38Changing(value); + this.SendPropertyChanging(); + this._Value38 = value; + this.SendPropertyChanged("Value38"); + this.OnValue38Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value39", DbType="NVarChar(100)")] + public string Value39 + { + get + { + return this._Value39; + } + set + { + if ((this._Value39 != value)) + { + this.OnValue39Changing(value); + this.SendPropertyChanging(); + this._Value39 = value; + this.SendPropertyChanged("Value39"); + this.OnValue39Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value40", DbType="NVarChar(100)")] + public string Value40 + { + get + { + return this._Value40; + } + set + { + if ((this._Value40 != value)) + { + this.OnValue40Changing(value); + this.SendPropertyChanging(); + this._Value40 = value; + this.SendPropertyChanged("Value40"); + this.OnValue40Changed(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_DataInTemp_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -132752,6 +133232,8 @@ namespace Model private EntityRef _Base_Project; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -132773,6 +133255,7 @@ namespace Model public Weld_ProjectPlan() { this._Base_Project = default(EntityRef); + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -132831,6 +133314,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -132934,6 +133421,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_ProjectPlan.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_ProjectPlan.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -133187,6 +133708,8 @@ namespace Model private EntityRef _Weld_UsingPlan; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -133235,6 +133758,7 @@ namespace Model this._Weld_Storeman = default(EntityRef); this._Weld_UsingMat = default(EntityRef); this._Weld_UsingPlan = default(EntityRef); + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -133313,6 +133837,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -133750,6 +134278,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMat_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_RecycleMat.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_RecycleMat.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -133813,6 +134375,8 @@ namespace Model private EntityRef _Weld_UsingPlan; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -133853,6 +134417,7 @@ namespace Model this._Weld_Storeman = default(EntityRef); this._Weld_UsingMat = default(EntityRef); this._Weld_UsingPlan = default(EntityRef); + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -133931,6 +134496,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -134288,6 +134857,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMatTop_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_RecycleMatTop.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_RecycleMatTop.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -135208,6 +135811,8 @@ namespace Model private System.Nullable _Weight; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -135224,6 +135829,7 @@ namespace Model public Weld_StockInit() { + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -135258,6 +135864,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -135307,6 +135917,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_StockInit_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_StockInit.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_StockInit.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -136217,6 +136861,8 @@ namespace Model private EntityRef _Weld_UsingPlan; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -136272,6 +136918,7 @@ namespace Model this._Base_Project = default(EntityRef); this._Weld_Storeman = default(EntityRef); this._Weld_UsingPlan = default(EntityRef); + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -136350,6 +136997,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -136835,6 +137486,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingMat_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_UsingMat.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_UsingMat.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -136944,6 +137629,8 @@ namespace Model private EntitySet _Weld_UsingMat; + private EntityRef _Weld_WeldInfo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -137007,6 +137694,7 @@ namespace Model this._Weld_RecycleMat = new EntitySet(new Action(this.attach_Weld_RecycleMat), new Action(this.detach_Weld_RecycleMat)); this._Weld_RecycleMatTop = new EntitySet(new Action(this.attach_Weld_RecycleMatTop), new Action(this.detach_Weld_RecycleMatTop)); this._Weld_UsingMat = new EntitySet(new Action(this.attach_Weld_UsingMat), new Action(this.detach_Weld_UsingMat)); + this._Weld_WeldInfo = default(EntityRef); OnCreated(); } @@ -137041,6 +137729,10 @@ namespace Model { if ((this._WeldId != value)) { + if (this._Weld_WeldInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnWeldIdChanging(value); this.SendPropertyChanging(); this._WeldId = value; @@ -137569,6 +138261,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingPlan_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)] + public Weld_WeldInfo Weld_WeldInfo + { + get + { + return this._Weld_WeldInfo.Entity; + } + set + { + Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity; + if (((previousValue != value) + || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Weld_WeldInfo.Entity = null; + previousValue.Weld_UsingPlan.Remove(this); + } + this._Weld_WeldInfo.Entity = value; + if ((value != null)) + { + value.Weld_UsingPlan.Add(this); + this._WeldId = value.WeldId; + } + else + { + this._WeldId = default(string); + } + this.SendPropertyChanged("Weld_WeldInfo"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -138239,6 +138965,18 @@ namespace Model private System.Nullable _IsLock; + private EntitySet _Weld_ProjectPlan; + + private EntitySet _Weld_RecycleMat; + + private EntitySet _Weld_RecycleMatTop; + + private EntitySet _Weld_StockInit; + + private EntitySet _Weld_UsingMat; + + private EntitySet _Weld_UsingPlan; + private EntityRef _Weld_WeldType; #region 可扩展性方法定义 @@ -138271,6 +139009,12 @@ namespace Model public Weld_WeldInfo() { + this._Weld_ProjectPlan = new EntitySet(new Action(this.attach_Weld_ProjectPlan), new Action(this.detach_Weld_ProjectPlan)); + this._Weld_RecycleMat = new EntitySet(new Action(this.attach_Weld_RecycleMat), new Action(this.detach_Weld_RecycleMat)); + this._Weld_RecycleMatTop = new EntitySet(new Action(this.attach_Weld_RecycleMatTop), new Action(this.detach_Weld_RecycleMatTop)); + this._Weld_StockInit = new EntitySet(new Action(this.attach_Weld_StockInit), new Action(this.detach_Weld_StockInit)); + this._Weld_UsingMat = new EntitySet(new Action(this.attach_Weld_UsingMat), new Action(this.detach_Weld_UsingMat)); + this._Weld_UsingPlan = new EntitySet(new Action(this.attach_Weld_UsingPlan), new Action(this.detach_Weld_UsingPlan)); this._Weld_WeldType = default(EntityRef); OnCreated(); } @@ -138499,6 +139243,84 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Weld_WeldInfo", Storage="_Weld_ProjectPlan", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_ProjectPlan + { + get + { + return this._Weld_ProjectPlan; + } + set + { + this._Weld_ProjectPlan.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMat_Weld_WeldInfo", Storage="_Weld_RecycleMat", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_RecycleMat + { + get + { + return this._Weld_RecycleMat; + } + set + { + this._Weld_RecycleMat.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMatTop_Weld_WeldInfo", Storage="_Weld_RecycleMatTop", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_RecycleMatTop + { + get + { + return this._Weld_RecycleMatTop; + } + set + { + this._Weld_RecycleMatTop.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_StockInit_Weld_WeldInfo", Storage="_Weld_StockInit", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_StockInit + { + get + { + return this._Weld_StockInit; + } + set + { + this._Weld_StockInit.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingMat_Weld_WeldInfo", Storage="_Weld_UsingMat", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_UsingMat + { + get + { + return this._Weld_UsingMat; + } + set + { + this._Weld_UsingMat.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingPlan_Weld_WeldInfo", Storage="_Weld_UsingPlan", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] + public EntitySet Weld_UsingPlan + { + get + { + return this._Weld_UsingPlan; + } + set + { + this._Weld_UsingPlan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_WeldInfo_Weld_WeldType", Storage="_Weld_WeldType", ThisKey="WeldTypeId", OtherKey="WeldTypeId", IsForeignKey=true)] public Weld_WeldType Weld_WeldType { @@ -138552,6 +139374,78 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } + + private void attach_Weld_ProjectPlan(Weld_ProjectPlan entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_ProjectPlan(Weld_ProjectPlan entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } + + private void attach_Weld_RecycleMat(Weld_RecycleMat entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_RecycleMat(Weld_RecycleMat entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } + + private void attach_Weld_RecycleMatTop(Weld_RecycleMatTop entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_RecycleMatTop(Weld_RecycleMatTop entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } + + private void attach_Weld_StockInit(Weld_StockInit entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_StockInit(Weld_StockInit entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } + + private void attach_Weld_UsingMat(Weld_UsingMat entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_UsingMat(Weld_UsingMat entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } + + private void attach_Weld_UsingPlan(Weld_UsingPlan entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = this; + } + + private void detach_Weld_UsingPlan(Weld_UsingPlan entity) + { + this.SendPropertyChanging(); + entity.Weld_WeldInfo = null; + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Weld_WeldType")]