20250509 新增质量事故报告报表

This commit is contained in:
毕文静 2025-05-09 15:29:52 +08:00
parent 2245263c29
commit 1cda2d1914
11 changed files with 1608 additions and 14 deletions

View File

@ -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();
}

View File

@ -689,7 +689,7 @@ namespace FineUIPro.Web.ContractorQuality
}
else if (pun.States == "6")
{
s = "已审批";
s = "已完成";
}
else if (pun.States == "7")
{

View File

@ -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
{

View File

@ -0,0 +1,169 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentInvestigationReport.aspx.cs" Inherits="FineUIPro.Web.ContractorQuality.IncidentInvestigationReport" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>承包商及供应商质量事件报告报表</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="承包商及供应商质量事件报告报表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="PunishmentId" DataIDField="PunishmentId" EnableColumnLines="true"
ClicksToEdit="2" AllowSorting="true" SortField="PunishDate" SortDirection="DESC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox ID="txtFoNo" runat="server" Label="合同号" LabelAlign="Right"></f:TextBox>
<f:TextBox ID="txtOriginal_WC" runat="server" Label="专业类别" LabelAlign="Right"></f:TextBox>
<f:DropDownList ID="drpSeType" runat="server" Label="类型" LabelAlign="Right">
<f:ListItem Value="0" Text="-请选择-" Selected="true" />
<f:ListItem Value="1" Text="服务" />
<f:ListItem Value="2" Text="物资" />
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="查询" OnClick="btnSearch_Click"></f:Button>
<f:Button ID="btnExport" OnClick="btnExport_Click" runat="server" Text="导出" ToolTip="导出"
Icon="DoorOut" EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField Width="50px" TextAlign="Center" Locked="true" ColumnID="tfNumber" HeaderText="编号" HeaderTextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="120px" ColumnID="PunishDate" DataField="PunishDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发现日期" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="FO_NO" DataField="FO_NO"
FieldType="String" HeaderText="合同号" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Original_WC" DataField="Original_WC"
FieldType="String" HeaderText="专业类别" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SeType" DataField="SeType"
FieldType="String" HeaderText="类型" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="250px" ColumnID="Contractor" DataField="Contractor"
FieldType="String" HeaderText="承包商名称" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Location" DataField="Location"
FieldType="String" HeaderText="位置" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="280px" ColumnID="Description" DataField="Description"
FieldType="String" HeaderText="质量事件描述" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="ViolationDegree" DataField="ViolationDegree"
FieldType="String" HeaderText="违章等级" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IndividualPerson" DataField="IndividualPerson"
FieldType="String" HeaderText="违章人员" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Company" DataField="Company"
FieldType="String" HeaderText="违章扣款(公司)" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Individual" DataField="Individual"
FieldType="String" HeaderText="违章扣款(个人)" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="ContractAdminName" DataField="ContractAdminName"
FieldType="String" HeaderText="合同员" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Main_CoordinatorName" DataField="Main_CoordinatorName"
FieldType="String" HeaderText="主协调员" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="MCDpartment" DataField="MCDpartment"
FieldType="String" HeaderText="主协调员部门" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UserDepName" DataField="UserDepName"
FieldType="String" HeaderText="用户部门" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="DepartLeaderName" DataField="DepartLeaderName"
FieldType="String" HeaderText="用户部门经理" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="Violation_InspectorName" DataField="Violation_InspectorName"
FieldType="String" HeaderText="申报人" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="Violation_InspectorDepart" DataField="Violation_InspectorDepart"
FieldType="String" HeaderText="申报人部门" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="ViolationRelatedSes" DataField="ViolationRelatedSes"
FieldType="String" HeaderText="违章关联SES" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SES_No" DataField="SES_No"
FieldType="String" HeaderText="扣款SES" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="CompletionDate" DataField="CompletionDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="扣款完成时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="States" DataField="States"
FieldType="String" HeaderText="当前状态" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SSRAdminName" DataField="SSRAdminName"
FieldType="String" HeaderText="SSR管理员" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="SSRStaratDate" DataField="SSRStaratDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批到达时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SSREndDate" DataField="SSREndDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="SSRStayDays" DataField="SSRStayDays"
FieldType="String" HeaderText="SSR滞留时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Main_CoordinatorName" DataField="Main_CoordinatorName"
FieldType="String" HeaderText="主协调员" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="MainCoordinatorStartDate" DataField="MainCoordinatorStartDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批到达时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="MainCoordinatorEndDate" DataField="MainCoordinatorEndDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="MainCoordinatorStayDays" DataField="MainCoordinatorStayDays"
FieldType="String" HeaderText="主协调员滞留时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UserDepName" DataField="UserDepName"
FieldType="String" HeaderText="用户部门" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="UserDepStartDate" DataField="UserDepStartDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批到达时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UserDepEndDate" DataField="UserDepEndDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审批时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="UserDepStayDays" DataField="UserDepStayDays"
FieldType="String" HeaderText="用户部门滞留时间" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="Number of records per page:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
<script type="text/javascript">
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -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<SqlParameter> listStr = new List<SqlParameter>();
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
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
Grid1.PageIndex = e.NewPageIndex;
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// 根据sql获取数据
/// </summary>
/// <param name="strSql"></param>
/// <param name="tableName"></param>
/// <param name="parameters"></param>
/// <returns></returns>
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
}
}

