From 1cda2d1914513050db20060ef0b58b1663a2def5 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 9 May 2025 15:29:52 +0800 Subject: [PATCH] =?UTF-8?q?20250509=20=E6=96=B0=E5=A2=9E=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E4=BA=8B=E6=95=85=E6=8A=A5=E5=91=8A=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FCL/BLL/SES/PunishmentService.cs | 14 + .../IncidentInvestigation.aspx.cs | 2 +- .../IncidentInvestigationEdit.aspx.cs | 14 +- .../IncidentInvestigationReport.aspx | 169 ++++ .../IncidentInvestigationReport.aspx.cs | 324 +++++++ ...cidentInvestigationReport.aspx.designer.cs | 152 +++ .../File/Excel/质量事件报告模板.xlsx | Bin 0 -> 10483 bytes FCL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx | 4 +- .../SES/SESRelatedDataEdit.aspx.cs | 48 +- FCL/Model/Model.cs | 887 ++++++++++++++++++ 11 files changed, 1608 insertions(+), 14 deletions(-) create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs create mode 100644 FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs create mode 100644 FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx diff --git a/FCL/BLL/SES/PunishmentService.cs b/FCL/BLL/SES/PunishmentService.cs index f2a80f0..c56d9e1 100644 --- a/FCL/BLL/SES/PunishmentService.cs +++ b/FCL/BLL/SES/PunishmentService.cs @@ -70,6 +70,13 @@ namespace BLL newPunishment.SeType = punishment.SeType; newPunishment.PVTRequester = punishment.PVTRequester; newPunishment.IndividualSESReason = punishment.IndividualSESReason; + newPunishment.SSRAdminId = punishment.SSRAdminId; + newPunishment.SSRStaratDate = punishment.SSRStaratDate; + newPunishment.SSREndDate=punishment.SSREndDate; + newPunishment.MainCoordinatorStartDate = punishment.MainCoordinatorStartDate; + newPunishment.MainCoordinatorEndDate = punishment.MainCoordinatorEndDate; + newPunishment.UserDepStartDate = punishment.UserDepStartDate; + newPunishment.UserDepEndDate = punishment.UserDepEndDate; Funs.DB.EMC_Punishment.InsertOnSubmit(newPunishment); Funs.DB.SubmitChanges(); @@ -116,6 +123,13 @@ namespace BLL newPunishment.SeType = punishment.SeType; newPunishment.PVTRequester = punishment.PVTRequester; newPunishment.IndividualSESReason = punishment.IndividualSESReason; + newPunishment.SSRAdminId = punishment.SSRAdminId; + newPunishment.SSRStaratDate = punishment.SSRStaratDate; + newPunishment.SSREndDate = punishment.SSREndDate; + newPunishment.MainCoordinatorStartDate = punishment.MainCoordinatorStartDate; + newPunishment.MainCoordinatorEndDate = punishment.MainCoordinatorEndDate; + newPunishment.UserDepStartDate = punishment.UserDepStartDate; + newPunishment.UserDepEndDate = punishment.UserDepEndDate; Funs.DB.SubmitChanges(); } diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs index 23fc000..59dec68 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigation.aspx.cs @@ -689,7 +689,7 @@ namespace FineUIPro.Web.ContractorQuality } else if (pun.States == "6") { - s = "已审批"; + s = "已完成"; } else if (pun.States == "7") { diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs index 31d363b..6b68960 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs @@ -627,6 +627,9 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "2";//SSR已提交 + pun.SSREndDate = DateTime.Now;//SSR审批时间 + pun.MainCoordinatorStartDate = DateTime.Now;//主协调员审批到达时间 + pun.SSRAdminId = this.CurrUser.UserId; var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, "SSR"); if (updateAudit != null) @@ -755,6 +758,8 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "3";//主协调员提交 + pun.MainCoordinatorEndDate = DateTime.Now;//主协调员审批时间 + pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间 var updateAudit = BLL.PunishmentAuditService.GetAuditByAuditMan(this.PunishmentId, this.CurrUser.UserId); if (updateAudit != null) @@ -981,13 +986,14 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning); return; } } if (type == BLL.Const.BtnSubmit) { pun.States = "4";//用户部门提交 + pun.UserDepEndDate = DateTime.Now;//用户部门审批时间 var u = BLL.Sys_UserService.GetUsersByUserId(this.CurrUser.UserId); if (u != null) @@ -1066,7 +1072,7 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning); return; } } @@ -1176,7 +1182,7 @@ namespace FineUIPro.Web.ContractorQuality } else { - Alert.ShowInTop("如不填写请描述原因!", MessageBoxIcon.Warning); + Alert.ShowInTop("如不填写,请描述原因!", MessageBoxIcon.Warning); return; } } @@ -1337,6 +1343,7 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { pun.States = "1";//申请人已提交 + pun.SSRStaratDate = DateTime.Now;//SSR审批到达时间 Model.EMC_PunishmentAudit audit = new Model.EMC_PunishmentAudit(); audit.AuditId = SQLHelper.GetNewID(typeof(Model.EMC_PunishmentAudit)); @@ -1381,6 +1388,7 @@ namespace FineUIPro.Web.ContractorQuality if (type == BLL.Const.BtnSubmit) { punishment.States = "1";//申请人已提交 + punishment.SSRStaratDate = DateTime.Now;//SSR审批到达时间 } else { diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx new file mode 100644 index 0000000..da2ccdd --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx @@ -0,0 +1,169 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentInvestigationReport.aspx.cs" Inherits="FineUIPro.Web.ContractorQuality.IncidentInvestigationReport" %> + + + + + + + 承包商及供应商质量事件报告报表 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs new file mode 100644 index 0000000..400cfe1 --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.cs @@ -0,0 +1,324 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using NPOI.SS.UserModel; +using NPOI.XSSF.UserModel; +using System.IO; + +namespace FineUIPro.Web.ContractorQuality +{ + public partial class IncidentInvestigationReport : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + private void BindGrid() + { + string strSql = string.Empty; + strSql = @"select * from View_EMC_PunishmentReport where 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtFoNo.Text.Trim())) + { + strSql += " AND FO_NO like @FO_NO"; + listStr.Add(new SqlParameter("@FO_NO", "%" + this.txtFoNo.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtOriginal_WC.Text.Trim())) + { + strSql += " AND Original_WC =@Original_WC"; + listStr.Add(new SqlParameter("@Original_WC", this.txtOriginal_WC.Text.Trim())); + } + if (this.drpSeType.SelectedValue != "0") + { + strSql += " AND SeType =@SeType"; + listStr.Add(new SqlParameter("@SeType", this.drpSeType.SelectedText.Trim())); + } + 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(); + } + + #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 btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出 + /// + /// 导出按钮 + /// + /// + /// + protected void btnExport_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/") + Const.ExcelUrl; + //模板文件 + string TempletFileName = rootPath + "质量事件报告模板.xlsx"; + //导出文件 + string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\"; + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + string ReportFileName = filePath + "out.xlsx"; + + FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read); + XSSFWorkbook hssfworkbook = new XSSFWorkbook(file); + + #region 质量事件报告 + XSSFSheet reportModel = (XSSFSheet)hssfworkbook.GetSheet("Sheet1"); + + XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体 + cs_content_Font.FontName = "sans-serif";//字体 + cs_content_Font.FontHeightInPoints = 10; //字体大小 + + IDataFormat dataformat = hssfworkbook.CreateDataFormat(); + ICellStyle styleDate = hssfworkbook.CreateCellStyle(); + styleDate.DataFormat = dataformat.GetFormat("yyyy/m/d"); + + var list = (from x in Funs.DB.View_EMC_PunishmentReport orderby x.PunishDate descending select x).ToList(); + if (!string.IsNullOrEmpty(this.txtFoNo.Text.Trim())) + { + list = list.Where(x => x.FO_NO.Contains(this.txtFoNo.Text.Trim())).ToList(); + } + if (!string.IsNullOrEmpty(this.txtOriginal_WC.Text.Trim())) + { + list = list.Where(x => x.Original_WC == this.txtOriginal_WC.Text.Trim()).ToList(); + } + if (this.drpSeType.SelectedValue != "0") + { + list = list.Where(x => x.SeType == this.drpSeType.SelectedText.Trim()).ToList(); + } + if (list.Count > 0) + { + var rowIndex = 1; + foreach (var itemOver in list) + { + if (reportModel.GetRow(rowIndex) == null) reportModel.CreateRow(rowIndex); + + #region 列赋值 + //发现日期 + if (reportModel.GetRow(rowIndex).GetCell(0) == null) reportModel.GetRow(rowIndex).CreateCell(0); + reportModel.GetRow(rowIndex).GetCell(0).SetCellValue(itemOver.PunishDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.PunishDate) : ""); + + reportModel.GetRow(rowIndex).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式 + + //合同号 + if (reportModel.GetRow(rowIndex).GetCell(1) == null) reportModel.GetRow(rowIndex).CreateCell(1); + reportModel.GetRow(rowIndex).GetCell(1).SetCellValue(itemOver.FO_NO); + //专业类别 + if (reportModel.GetRow(rowIndex).GetCell(2) == null) reportModel.GetRow(rowIndex).CreateCell(2); + reportModel.GetRow(rowIndex).GetCell(2).SetCellValue(itemOver.Original_WC); + //类型 + if (reportModel.GetRow(rowIndex).GetCell(3) == null) reportModel.GetRow(rowIndex).CreateCell(3); + reportModel.GetRow(rowIndex).GetCell(3).SetCellValue(itemOver.SeType); + //承包商名称 + if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4); + reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver.Contractor); + //位置 + if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5); + reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver.Location); + //质量事件描述 + if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6); + reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver.Description); + //违章等级 + if (reportModel.GetRow(rowIndex).GetCell(7) == null) reportModel.GetRow(rowIndex).CreateCell(7); + reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver.ViolationDegree); + //违章人员 + if (reportModel.GetRow(rowIndex).GetCell(8) == null) reportModel.GetRow(rowIndex).CreateCell(8); + reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver.IndividualPerson); + //违章扣款(公司) + if (reportModel.GetRow(rowIndex).GetCell(9) == null) reportModel.GetRow(rowIndex).CreateCell(9); + reportModel.GetRow(rowIndex).GetCell(9).SetCellValue(itemOver.Company.HasValue ? itemOver.Company.ToString() : ""); + //违章扣款(个人) + if (reportModel.GetRow(rowIndex).GetCell(10) == null) reportModel.GetRow(rowIndex).CreateCell(10); + reportModel.GetRow(rowIndex).GetCell(10).SetCellValue(itemOver.Individual.HasValue ? itemOver.Individual.ToString() : ""); + //合同员 + if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11); + reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver.ContractAdminName); + //主协调员 + if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12); + reportModel.GetRow(rowIndex).GetCell(12).SetCellValue(itemOver.Main_CoordinatorName); + //主协调员部门 + if (reportModel.GetRow(rowIndex).GetCell(13) == null) reportModel.GetRow(rowIndex).CreateCell(13); + reportModel.GetRow(rowIndex).GetCell(13).SetCellValue(itemOver.MCDpartment); + //用户部门 + if (reportModel.GetRow(rowIndex).GetCell(14) == null) reportModel.GetRow(rowIndex).CreateCell(14); + reportModel.GetRow(rowIndex).GetCell(14).SetCellValue(itemOver.UserDepName); + //用户部门经理 + if (reportModel.GetRow(rowIndex).GetCell(15) == null) reportModel.GetRow(rowIndex).CreateCell(15); + reportModel.GetRow(rowIndex).GetCell(15).SetCellValue(itemOver.DepartLeaderName); + //申报人 + if (reportModel.GetRow(rowIndex).GetCell(16) == null) reportModel.GetRow(rowIndex).CreateCell(16); + reportModel.GetRow(rowIndex).GetCell(16).SetCellValue(itemOver.Violation_InspectorName); + //申报人部门 + if (reportModel.GetRow(rowIndex).GetCell(17) == null) reportModel.GetRow(rowIndex).CreateCell(17); + reportModel.GetRow(rowIndex).GetCell(17).SetCellValue(itemOver.Violation_InspectorDepart); + //违章关联SES + if (reportModel.GetRow(rowIndex).GetCell(18) == null) reportModel.GetRow(rowIndex).CreateCell(18); + reportModel.GetRow(rowIndex).GetCell(18).SetCellValue(itemOver.ViolationRelatedSes); + //扣款SES + if (reportModel.GetRow(rowIndex).GetCell(19) == null) reportModel.GetRow(rowIndex).CreateCell(19); + reportModel.GetRow(rowIndex).GetCell(19).SetCellValue(itemOver.SES_No); + //扣款完成时间 + if (reportModel.GetRow(rowIndex).GetCell(20) == null) reportModel.GetRow(rowIndex).CreateCell(20); + reportModel.GetRow(rowIndex).GetCell(20).SetCellValue(itemOver.CompletionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.CompletionDate) : ""); + //当前状态 + if (reportModel.GetRow(rowIndex).GetCell(21) == null) reportModel.GetRow(rowIndex).CreateCell(21); + reportModel.GetRow(rowIndex).GetCell(21).SetCellValue(itemOver.States); + //SSR管理员 + if (reportModel.GetRow(rowIndex).GetCell(22) == null) reportModel.GetRow(rowIndex).CreateCell(22); + reportModel.GetRow(rowIndex).GetCell(22).SetCellValue(itemOver.SSRAdminName); + //SSR审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(23) == null) reportModel.GetRow(rowIndex).CreateCell(23); + reportModel.GetRow(rowIndex).GetCell(23).SetCellValue(itemOver.SSRStaratDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.SSRStaratDate) : ""); + //SSR审批时间 + if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24); + reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(itemOver.SSREndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.SSREndDate) : ""); + //SSR滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(25) == null) reportModel.GetRow(rowIndex).CreateCell(25); + reportModel.GetRow(rowIndex).GetCell(25).SetCellValue(itemOver.SSRStayDays.ToString()); + //主协调员 + if (reportModel.GetRow(rowIndex).GetCell(26) == null) reportModel.GetRow(rowIndex).CreateCell(26); + reportModel.GetRow(rowIndex).GetCell(26).SetCellValue(itemOver.Main_CoordinatorName); + //主协调员审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(27) == null) reportModel.GetRow(rowIndex).CreateCell(27); + reportModel.GetRow(rowIndex).GetCell(27).SetCellValue(itemOver.MainCoordinatorStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.MainCoordinatorStartDate) : ""); + //主协调员审批时间 + if (reportModel.GetRow(rowIndex).GetCell(28) == null) reportModel.GetRow(rowIndex).CreateCell(28); + reportModel.GetRow(rowIndex).GetCell(28).SetCellValue(itemOver.MainCoordinatorEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.MainCoordinatorEndDate) : ""); + //主协调员滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(29) == null) reportModel.GetRow(rowIndex).CreateCell(29); + reportModel.GetRow(rowIndex).GetCell(29).SetCellValue(itemOver.MainCoordinatorStayDays.ToString()); + //用户部门 + if (reportModel.GetRow(rowIndex).GetCell(30) == null) reportModel.GetRow(rowIndex).CreateCell(30); + reportModel.GetRow(rowIndex).GetCell(30).SetCellValue(itemOver.UserDepName); + //用户部门审批到达时间 + if (reportModel.GetRow(rowIndex).GetCell(31) == null) reportModel.GetRow(rowIndex).CreateCell(31); + reportModel.GetRow(rowIndex).GetCell(31).SetCellValue(itemOver.UserDepStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.UserDepStartDate) : ""); + //用户部门审批时间 + if (reportModel.GetRow(rowIndex).GetCell(32) == null) reportModel.GetRow(rowIndex).CreateCell(32); + reportModel.GetRow(rowIndex).GetCell(32).SetCellValue(itemOver.UserDepEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", itemOver.UserDepEndDate) : ""); + //用户部门滞留时间 + if (reportModel.GetRow(rowIndex).GetCell(33) == null) reportModel.GetRow(rowIndex).CreateCell(33); + reportModel.GetRow(rowIndex).GetCell(33).SetCellValue(itemOver.UserDepStayDays.ToString()); + #endregion + + rowIndex++; + } + } + #endregion + reportModel.ForceFormulaRecalculation = true; + + using (FileStream filess = File.OpenWrite(ReportFileName)) + { + hssfworkbook.Write(filess); + } + FileInfo filet = new FileInfo(ReportFileName); + Response.Clear(); + Response.Charset = "GB2312"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + // 添加头信息,为"文件下载/另存为"对话框指定默认文件名 + Response.AddHeader("Content-Disposition", "attachment; filename=质量事件报告" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx")); + // 添加头信息,指定文件大小,让浏览器能够显示下载进度 + Response.AddHeader("Content-Length", filet.Length.ToString()); + // 指定返回的是一个不能被客户端读取的流,必须被下载 + Response.ContentType = "application/ms-excel"; + // 把文件流发送到客户端 + Response.WriteFile(filet.FullName); + // 停止页面的执行 + Response.End(); + } + /// + /// 根据sql获取数据 + /// + /// + /// + /// + /// + public static DataTable GetDataTableNameRunText(string strSql, string tableName = "", params SqlParameter[] parameters) + { + DataTable dataTable = string.IsNullOrEmpty(tableName) ? new DataTable() : new DataTable(tableName); + using (SqlConnection Connection = new SqlConnection(Funs.ConnString)) + { + try + { + Connection.Open(); + SqlCommand command = new SqlCommand(strSql, Connection); + command.CommandType = CommandType.Text; + if (parameters != null) + { + command.Parameters.AddRange(parameters); + } + SqlDataAdapter adapter = new SqlDataAdapter(command); + adapter.Fill(dataTable); + } + finally + { + Connection.Close(); + } + } + return dataTable; + } + #endregion + } +} diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs new file mode 100644 index 0000000..0ab1c3e --- /dev/null +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationReport.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ContractorQuality +{ + + + public partial class IncidentInvestigationReport + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtFoNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFoNo; + + /// + /// txtOriginal_WC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOriginal_WC; + + /// + /// drpSeType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSeType; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnExport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnExport; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx b/FCL/FineUIPro.Web/File/Excel/质量事件报告模板.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..44dce996c3950088d19065ccc655582f30a114f3 GIT binary patch literal 10483 zcmeHNgqNC^Zz~mgIA#JCDaYdi5&&Q+PjavfZH%` zirs_%?w&9JsiD4O4$Xp2h@^l>rbv15Y27$(S27(Nm;$Te^WC*-N~XDcnEQk3WaVo8 zv;`GDQq>xE_9s3e=WkoJaJXc!#ANp-Nfb>v7EK0W4P+%LdkU@O8OLblea}gsHNE8O zA5K;Rq)yj-AsfU@EnXV3gVighaCr^9h%y=!Uj{gj3~eR^Ek0)2QskrZ3nePmPpEj3D|Byr6pn)W9p}MlNP={rBp+gZbMNkR zG#Um`1N&}u@{lMS^ID9fhC&tYS`>5h^UeJ18Yruj!OZeN3^$B{idRh_PWIZU!I0>k z2lrEkTC|GYQ^*Al0C0DQ1km^!i$7A1SaHEw?1=;bV8K~z?q%x&;$Z)A{x5s~gDLyV zPcNGoQbOXw2YhY*DjYH2JX;|i;|+~RM?p!s0!-NW3h?$t&`zH1tCq^%+hLxu2KTLH zk#T3ZmRVMk7SQV-dun<`se#8U$}b02o_co~s(b~KdKnzE$%$p<Bepx*~$Sn2n)=(DX+Vd?OV;ecIe_zVq@x!=WBejZ>u0PGpQ)FEADLG$tG% zEVazChNmpV;}Xw>(DsBKEMki|0z^EheCZ2MQHzP2M(`xrfr-`XT&s zEt&>wv3k;}rP@YoLi9E5&z-4wWST_iFa$7OOYuENgyGSQT{BMj!58h{8P=o0%kB?n z7dt#{;=!Nrcj54J_j0y!cX$4g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IncidentInvestigationEdit.aspx + + IncidentInvestigationReport.aspx + ASPXCodeBehind + + + IncidentInvestigationReport.aspx + NoPassEdit.aspx ASPXCodeBehind diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx index 6b16ba5..240a962 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx @@ -93,7 +93,7 @@ - + @@ -102,7 +102,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 67c9115..509b68b 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.BaseInfo; using NPOI.OpenXmlFormats.Spreadsheet; using System; using System.Linq; @@ -57,7 +58,7 @@ namespace FineUIPro.Web.SES BLL.ItemService.InitDropDownList(this.drpItem, true); BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种 BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true); - BLL.TypeService.InitDropDownList(this.drpType, true); + BLL.TypeService.InitDropDownList(this.drpType, true); //合同员 this.drpContract_Admin.DataTextField = "UserName"; @@ -231,7 +232,7 @@ namespace FineUIPro.Web.SES } if (data.IfExtend.HasValue) { - if (data.IfExtend==true) + if (data.IfExtend == true) { this.drpIfExtend.SelectedValue = "True"; this.txtPreviousFO.Enabled = true; @@ -450,19 +451,40 @@ namespace FineUIPro.Web.SES Alert.ShowInTop("Please select Const.Records!", MessageBoxIcon.Warning); return; } - - if (this.drpAllocation.SelectedValue == "N") + if (drpAllocation.SelectedValue == "0") { - if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null) + Alert.ShowInTop("Please select Allocation(Y/N)!", MessageBoxIcon.Warning); + return; + } + if (this.drpAllocation.SelectedValue == "Y") + { + if (!string.IsNullOrEmpty(this.numProportion_of_FC_Definition.Text.Trim())) { - if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100) + decimal d = Funs.GetNewDecimalOrZero(this.numProportion_of_FC_Definition.Text.Trim()); + if (d <= 0 || d >= 100) { - Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning); + Alert.ShowInTop("当Allocation选择Y时,Volume Allocation必须是大于0或者小于100!", MessageBoxIcon.Warning); return; } } - + else + { + Alert.ShowInTop("Volume Allocation不能为空!", MessageBoxIcon.Warning); + return; + } } + //if (this.drpAllocation.SelectedValue == "N") + //{ + // if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null) + // { + // if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100) + // { + // Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning); + // return; + // } + // } + + //} Model.FC_SESRelatedData newData = new Model.FC_SESRelatedData(); @@ -749,5 +771,15 @@ namespace FineUIPro.Web.SES this.txtActual_Budget.Text = this.txtInitial_Budget.Text.Trim(); } } + + protected void drpAllocation_SelectedIndexChanged(object sender, EventArgs e) + { + //选择N时,current allocation 默认为100 + this.numProportion_of_FC_Definition.Text = string.Empty; + if (this.drpAllocation.SelectedValue == "N") + { + this.numProportion_of_FC_Definition.Text = "100"; + } + } } } \ No newline at end of file diff --git a/FCL/Model/Model.cs b/FCL/Model/Model.cs index fd67485..29b3122 100644 --- a/FCL/Model/Model.cs +++ b/FCL/Model/Model.cs @@ -878,6 +878,14 @@ namespace Model } } + public System.Data.Linq.Table View_EMC_PunishmentReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_EMC_Que_Punishment { get @@ -9908,6 +9916,20 @@ namespace Model private string _BuyerReson; + private System.Nullable _SSRStaratDate; + + private System.Nullable _SSREndDate; + + private System.Nullable _MainCoordinatorStartDate; + + private System.Nullable _MainCoordinatorEndDate; + + private System.Nullable _UserDepStartDate; + + private System.Nullable _UserDepEndDate; + + private string _SSRAdminId; + private EntityRef _Base_Depart; private EntityRef _Sys_User; @@ -10020,6 +10042,20 @@ namespace Model partial void OnSESReasonChanged(); partial void OnBuyerResonChanging(string value); partial void OnBuyerResonChanged(); + partial void OnSSRStaratDateChanging(System.Nullable value); + partial void OnSSRStaratDateChanged(); + partial void OnSSREndDateChanging(System.Nullable value); + partial void OnSSREndDateChanged(); + partial void OnMainCoordinatorStartDateChanging(System.Nullable value); + partial void OnMainCoordinatorStartDateChanged(); + partial void OnMainCoordinatorEndDateChanging(System.Nullable value); + partial void OnMainCoordinatorEndDateChanged(); + partial void OnUserDepStartDateChanging(System.Nullable value); + partial void OnUserDepStartDateChanged(); + partial void OnUserDepEndDateChanging(System.Nullable value); + partial void OnUserDepEndDateChanged(); + partial void OnSSRAdminIdChanging(string value); + partial void OnSSRAdminIdChanged(); #endregion public EMC_Punishment() @@ -11058,6 +11094,146 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStaratDate", DbType="DateTime")] + public System.Nullable SSRStaratDate + { + get + { + return this._SSRStaratDate; + } + set + { + if ((this._SSRStaratDate != value)) + { + this.OnSSRStaratDateChanging(value); + this.SendPropertyChanging(); + this._SSRStaratDate = value; + this.SendPropertyChanged("SSRStaratDate"); + this.OnSSRStaratDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSREndDate", DbType="DateTime")] + public System.Nullable SSREndDate + { + get + { + return this._SSREndDate; + } + set + { + if ((this._SSREndDate != value)) + { + this.OnSSREndDateChanging(value); + this.SendPropertyChanging(); + this._SSREndDate = value; + this.SendPropertyChanged("SSREndDate"); + this.OnSSREndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStartDate", DbType="DateTime")] + public System.Nullable MainCoordinatorStartDate + { + get + { + return this._MainCoordinatorStartDate; + } + set + { + if ((this._MainCoordinatorStartDate != value)) + { + this.OnMainCoordinatorStartDateChanging(value); + this.SendPropertyChanging(); + this._MainCoordinatorStartDate = value; + this.SendPropertyChanged("MainCoordinatorStartDate"); + this.OnMainCoordinatorStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorEndDate", DbType="DateTime")] + public System.Nullable MainCoordinatorEndDate + { + get + { + return this._MainCoordinatorEndDate; + } + set + { + if ((this._MainCoordinatorEndDate != value)) + { + this.OnMainCoordinatorEndDateChanging(value); + this.SendPropertyChanging(); + this._MainCoordinatorEndDate = value; + this.SendPropertyChanged("MainCoordinatorEndDate"); + this.OnMainCoordinatorEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStartDate", DbType="DateTime")] + public System.Nullable UserDepStartDate + { + get + { + return this._UserDepStartDate; + } + set + { + if ((this._UserDepStartDate != value)) + { + this.OnUserDepStartDateChanging(value); + this.SendPropertyChanging(); + this._UserDepStartDate = value; + this.SendPropertyChanged("UserDepStartDate"); + this.OnUserDepStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepEndDate", DbType="DateTime")] + public System.Nullable UserDepEndDate + { + get + { + return this._UserDepEndDate; + } + set + { + if ((this._UserDepEndDate != value)) + { + this.OnUserDepEndDateChanging(value); + this.SendPropertyChanging(); + this._UserDepEndDate = value; + this.SendPropertyChanged("UserDepEndDate"); + this.OnUserDepEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminId", DbType="NVarChar(50)")] + public string SSRAdminId + { + get + { + return this._SSRAdminId; + } + set + { + if ((this._SSRAdminId != value)) + { + this.OnSSRAdminIdChanging(value); + this.SendPropertyChanging(); + this._SSRAdminId = value; + this.SendPropertyChanged("SSRAdminId"); + this.OnSSRAdminIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EMC_Punishment_Base_Depart", Storage="_Base_Depart", ThisKey="BYC_RU", OtherKey="DepartId", IsForeignKey=true)] public Base_Depart Base_Depart { @@ -31739,6 +31915,717 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_EMC_PunishmentReport")] + public partial class View_EMC_PunishmentReport + { + + private string _PunishmentId; + + private System.Nullable _PunishDate; + + private string _FO_NO; + + private string _Original_WC; + + private string _SeType; + + private string _Contractor; + + private string _Location; + + private string _Description; + + private string _ViolationDegree; + + private string _IndividualPerson; + + private System.Nullable _Company; + + private System.Nullable _Individual; + + private string _ContractAdmin; + + private string _ContractAdminName; + + private string _SSRAdminId; + + private string _SSRAdminName; + + private System.Nullable _SSRStaratDate; + + private System.Nullable _SSREndDate; + + private System.Nullable _SSRStayDays; + + private string _Main_Coordinator; + + private string _Main_CoordinatorName; + + private string _MCDpartment; + + private System.Nullable _MainCoordinatorStartDate; + + private System.Nullable _MainCoordinatorEndDate; + + private System.Nullable _MainCoordinatorStayDays; + + private string _UserDep; + + private string _UserDepName; + + private string _DepartLeader; + + private string _DepartLeaderName; + + private System.Nullable _UserDepStartDate; + + private System.Nullable _UserDepEndDate; + + private System.Nullable _UserDepStayDays; + + private string _Violation_Inspector; + + private string _Violation_InspectorName; + + private string _Violation_InspectorDepart; + + private string _ViolationRelatedSes; + + private string _SES_No; + + private System.Nullable _CompletionDate; + + private string _States; + + public View_EMC_PunishmentReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PunishmentId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string PunishmentId + { + get + { + return this._PunishmentId; + } + set + { + if ((this._PunishmentId != value)) + { + this._PunishmentId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PunishDate", DbType="DateTime")] + public System.Nullable PunishDate + { + get + { + return this._PunishDate; + } + set + { + if ((this._PunishDate != value)) + { + this._PunishDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FO_NO", DbType="NVarChar(50)")] + public string FO_NO + { + get + { + return this._FO_NO; + } + set + { + if ((this._FO_NO != value)) + { + this._FO_NO = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Original_WC", DbType="NVarChar(50)")] + public string Original_WC + { + get + { + return this._Original_WC; + } + set + { + if ((this._Original_WC != value)) + { + this._Original_WC = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeType", DbType="VarChar(4)")] + public string SeType + { + get + { + return this._SeType; + } + set + { + if ((this._SeType != value)) + { + this._SeType = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contractor", DbType="NVarChar(150)")] + public string Contractor + { + get + { + return this._Contractor; + } + set + { + if ((this._Contractor != value)) + { + this._Contractor = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Location", DbType="NVarChar(100)")] + public string Location + { + get + { + return this._Location; + } + set + { + if ((this._Location != value)) + { + this._Location = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(500)")] + public string Description + { + get + { + return this._Description; + } + set + { + if ((this._Description != value)) + { + this._Description = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViolationDegree", DbType="VarChar(10)")] + public string ViolationDegree + { + get + { + return this._ViolationDegree; + } + set + { + if ((this._ViolationDegree != value)) + { + this._ViolationDegree = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndividualPerson", DbType="NVarChar(50)")] + public string IndividualPerson + { + get + { + return this._IndividualPerson; + } + set + { + if ((this._IndividualPerson != value)) + { + this._IndividualPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Company", DbType="Money")] + public System.Nullable Company + { + get + { + return this._Company; + } + set + { + if ((this._Company != value)) + { + this._Company = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Individual", DbType="Money")] + public System.Nullable Individual + { + get + { + return this._Individual; + } + set + { + if ((this._Individual != value)) + { + this._Individual = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractAdmin", DbType="NVarChar(50)")] + public string ContractAdmin + { + get + { + return this._ContractAdmin; + } + set + { + if ((this._ContractAdmin != value)) + { + this._ContractAdmin = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractAdminName", DbType="NVarChar(50)")] + public string ContractAdminName + { + get + { + return this._ContractAdminName; + } + set + { + if ((this._ContractAdminName != value)) + { + this._ContractAdminName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminId", DbType="NVarChar(50)")] + public string SSRAdminId + { + get + { + return this._SSRAdminId; + } + set + { + if ((this._SSRAdminId != value)) + { + this._SSRAdminId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRAdminName", DbType="NVarChar(50)")] + public string SSRAdminName + { + get + { + return this._SSRAdminName; + } + set + { + if ((this._SSRAdminName != value)) + { + this._SSRAdminName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStaratDate", DbType="DateTime")] + public System.Nullable SSRStaratDate + { + get + { + return this._SSRStaratDate; + } + set + { + if ((this._SSRStaratDate != value)) + { + this._SSRStaratDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSREndDate", DbType="DateTime")] + public System.Nullable SSREndDate + { + get + { + return this._SSREndDate; + } + set + { + if ((this._SSREndDate != value)) + { + this._SSREndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SSRStayDays", DbType="Int")] + public System.Nullable SSRStayDays + { + get + { + return this._SSRStayDays; + } + set + { + if ((this._SSRStayDays != value)) + { + this._SSRStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Main_Coordinator", DbType="NVarChar(50)")] + public string Main_Coordinator + { + get + { + return this._Main_Coordinator; + } + set + { + if ((this._Main_Coordinator != value)) + { + this._Main_Coordinator = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Main_CoordinatorName", DbType="NVarChar(50)")] + public string Main_CoordinatorName + { + get + { + return this._Main_CoordinatorName; + } + set + { + if ((this._Main_CoordinatorName != value)) + { + this._Main_CoordinatorName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MCDpartment", DbType="NVarChar(50)")] + public string MCDpartment + { + get + { + return this._MCDpartment; + } + set + { + if ((this._MCDpartment != value)) + { + this._MCDpartment = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStartDate", DbType="DateTime")] + public System.Nullable MainCoordinatorStartDate + { + get + { + return this._MainCoordinatorStartDate; + } + set + { + if ((this._MainCoordinatorStartDate != value)) + { + this._MainCoordinatorStartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorEndDate", DbType="DateTime")] + public System.Nullable MainCoordinatorEndDate + { + get + { + return this._MainCoordinatorEndDate; + } + set + { + if ((this._MainCoordinatorEndDate != value)) + { + this._MainCoordinatorEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainCoordinatorStayDays", DbType="Int")] + public System.Nullable MainCoordinatorStayDays + { + get + { + return this._MainCoordinatorStayDays; + } + set + { + if ((this._MainCoordinatorStayDays != value)) + { + this._MainCoordinatorStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDep", DbType="NVarChar(50)")] + public string UserDep + { + get + { + return this._UserDep; + } + set + { + if ((this._UserDep != value)) + { + this._UserDep = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepName", DbType="NVarChar(50)")] + public string UserDepName + { + get + { + return this._UserDepName; + } + set + { + if ((this._UserDepName != value)) + { + this._UserDepName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartLeader", DbType="NVarChar(50)")] + public string DepartLeader + { + get + { + return this._DepartLeader; + } + set + { + if ((this._DepartLeader != value)) + { + this._DepartLeader = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartLeaderName", DbType="NVarChar(50)")] + public string DepartLeaderName + { + get + { + return this._DepartLeaderName; + } + set + { + if ((this._DepartLeaderName != value)) + { + this._DepartLeaderName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStartDate", DbType="DateTime")] + public System.Nullable UserDepStartDate + { + get + { + return this._UserDepStartDate; + } + set + { + if ((this._UserDepStartDate != value)) + { + this._UserDepStartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepEndDate", DbType="DateTime")] + public System.Nullable UserDepEndDate + { + get + { + return this._UserDepEndDate; + } + set + { + if ((this._UserDepEndDate != value)) + { + this._UserDepEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserDepStayDays", DbType="Int")] + public System.Nullable UserDepStayDays + { + get + { + return this._UserDepStayDays; + } + set + { + if ((this._UserDepStayDays != value)) + { + this._UserDepStayDays = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_Inspector", DbType="NVarChar(50)")] + public string Violation_Inspector + { + get + { + return this._Violation_Inspector; + } + set + { + if ((this._Violation_Inspector != value)) + { + this._Violation_Inspector = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_InspectorName", DbType="NVarChar(50)")] + public string Violation_InspectorName + { + get + { + return this._Violation_InspectorName; + } + set + { + if ((this._Violation_InspectorName != value)) + { + this._Violation_InspectorName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Violation_InspectorDepart", DbType="NVarChar(50)")] + public string Violation_InspectorDepart + { + get + { + return this._Violation_InspectorDepart; + } + set + { + if ((this._Violation_InspectorDepart != value)) + { + this._Violation_InspectorDepart = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViolationRelatedSes", DbType="NVarChar(50)")] + public string ViolationRelatedSes + { + get + { + return this._ViolationRelatedSes; + } + set + { + if ((this._ViolationRelatedSes != value)) + { + this._ViolationRelatedSes = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SES_No", DbType="NVarChar(20)")] + public string SES_No + { + get + { + return this._SES_No; + } + set + { + if ((this._SES_No != value)) + { + this._SES_No = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDate", DbType="DateTime")] + public System.Nullable CompletionDate + { + get + { + return this._CompletionDate; + } + set + { + if ((this._CompletionDate != value)) + { + this._CompletionDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="VarChar(6) NOT NULL", CanBeNull=false)] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this._States = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_EMC_Que_Punishment")] public partial class View_EMC_Que_Punishment {