diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index 1108781..a87ca48 100644 Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ diff --git a/HJGL/BLL/Common/Const.cs b/HJGL/BLL/Common/Const.cs index 53fe3ce..37f33fd 100644 --- a/HJGL/BLL/Common/Const.cs +++ b/HJGL/BLL/Common/Const.cs @@ -243,6 +243,10 @@ namespace BLL /// public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx"; + /// + /// 焊工考试情况 + /// + public const string WelderTestInfoTemplateUrl = "File\\Excel\\焊工考试情况.xlsx"; /// /// 委托单导入模板 /// diff --git a/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs b/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs index 51feec2..19084de 100644 --- a/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs +++ b/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs @@ -10,49 +10,43 @@ namespace BLL { public class WelderTestService { - public bool Add(Model.Welder_TestInfo input) + public static void Add(Model.Welder_TestInfo input) { - try - { - var model = new Model.Welder_TestInfo(); - model.Id = SQLHelper.GetNewID(typeof(Welder_TestInfo)); - model.WeldMethod = input.WeldMethod; - model.MaterialId = input.MaterialId; - model.Remark = input.Remark; - model.CreatedDate = input.CreatedDate; - model.IsPass = input.IsPass; - Funs.DB.Welder_TestInfo.InsertOnSubmit(model); - Funs.DB.SubmitChanges(); - return true; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "添加焊工考试错误"); - return false; - } + var model = new Model.Welder_TestInfo(); + model.Id = SQLHelper.GetNewID(typeof(Welder_TestInfo)); + model.WeldMethodId = input.WeldMethodId; + model.MaterialId = input.MaterialId; + model.Remark = input.Remark; + model.ProjectId = input.ProjectId; + model.CreatedDate = input.CreatedDate; + model.ProjectId = input.ProjectId; + model.WelderId = input.WelderId; + model.IsPass = input.IsPass; + Funs.DB.Welder_TestInfo.InsertOnSubmit(model); + Funs.DB.SubmitChanges(); } - public bool Edit(Model.Welder_TestInfo input) + public static void Edit(Model.Welder_TestInfo input) { var result=Funs.DB.Welder_TestInfo.FirstOrDefault(t=>t.Id== input.Id); if (result == null) { - return false; + return ; } - result.WeldMethod = input.WeldMethod; + result.WelderId = input.WelderId; + result.WeldMethodId = input.WeldMethodId; result.MaterialId = input.MaterialId; result.Remark = input.Remark; result.CreatedDate = input.CreatedDate; result.IsPass = input.IsPass; Funs.DB.SubmitChanges(); - return true; + } - public Model.Welder_TestInfo Get(string Id) + public static Model.Welder_TestInfo Get(string Id) { var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id); return result; } - - public bool Delete(string Id) + public static bool Delete(string Id) { var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id); if (result == null) diff --git a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj index f843a5d..7c53860 100644 --- a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1081,6 +1081,7 @@ + @@ -1225,6 +1226,8 @@ + + @@ -4410,6 +4413,13 @@ QualifiedProjectEdit.aspx + + WelderTestInfoImportError.aspx + ASPXCodeBehind + + + WelderTestInfoImportError.aspx + WelderManage.aspx ASPXCodeBehind @@ -5353,6 +5363,20 @@ imageUp.ashx + + WelderTestInfo.aspx + ASPXCodeBehind + + + WelderTestInfo.aspx + + + WelderTestInfoEdit.aspx + ASPXCodeBehind + + + WelderTestInfoEdit.aspx + CheckManage.aspx ASPXCodeBehind diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx new file mode 100644 index 0000000..72b23e5 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx @@ -0,0 +1,144 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WelderTestInfo.aspx.cs" Inherits="FineUIPro.Web.WelderManage.WelderTestInfo" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs new file mode 100644 index 0000000..834e21b --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs @@ -0,0 +1,650 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; +using System.Web.Configuration; +using System.Security.Principal; + +namespace FineUIPro.Web.WelderManage +{ + public partial class WelderTestInfo : PageBase + { + //定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + #region 加载 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + + this.drpUnitId.DataTextField = "UnitName"; + this.drpUnitId.DataValueField = "UnitId"; + this.drpUnitId.DataSource = (from x in Funs.DB.Base_Unit select x).ToList(); + this.drpUnitId.DataBind(); + Funs.FineUIPleaseSelect(this.drpUnitId); + + this.InitTreeMenu();//加载树 + } + } + + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "单位-焊工"; + rootNode.ToolTip = "单位"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List welders = new List(); + List units = (from x in Funs.DB.Base_Unit select x).ToList(); + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + units = units.Where(e => e.UnitId == this.drpUnitId.SelectedValue).ToList(); + } + foreach (var item in units) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.UnitName; + rootProjectNode.NodeID = item.UnitId; + //rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = "单位"; + rootNode.Nodes.Add(rootProjectNode); + + welders = (from x in Funs.DB.Welder_Welder + where x.UnitId == item.UnitId + select x).ToList(); + + + this.BindNodes(rootProjectNode, welders); + } + } + #endregion + + #region 绑定树节点 + /// + /// 绑定树节点 + /// + /// + private void BindNodes(TreeNode node, List welders) + { + if (node.ToolTip == "单位") + { + if (!string.IsNullOrEmpty(this.txtWelderCodeS.Text.Trim())) + { + welders = welders.Where(e => e.WelderCode.Contains(this.txtWelderCodeS.Text.Trim())).ToList(); + } + if (!string.IsNullOrEmpty(txtWelderNameS.Text.Trim())) + { + welders = welders.Where(e => e.WelderName.Contains(this.txtWelderNameS.Text.Trim())).ToList(); + } + + welders = welders.OrderBy(x => x.WelderCode).ToList(); + foreach (var item in welders) + { + TreeNode newNode = new TreeNode(); + newNode.Text = item.WelderName + "(" + item.WelderCode + ")"; + newNode.NodeID = item.WelderId; + newNode.ToolTip = item.WelderCode; + newNode.EnableClickEvent = true; + node.Nodes.Add(newNode); + } + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region Grid 绑定 + private void BindGrid() + { + var welder = BLL.WelderService.GetWelderById(this.tvControlItem.SelectedNodeID); + if (welder != null) + { + this.lblCode.Text = welder.WelderCode; + this.lblName.Text = welder.WelderName; + } + string strSql = @"SELECT A.*,b.WeldingMethodCode,C.MaterialCode, + (case when A.IsPass=1 then '是' else '否' end ) As PassName , + convert(varchar,A.CreatedDate,23) as TestDate + FROM Welder_TestInfo AS A + inner join Base_WeldingMethod as B + on A.WeldMethodId=B.WeldingMethodId + inner join Base_Material as C on + A.MaterialId=C.MaterialId + WHERE A.WelderId=@WelderId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@WelderId", this.tvControlItem.SelectedNodeID)); + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_QualifiedProjectMenuId, Const.BtnAdd)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WelderTestInfoEdit.aspx?Id={0}", Grid1.SelectedRowID, "维护 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 右键编辑 + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.Welder_QualifiedProjectMenuId, BLL.Const.BtnModify)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WelderTestInfoEdit.aspx?Id={0}", Grid1.SelectedRowID, "维护 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + + /// + /// 删除 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_QualifiedProjectMenuId, Const.BtnDelete)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + + bool isShow = true; + if (Grid1.SelectedRowIndexArray.Length > 1) + { + isShow = false; + } + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (judgementDelete(rowID, isShow)) + { + BLL.WelderTestService.Delete(rowID); + //BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除合格项目焊工"); + } + } + + ShowNotify("删除成功!", MessageBoxIcon.Success); + this.BindGrid(); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 判断是否可删除 + /// + /// 判断是否可以删除 + /// + /// + private bool judgementDelete(string id, bool isShow) + { + string content = string.Empty; + + if (string.IsNullOrEmpty(content)) + { + return true; + } + else + { + if (isShow) + { + Alert.ShowInTop(content, MessageBoxIcon.Error); + } + return false; + } + } + #endregion + + #region 模板下载 + /// + /// 模板下载 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.WelderTestInfoTemplateUrl; + string filePath = Const.WelderTestInfoTemplateUrl; + 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(); + //PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载焊工资质导入模板?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.WelderQueTemplateUrl; + string filePath = Const.WelderQueTemplateUrl; + 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 + + protected void btnImport_Click(object sender, EventArgs e) + { + string message = string.Empty; + errorInfos = string.Empty; + try + { + if (this.fileUpload.HasFile == false) + { + ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fileUpload.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls" && IsXls != ".xlsx") + { + ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning); + return; + } + + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + //指定上传文件名称 + this.hidFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + //上传文件路径 + string filePath = initFullPath + this.hidFileName.Text; + //文件上传服务器 + this.fileUpload.PostedFile.SaveAs(filePath); + //文件上传服务器后的名称 + string fileName = rootPath + initPath + this.hidFileName.Text; + //读取Excel + DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true); + //验证Excel读取是否有误 + if (!string.IsNullOrEmpty(errorInfos)) + { + ShowNotify(errorInfos, MessageBoxIcon.Warning); + return; + } + DataTable dt = ds.Tables[0]; + if (dt.Rows.Count > 0) + { + List listData = new List(); + var validate = ValidateImportFileds(dt); + if(validate!=null && validate.Count > 0) + { + Cache["errLog"] = validate; + //提示错误信息 + PageContext.RegisterStartupScript(Window2.GetShowReference("WelderTestInfoImportError.aspx")); + } + else + { + foreach (DataRow dr in dt.Rows) + { + Model.Welder_TestInfo model = new Model.Welder_TestInfo(); + string welderCode = dr[0].ToString(); + string weldMethod = dr[1].ToString(); + string weldMeatrail = dr[2].ToString(); + string isPass = dr[3].ToString(); + string testDate = dr[4].ToString(); + string remark = dr[5].ToString(); + + var welderId = Funs.DB.Welder_Welder.FirstOrDefault(t => t.WelderCode == welderCode)?.WelderId; + var methodId = Funs.DB.Base_WeldingMethod.FirstOrDefault(t => t.WeldingMethodCode == weldMethod)?.WeldingMethodId; + var materId = Funs.DB.Base_Material.FirstOrDefault(t => t.MaterialCode == weldMeatrail)?.MaterialId; + model.Id = SQLHelper.GetNewID(typeof(Model.Welder_TestInfo)); + model.WeldMethodId= methodId; + model.MaterialId= materId; + model.IsPass = isPass == "是" ? true : false; + model.ProjectId = this.CurrUser.LoginProjectId; + model.WelderId= welderId; + model.CreatedDate = DateTime.Parse(testDate); + model.Remark = remark; + listData.Add(model); + } + } + + if(listData.Count > 0) + { + Funs.DB.Welder_TestInfo.InsertAllOnSubmit(listData); + Funs.DB.SubmitChanges(); + ShowNotify("导入成功", MessageBoxIcon.Success); + this.BindGrid(); + } + } + else + { + ShowAlert("没有数据!", MessageBoxIcon.Warning); + return; + } + + } + catch (Exception ex) + { + ShowAlert("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 弹出编辑窗口关闭事件 + /// + /// 弹出编辑窗体关闭事件 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页 排序 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + 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) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + this.BindGrid(); + } + #endregion + + #region 增加 + /// + /// 增加 + /// + /// + /// + protected void btnAdd_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_QualifiedProjectMenuId, Const.BtnAdd)) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WelderTestInfoEdit.aspx?WelderId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + } + else + { + Alert.ShowInTop("请选择一名焊工!", MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + #endregion + + protected void Window2_Close(object sender, EventArgs e) + { + Cache["errLog"] = null; + } + + private List ValidateImportFileds(DataTable dt) + { + var listData = new List(); + int i = 0; + foreach (DataRow dr in dt.Rows) + { + i++; + + string welderCode = dr[0].ToString(); + string weldMethod = dr[1].ToString(); + string weldMeatrail = dr[2].ToString(); + string isPass = dr[3].ToString(); + string testDate = dr[4].ToString(); + string remark = dr[5].ToString(); + + //验证焊工号 + if (string.IsNullOrEmpty(welderCode)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊工号"; + model.errMsg = "焊工号不能为空"; + model.isSuccess = false; + listData.Add(model); + } + + if (string.IsNullOrEmpty(weldMethod)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊接方法"; + model.errMsg = "焊接方法不能为空"; + model.isSuccess = false; + listData.Add(model); + } + if (string.IsNullOrEmpty(weldMeatrail)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊接材质"; + model.errMsg = "焊接材质不能为空"; + model.isSuccess = false; + listData.Add(model); + } + if (string.IsNullOrEmpty(weldMeatrail)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊接材质"; + model.errMsg = "焊接材质不能为空"; + model.isSuccess = false; + listData.Add(model); + } + if (string.IsNullOrEmpty(isPass)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "是否合格"; + model.errMsg = "是否合格不能为空"; + model.isSuccess = false; + listData.Add(model); + } + if(isPass!="是" && isPass != "否") + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "是否合格"; + model.errMsg = "合格字段只能是或者否"; + model.isSuccess = false; + listData.Add(model); + } + if (string.IsNullOrEmpty(testDate)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "考试日期"; + model.errMsg = "考试日期不能为空"; + model.isSuccess = false; + listData.Add(model); + } + DateTime t1 = new DateTime(); + if(!DateTime.TryParse(testDate,out t1)) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "考试日期"; + model.errMsg = "请输入正确的考试日期(yyyy-MM-dd)"; + model.isSuccess = false; + listData.Add(model); + } + //验证是否存在 + var isAnyWelderCode = Funs.DB.Welder_Welder.Any(t => t.WelderCode == welderCode); + if (!isAnyWelderCode) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊工号"; + model.errMsg = "焊工号不存在"; + model.isSuccess = false; + listData.Add(model); + } + var isAnyWeldMethod = Funs.DB.Base_WeldingMethod.Any(t => t.WeldingMethodCode == weldMethod); + if (!isAnyWeldMethod) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊接方法"; + model.errMsg = "焊接方法不存在"; + model.isSuccess = false; + listData.Add(model); + } + var isAnyMeaterail = Funs.DB.Base_Material.Any(t => t.MaterialCode == weldMeatrail); + if (!isAnyMeaterail) + { + var model = new Model.ViewModels.ImportErrorViewModel(); + model.rowId = i; + model.createdTime = DateTime.Now; + model.columnName = "焊接材质"; + model.errMsg = "焊接材质不存在"; + model.isSuccess = false; + listData.Add(model); + } + } + return listData; + } + + } + +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.designer.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.designer.cs new file mode 100644 index 0000000..4c29c43 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.designer.cs @@ -0,0 +1,287 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WelderManage +{ + + + public partial class WelderTestInfo + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtWelderCodeS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWelderCodeS; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// txtWelderNameS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWelderNameS; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// lblCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblCode; + + /// + /// lblName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// fileUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fileUpload; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// hidFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hidFileName; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx new file mode 100644 index 0000000..24b49b9 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx @@ -0,0 +1,75 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WelderTestInfoEdit.aspx.cs" Inherits="FineUIPro.Web.WelderManage.WelderTestInfoEdit" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.cs new file mode 100644 index 0000000..e673e0f --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.cs @@ -0,0 +1,118 @@ +using BLL; +using Microsoft.JScript; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.WelderManage +{ + public partial class WelderTestInfoEdit : PageBase + { + private string Id = string.Empty; + private string welderId=string.Empty; + protected void Page_Load(object sender, EventArgs e) + { + this.welderId = Request.Params["WelderId"]; + this.Id= Request.Params["id"]; + if (!IsPostBack) + { + this.BindDrpInit(); + this.GetWelderInfo(); + if(!string.IsNullOrEmpty(this.Id)) + this.GetTestInfo(); + } + } + public void GetTestInfo() { + var result=Funs.DB.Welder_TestInfo.FirstOrDefault(t=>t.Id==this.Id); + if (result == null) + { + ShowNotify("请不要非法操作",MessageBoxIcon.Error); + return; + } + drpIsPass.SelectedValue = result.IsPass.ToString(); + drpMaterial.SelectedValue=result.MaterialId.ToString(); + drpWeldMethod.SelectedValue = result.WeldMethodId.ToString(); + txtCheckDate.Text = result.CreatedDate.Value.ToString("yyyy-MM-dd"); + txtRemark.Text = result.Remark.ToString(); + } + private void GetWelderInfo() + { + var result = Funs.DB.Welder_Welder.FirstOrDefault(t => t.WelderId == this.welderId); + if(result == null) + { + return; + } + lbWedlerName.Text= result.WelderName; + lbWedlerCode.Text= result.WelderCode; + } + private void BindDrpInit() + { + var methodList = Funs.DB.Base_WeldingMethod.OrderBy(t=>t.WeldingMethodCode).ToList(); + drpWeldMethod.DataSource= methodList; + drpWeldMethod.DataTextField = "WeldingMethodCode"; + drpWeldMethod.DataValueField = "WeldingMethodId"; + drpWeldMethod.DataBind(); + drpWeldMethod.Items.Insert(0, new ListItem("请选择", "")); + + var materList = Funs.DB.Base_Material.OrderBy(t=>t.MaterialCode).ToList(); + drpMaterial.DataSource= materList; + drpMaterial.DataTextField = "MaterialCode"; + drpMaterial.DataValueField = "MaterialId"; + drpMaterial.DataBind(); + drpMaterial.Items.Insert(0, new ListItem("请选择", "")); + } + protected void btnSave_Click(object sender, EventArgs e) + { + var result = SaveData(); + if (result.Item1) + { + ShowNotify("保存成功", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify(result.Item2, MessageBoxIcon.Error); + } + + + + } + + (bool,string) SaveData() + { + try + { + + var input = new Model.Welder_TestInfo(); + input.CreatedDate = System.Convert.ToDateTime(txtCheckDate.Text); + input.ProjectId = this.CurrUser.LoginProjectId; + input.WeldMethodId = drpWeldMethod.SelectedValue; + input.WelderId = this.welderId; + input.MaterialId = drpMaterial.SelectedValue; + input.Remark = txtRemark.Text.Trim(); + input.IsPass = drpIsPass.SelectedValue == "是" ? true : false; + + if (string.IsNullOrEmpty(this.Id)) + { + BLL.WelderTestService.Add(input); + } + else + { + input.Id = this.Id; + BLL.WelderTestService.Edit(input); + } + return (true, "保存成功"); + + } + catch (Exception ex) + { + BLL.ErrLogInfo.WriteLog(ex, "保存焊工考试结果失败"); + return (false, ex.Message); + } + } + + } +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.designer.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.designer.cs new file mode 100644 index 0000000..f1a0743 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WelderManage +{ + + + public partial class WelderTestInfoEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// lbWedlerName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbWedlerName; + + /// + /// lbWedlerCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbWedlerCode; + + /// + /// drpWeldMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWeldMethod; + + /// + /// drpMaterial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMaterial; + + /// + /// txtCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCheckDate; + + /// + /// drpIsPass 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsPass; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx new file mode 100644 index 0000000..01d02d5 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx @@ -0,0 +1,30 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WelderTestInfoImportError.aspx.cs" Inherits="FineUIPro.Web.WelderManage.WelderImportError" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.cs new file mode 100644 index 0000000..64e3176 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.WelderManage +{ + public partial class WelderImportError : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.BindGrid(); + } + } + void BindGrid() + { + var cacheData = Cache["errLog"]; + if(cacheData != null) + { + var listData = Cache["errLog"] as List; + Grid1.DataSource= listData; + Grid1.DataBind(); + } + } + } +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.designer.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.designer.cs new file mode 100644 index 0000000..1291252 --- /dev/null +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfoImportError.aspx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WelderManage +{ + + + public partial class WelderImportError + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lablRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lablRemark; + } +} diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/ImportError.aspx b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/ImportError.aspx index 82ab602..2c37247 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/ImportError.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/ImportError.aspx @@ -4,34 +4,34 @@ - + 试压包导入错误日志
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/Model/Model.cs b/HJGL/Model/Model.cs index 6f44473..bd39254 100644 --- a/HJGL/Model/Model.cs +++ b/HJGL/Model/Model.cs @@ -20711,6 +20711,8 @@ namespace Model private System.Nullable _IsPMI; + private System.Nullable _AuditStatus; + private EntitySet _Batch_BatchTrustItem; private EntitySet _Batch_PointBatchItem; @@ -20851,6 +20853,8 @@ namespace Model partial void OnANSISCHChanged(); partial void OnIsPMIChanging(System.Nullable value); partial void OnIsPMIChanged(); + partial void OnAuditStatusChanging(System.Nullable value); + partial void OnAuditStatusChanged(); #endregion public Pipeline_WeldJoint() @@ -21905,6 +21909,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditStatus", DbType="Int")] + public System.Nullable AuditStatus + { + get + { + return this._AuditStatus; + } + set + { + if ((this._AuditStatus != value)) + { + this.OnAuditStatusChanging(value); + this.SendPropertyChanging(); + this._AuditStatus = value; + this.SendPropertyChanged("AuditStatus"); + this.OnAuditStatusChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_BatchTrustItem_Pipeline_WeldJoint", Storage="_Batch_BatchTrustItem", ThisKey="WeldJointId", OtherKey="WeldJointId", DeleteRule="NO ACTION")] public EntitySet Batch_BatchTrustItem { @@ -45900,7 +45924,7 @@ namespace Model private bool _IsPass; - private string _WeldMethod; + private string _WeldMethodId; private string _MaterialId; @@ -45908,6 +45932,8 @@ namespace Model private string _Remark; + private string _WelderId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -45918,14 +45944,16 @@ namespace Model partial void OnProjectIdChanged(); partial void OnIsPassChanging(bool value); partial void OnIsPassChanged(); - partial void OnWeldMethodChanging(string value); - partial void OnWeldMethodChanged(); + partial void OnWeldMethodIdChanging(string value); + partial void OnWeldMethodIdChanged(); partial void OnMaterialIdChanging(string value); partial void OnMaterialIdChanged(); partial void OnCreatedDateChanging(System.Nullable value); partial void OnCreatedDateChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnWelderIdChanging(string value); + partial void OnWelderIdChanged(); #endregion public Welder_TestInfo() @@ -45993,22 +46021,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldMethod", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string WeldMethod + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldMethodId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string WeldMethodId { get { - return this._WeldMethod; + return this._WeldMethodId; } set { - if ((this._WeldMethod != value)) + if ((this._WeldMethodId != value)) { - this.OnWeldMethodChanging(value); + this.OnWeldMethodIdChanging(value); this.SendPropertyChanging(); - this._WeldMethod = value; - this.SendPropertyChanged("WeldMethod"); - this.OnWeldMethodChanged(); + this._WeldMethodId = value; + this.SendPropertyChanged("WeldMethodId"); + this.OnWeldMethodIdChanged(); } } } @@ -46073,6 +46101,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WelderId", DbType="NVarChar(50)")] + public string WelderId + { + get + { + return this._WelderId; + } + set + { + if ((this._WelderId != value)) + { + this.OnWelderIdChanging(value); + this.SendPropertyChanging(); + this._WelderId = value; + this.SendPropertyChanged("WelderId"); + this.OnWelderIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; diff --git a/HJGL/Model/Model.csproj b/HJGL/Model/Model.csproj index 390d058..8deb4ce 100644 --- a/HJGL/Model/Model.csproj +++ b/HJGL/Model/Model.csproj @@ -75,6 +75,7 @@ + diff --git a/HJGL/Model/ViewModels/ImportErrorViewModel.cs b/HJGL/Model/ViewModels/ImportErrorViewModel.cs new file mode 100644 index 0000000..3bce362 --- /dev/null +++ b/HJGL/Model/ViewModels/ImportErrorViewModel.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model.ViewModels +{ + public class ImportErrorViewModel + { + public int rowId { get; set; } + + public string columnName { get; set; } + + public string errMsg { get; set; } + + public bool isSuccess { get; set; } = true; + + public DateTime createdTime { get; set; } + + + } +}