View File

@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ContractorQuality
{
public partial class IncidentInvestigationReport
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtFoNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFoNo;
/// <summary>
/// txtOriginal_WC 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOriginal_WC;
/// <summary>
/// drpSeType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSeType;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnExport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnExport;
/// <summary>
/// lblNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}

View File

@ -288,6 +288,7 @@
<Content Include="common\MainSearch.aspx" />
<Content Include="ContractorQuality\IncidentInvestigation.aspx" />
<Content Include="ContractorQuality\IncidentInvestigationEdit.aspx" />
<Content Include="ContractorQuality\IncidentInvestigationReport.aspx" />
<Content Include="ContractorQuality\NoPassEdit.aspx" />
<Content Include="ContractorQuality\ReturnReason.aspx" />
<Content Include="CPT\CPTReportList.aspx" />
@ -2941,6 +2942,13 @@
<Compile Include="ContractorQuality\IncidentInvestigationEdit.aspx.designer.cs">
<DependentUpon>IncidentInvestigationEdit.aspx</DependentUpon>
</Compile>
<Compile Include="ContractorQuality\IncidentInvestigationReport.aspx.cs">
<DependentUpon>IncidentInvestigationReport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ContractorQuality\IncidentInvestigationReport.aspx.designer.cs">
<DependentUpon>IncidentInvestigationReport.aspx</DependentUpon>
</Compile>
<Compile Include="ContractorQuality\NoPassEdit.aspx.cs">
<DependentUpon>NoPassEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -93,7 +93,7 @@
<f:TextBox ID="txtContactPerson" runat="server" Label="合同联系人" LabelWidth="160px"></f:TextBox>
<f:TextBox ID="txtContract_Tel" runat="server" Label="联系方式" LabelWidth="160px">
</f:TextBox>
<f:DropDownList ID="drpAllocation" runat="server" Label="Allocation(Y/N)" LabelAlign="Right" LabelWidth="160px">
<f:DropDownList ID="drpAllocation" runat="server" Label="Allocation(Y/N)" LabelAlign="Right" LabelWidth="160px" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpAllocation_SelectedIndexChanged">
<f:ListItem Text="-请选择" Value="0" Selected="true" />
<f:ListItem Text="Y" Value="Y" />
<f:ListItem Text="N" Value="N" />
@ -102,7 +102,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="numProportion_of_FC_Definition" runat="server" Label="Current Allocation%" LabelWidth="160px" DecimalPrecision="2"></f:NumberBox>
<f:NumberBox ID="numProportion_of_FC_Definition" runat="server" Label="Current Allocation%" LabelWidth="160px" DecimalPrecision="2" Required="true" ShowRedStar="true"></f:NumberBox>
<f:NumberBox ID="txtInitial_Budget" runat="server" Label="Initial Budget" LabelWidth="160px" NoNegative="true" EnableCommas="true" AutoPostBack="true" OnTextChanged="txtInitial_Budget_TextChanged">
</f:NumberBox>

View File

@ -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";
}
}
}
}

View File

@ -878,6 +878,14 @@ namespace Model
}
}
public System.Data.Linq.Table<View_EMC_PunishmentReport> View_EMC_PunishmentReport
{
get
{
return this.GetTable<View_EMC_PunishmentReport>();
}
}
public System.Data.Linq.Table<View_EMC_Que_Punishment> View_EMC_Que_Punishment
{
get
@ -9908,6 +9916,20 @@ namespace Model
private string _BuyerReson;
private System.Nullable<System.DateTime> _SSRStaratDate;
private System.Nullable<System.DateTime> _SSREndDate;
private System.Nullable<System.DateTime> _MainCoordinatorStartDate;
private System.Nullable<System.DateTime> _MainCoordinatorEndDate;
private System.Nullable<System.DateTime> _UserDepStartDate;
private System.Nullable<System.DateTime> _UserDepEndDate;
private string _SSRAdminId;
private EntityRef<Base_Depart> _Base_Depart;
private EntityRef<Sys_User> _Sys_User;
@ -10020,6 +10042,20 @@ namespace Model
partial void OnSESReasonChanged();
partial void OnBuyerResonChanging(string value);
partial void OnBuyerResonChanged();
partial void OnSSRStaratDateChanging(System.Nullable<System.DateTime> value);
partial void OnSSRStaratDateChanged();
partial void OnSSREndDateChanging(System.Nullable<System.DateTime> value);
partial void OnSSREndDateChanged();
partial void OnMainCoordinatorStartDateChanging(System.Nullable<System.DateTime> value);
partial void OnMainCoordinatorStartDateChanged();
partial void OnMainCoordinatorEndDateChanging(System.Nullable<System.DateTime> value);
partial void OnMainCoordinatorEndDateChanged();
partial void OnUserDepStartDateChanging(System.Nullable<System.DateTime> value);
partial void OnUserDepStartDateChanged();
partial void OnUserDepEndDateChanging(System.Nullable<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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<System.DateTime> _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<decimal> _Company;
private System.Nullable<decimal> _Individual;
private string _ContractAdmin;
private string _ContractAdminName;
private string _SSRAdminId;
private string _SSRAdminName;
private System.Nullable<System.DateTime> _SSRStaratDate;
private System.Nullable<System.DateTime> _SSREndDate;
private System.Nullable<int> _SSRStayDays;
private string _Main_Coordinator;
private string _Main_CoordinatorName;
private string _MCDpartment;
private System.Nullable<System.DateTime> _MainCoordinatorStartDate;
private System.Nullable<System.DateTime> _MainCoordinatorEndDate;
private System.Nullable<int> _MainCoordinatorStayDays;
private string _UserDep;
private string _UserDepName;
private string _DepartLeader;
private string _DepartLeaderName;
private System.Nullable<System.DateTime> _UserDepStartDate;
private System.Nullable<System.DateTime> _UserDepEndDate;
private System.Nullable<int> _UserDepStayDays;
private string _Violation_Inspector;
private string _Violation_InspectorName;
private string _Violation_InspectorDepart;
private string _ViolationRelatedSes;
private string _SES_No;
private System.Nullable<System.DateTime> _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<System.DateTime> 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<decimal> 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<decimal> 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<System.DateTime> 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<System.DateTime> 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<int> 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<System.DateTime> 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<System.DateTime> 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<int> 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<System.DateTime> 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<System.DateTime> 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<int> 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<System.DateTime> 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
{