20241118 承包商质量事件调查
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentInvestigation.aspx.cs" Inherits="FineUIPro.Web.ContractorQuality.IncidentInvestigation" %>
|
||||
|
||||
<!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"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdID" runat="server"></f:HiddenField>
|
||||
<f:TextBox ID="txtFO_NO" runat="server" Label="合同号" EmptyText="输入查询条件" Width="260px" LabelAlign="Right" NextFocusControl="btnSearch"></f:TextBox>
|
||||
<%--<f:DropDownList ID="drpContractAdmin" runat="server" Label="Contract Admin" LabelWidth="140px" Width="270px" LabelAlign="Right" NextFocusControl="btnSearch"></f:DropDownList>--%>
|
||||
<f:DatePicker ID="txtPunishDate" runat="server" Label="Date" DateFormatString="yyyy-MM" DisplayType="Month" LabelWidth="80px" Width="180px" LabelAlign="Right"></f:DatePicker>
|
||||
<f:Button ID="btnSearch" Text="Search" Icon="SystemSearch" runat="server" Size="Medium" CssClass="marginr" OnClick="btnSearch_Click" />
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="增加" Text="增加" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Text="编辑" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnAudit" ToolTip="Audit" Text="Audit" Icon="Pencil" runat="server" OnClick="btnAudit_Click" >
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnDelete" ToolTip="Delete" Text="删除" Icon="Delete" ConfirmText="确定删除当前选中行?" OnClick="btnDelete_Click"
|
||||
runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnExport" OnClick="btnExport_Click" runat="server" Text="Export" ToolTip="Export" Hidden="true"
|
||||
Icon="DoorOut" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField Width="50px" TextAlign="Center" Locked="true" ColumnID="tfNumber" HeaderText="No" HeaderTextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:GroupField ColumnID="GroupField1" runat="server" HeaderText="申报人填写" HeaderTextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="100px" ColumnID="PunishDate" DataField="PunishDate"
|
||||
FieldType="Date" Renderer="Date" HeaderText="发生日期" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Location" DataField="Location"
|
||||
FieldType="String" HeaderText="位置" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="Description" DataField="Description"
|
||||
HeaderText="质量事件描述" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Contractor" DataField="Contractor"
|
||||
HeaderText="涉及承包商" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:GroupField ColumnID="GroupField2" runat="server" HeaderText="SSR管理员填写" HeaderTextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="FO_NO" DataField="FO_NO"
|
||||
FieldType="String" HeaderText="合同号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="MainCoordinatorName" DataField="MainCoordinatorName"
|
||||
HeaderText="主协调员" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MCDepName" DataField="MCDepName"
|
||||
HeaderText="主协调员所在部门" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ContractRequesterName" DataField="ContractRequesterName"
|
||||
HeaderText="合同需求人" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ContractRequesterDep" DataField="ContractRequesterDep"
|
||||
HeaderText="需求合同部门" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="UserRepresentativeName" DataField="UserRepresentativeName"
|
||||
HeaderText="用户代表" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ContractAdminName" DataField="ContractAdminName"
|
||||
HeaderText="合同管理员" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ItemNo" DataField="ItemNo"
|
||||
HeaderText="序号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:GroupField ColumnID="GroupField3" runat="server" HeaderText="主协调员填写" HeaderTextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="ClauseDef" DataField="ClauseDef"
|
||||
FieldType="String" HeaderText="违章条款" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ViolationDegree" DataField="ViolationDegree"
|
||||
FieldType="String" HeaderText="违章等级" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Company" DataField="Company"
|
||||
FieldType="String" HeaderText="违章扣款(公司)" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="IndividualPerson" DataField="IndividualPerson"
|
||||
FieldType="String" HeaderText="违章人员" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Individual" DataField="Individual"
|
||||
FieldType="String" HeaderText="违章扣款(个人)" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="UserDepName" DataField="UserDepName"
|
||||
FieldType="String" HeaderText="用户部门" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:GroupField ColumnID="GroupField4" runat="server" HeaderText="用户部门填写" HeaderTextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="ViolationRelatedSes" DataField="ViolationRelatedSes"
|
||||
FieldType="String" HeaderText="违章相关SES" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:GroupField ColumnID="GroupField5" runat="server" HeaderText="合同管理员填写" HeaderTextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="SES_No" DataField="SES_No"
|
||||
FieldType="String" HeaderText="扣款SES" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CompletionDate" DataField="CompletionDate"
|
||||
FieldType="String" HeaderText="扣款完成时间" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<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>
|
||||
<f:Window ID="Window1" Title="承包商质量事件调查" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1080px" Height="800px">
|
||||
</f:Window>
|
||||
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
Icon="BulletEdit" runat="server" Text="编辑" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="确定删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" EnablePostBack="true"
|
||||
Icon="Find" runat="server" Text="查看">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
|
||||
function renderSalary(value) {
|
||||
return F.addCommas(value.toFixed(2));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,735 @@
|
||||
using BLL;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
public partial class IncidentInvestigation : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();//权限设置
|
||||
|
||||
btnNew.OnClientClick = Window1.GetShowReference("IncidentInvestigationEdit.aspx") + "return false;";
|
||||
btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请选择一条记录!");
|
||||
btnDelete.ConfirmText = String.Format("Are you sure you want to delete the selected <b><script>{0}</script></b> rows?", Grid1.GetSelectedCountReference());
|
||||
|
||||
//var pun = from x in Funs.DB.View_EMC_Punishment
|
||||
// where x.Flag == "2" && x.Contract_AdminId != null
|
||||
// orderby x.Contract_Admin
|
||||
// select new { x.Contract_AdminId, x.Contract_Admin };
|
||||
//drpContractAdmin.DataValueField = "Contract_AdminId";
|
||||
//drpContractAdmin.DataTextField = "Contract_Admin";
|
||||
//drpContractAdmin.DataSource = pun.Distinct();
|
||||
//drpContractAdmin.DataBind();
|
||||
//Funs.FineUIPleaseSelect(drpContractAdmin);
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = string.Empty;
|
||||
//var user = BLL.Sys_ButtonPowerService.GetButtonPowerByUserId(this.CurrUser.UserId);
|
||||
strSql = @"SELECT * FROM dbo.View_EMC_PunishmentNew WHERE Flag='2' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtFO_NO.Text.Trim()))
|
||||
{
|
||||
strSql += " AND FO_NO LIKE @FO_NO";
|
||||
listStr.Add(new SqlParameter("@FO_NO", "%" + this.txtFO_NO.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtPunishDate.Text))
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(txtPunishDate.Text + "-01");
|
||||
DateTime endDate = startDate.AddMonths(1);
|
||||
strSql += " AND PunishDate >= @StartDate";
|
||||
listStr.Add(new SqlParameter("@StartDate", startDate));
|
||||
|
||||
strSql += " AND PunishDate < @EndDate";
|
||||
listStr.Add(new SqlParameter("@EndDate", endDate));
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
//for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// System.Web.UI.WebControls.LinkButton lbtnUrl = ((System.Web.UI.WebControls.LinkButton)(Grid1.Rows[i].FindControl("lbtnUrl")));
|
||||
// string url = lbtnUrl.CommandArgument.ToString();
|
||||
// if (!string.IsNullOrEmpty(url))
|
||||
// {
|
||||
// url = url.Replace('\\', '/');
|
||||
// lbtnUrl.Text = BLL.UploadAttachmentService.ShowAttachment("../", url);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string rowID = Grid1.SelectedRowID;
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(rowID);
|
||||
if (pun != null)
|
||||
{
|
||||
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
|
||||
if (this.CurrUser.UserId == pun.Violation_Inspector && pun.States == "0")//当前用户等于发起人
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else if (pun.States == "1")
|
||||
{
|
||||
if (role != null && role.RoleName.Trim() == "SSRC")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("对不起,您不是SSR,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else if (pun.States == "2")
|
||||
{
|
||||
if (pun.IsFrame == true)//合同框架
|
||||
{
|
||||
Model.FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
if (this.CurrUser.UserId == fc.Main_Coordinator)//当前用户等于主协调员
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("对不起,您不是主协调员,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.CurrUser.UserId == pun.ContractRequester)//非合同框架,当前用户等于合同需求人
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("对不起,您不是合同需求人,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pun.States == "3")//用户部门
|
||||
{
|
||||
if (pun.IsFrame == true && this.CurrUser.UserId == pun.UserDep)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("对不起,您不是用户部门,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else if (pun.States == "4")//合同管理员
|
||||
{
|
||||
if (pun.IsFrame == true && this.CurrUser.UserId == pun.ContractAdmin)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}", rowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowAlert("对不起,您不是合同管理员,不能操作!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}&view=1", rowID, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//protected void btnAudit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
// {
|
||||
// Alert.ShowInParent("Please select at least one record!");
|
||||
// return;
|
||||
// }
|
||||
// string rowID = Grid1.SelectedRowID;
|
||||
// var pun = BLL.PunishmentService.GetPunishmentById(rowID);
|
||||
// string auditMan = string.Empty;
|
||||
|
||||
// if (pun != null)
|
||||
// {
|
||||
// if (pun.IsFrame == true)
|
||||
// {
|
||||
// var fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
// string curUser = this.CurrUser.UserId; // 当前用户
|
||||
// string violationInspector = pun.Violation_Inspector; // 发起人
|
||||
// string leader = string.Empty; // 主协调员部门领导
|
||||
// string mainCoordinator = fc.Main_Coordinator;
|
||||
|
||||
// var userInfo = BLL.Sys_UserService.GetUsersByUserId(fc.Main_Coordinator);
|
||||
// if (userInfo != null)
|
||||
// {
|
||||
// var dep = BLL.DepartService.GetDepartById(userInfo.DepartId);
|
||||
// if (dep != null)
|
||||
// {
|
||||
// leader = dep.DepartLeader;
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 当前用户不是主调协员
|
||||
// if (curUser != mainCoordinator)
|
||||
// {
|
||||
// // 当前用户是主调协员部门领导 不发邮件
|
||||
// if (curUser == leader)
|
||||
// {
|
||||
// auditMan = leader;
|
||||
// }
|
||||
// else if (curUser == Const.GlyId)
|
||||
// {
|
||||
// auditMan = Const.GlyId;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("您没有审核权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else // 当前用户是主调协员
|
||||
// {
|
||||
// auditMan = mainCoordinator;
|
||||
// // 发邮件给主调协员部门领导
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 非框架合同
|
||||
// else
|
||||
// {
|
||||
// string curUser = this.CurrUser.UserId; // 当前用户
|
||||
// string violationInspector = pun.Violation_Inspector; // 发起人
|
||||
// string leader = string.Empty; // 请购人部门领导
|
||||
// string requisitioner = pun.Requisitioner; // 请购人
|
||||
|
||||
// var userInfo = BLL.Sys_UserService.GetUsersByUserId(pun.Requisitioner);
|
||||
// if (userInfo != null)
|
||||
// {
|
||||
// var dep = BLL.DepartService.GetDepartById(userInfo.DepartId);
|
||||
// if (dep != null)
|
||||
// {
|
||||
// leader = dep.DepartLeader;
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 当前用户不是请购人
|
||||
// if (curUser != requisitioner)
|
||||
// {
|
||||
// // 当前用户是请购人部门领导 不发邮件
|
||||
// if (curUser == leader)
|
||||
// {
|
||||
// auditMan = leader;
|
||||
// }
|
||||
// else if (curUser == Const.GlyId)
|
||||
// {
|
||||
// auditMan = Const.GlyId;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("您没有审核权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else // 当前用户是请购人
|
||||
// {
|
||||
// auditMan = requisitioner;
|
||||
// // 发邮件给请购人部门领导
|
||||
// }
|
||||
// }
|
||||
// if (auditMan != string.Empty)
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}&auditMan={1}&audit=audit", rowID, auditMan, "编辑 - ")));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("您没有审核权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除数据
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
private void DeleteData()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
string rowID = Grid1.SelectedRowID;
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(rowID);
|
||||
if (pun != null)
|
||||
{
|
||||
if (judgementDelete(rowID, false))
|
||||
{
|
||||
BLL.PunishmentService.DeletePunishmentById(rowID);
|
||||
}
|
||||
//if (pun.IsFrame == true)
|
||||
//{
|
||||
//var datas = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
//if (pun.IsAudit == true) // 审核后只有批准人可删除
|
||||
//{
|
||||
// if (CurrUser.UserId == pun.AuditMan)
|
||||
// {
|
||||
// if (judgementDelete(rowID, false))
|
||||
// {
|
||||
// BLL.PunishmentService.DeletePunishmentById(rowID);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("已批准!只有批准人有删除权限!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (CurrUser.UserId == datas.Main_Coordinator || CurrUser.UserId == pun.Violation_Inspector || CurrUser.UserId == Const.GlyId)
|
||||
// {
|
||||
// if (judgementDelete(rowID, false))
|
||||
// {
|
||||
// BLL.PunishmentService.DeletePunishmentById(rowID);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("只有主协调员,发起人(违章检查人)有删除权限!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
//if (pun.IsAudit == true)
|
||||
//{
|
||||
// if (CurrUser.UserId == pun.AuditMan)
|
||||
// {
|
||||
// if (judgementDelete(rowID, false))
|
||||
// {
|
||||
// BLL.PunishmentService.DeletePunishmentById(rowID);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("已批准!只有批准人有删除权限!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
//else
|
||||
//{
|
||||
// if (CurrUser.UserId == pun.Requisitioner || CurrUser.UserId == pun.Violation_Inspector || CurrUser.UserId == Const.GlyId)
|
||||
// {
|
||||
// if (judgementDelete(rowID, false))
|
||||
// {
|
||||
// BLL.PunishmentService.DeletePunishmentById(rowID);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("只有合同请购人,发起人(违章检查人)有删除权限!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "删除承包商质量事件调查");
|
||||
ShowNotify("删除成功!");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("请选择一行记录!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IncidentInvestigationEdit.aspx?punishmentId={0}&view=1", Id, "查看 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
|
||||
//drpContractAdmin.Items.Clear();
|
||||
//var pun = from x in Funs.DB.View_EMC_Punishment
|
||||
// where x.Flag == "2" && x.Contract_AdminId != null
|
||||
// orderby x.Contract_Admin
|
||||
// select new { x.Contract_AdminId, x.Contract_Admin };
|
||||
//drpContractAdmin.DataValueField = "Contract_AdminId";
|
||||
//drpContractAdmin.DataTextField = "Contract_Admin";
|
||||
//drpContractAdmin.DataSource = pun.Distinct();
|
||||
//drpContractAdmin.DataBind();
|
||||
//Funs.FineUIPleaseSelect(drpContractAdmin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#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 btnExport_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
// //模板文件
|
||||
// string TempletFileName = rootPath + "Punishment.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 FC_List
|
||||
// XSSFSheet reportModel = (XSSFSheet)hssfworkbook.GetSheet("Sheet1");
|
||||
|
||||
// IDataFormat dataformat = hssfworkbook.CreateDataFormat();
|
||||
// ICellStyle styleQfw = hssfworkbook.CreateCellStyle();
|
||||
// styleQfw.DataFormat = dataformat.GetFormat("#,##0.00");
|
||||
|
||||
// ICellStyle styleDate = hssfworkbook.CreateCellStyle();
|
||||
// styleDate.DataFormat = dataformat.GetFormat("yyyy/m/d");
|
||||
|
||||
// ICellStyle styleTime = hssfworkbook.CreateCellStyle();
|
||||
// styleTime.DataFormat = dataformat.GetFormat("yyyy/m/d HH:mm:ss");
|
||||
|
||||
// XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体
|
||||
// cs_content_Font.FontName = "等线";//字体
|
||||
// cs_content_Font.FontHeightInPoints = 10; //字体大小
|
||||
|
||||
// Grid1.PageSize = 1000000;
|
||||
// BindGrid();
|
||||
|
||||
// if (Grid1.Rows.Count() > 0)
|
||||
// {
|
||||
// for (int i = 1; i <= Grid1.Rows.Count(); i++)
|
||||
// {
|
||||
// if (reportModel.GetRow(i) == null) reportModel.CreateRow(i);
|
||||
|
||||
// #region 列赋值
|
||||
// //Date
|
||||
// if (reportModel.GetRow(i).GetCell(0) == null) reportModel.GetRow(i).CreateCell(0);
|
||||
// if (Grid1.Rows[i - 1].Values[1] != null && Grid1.Rows[i - 1].Values[1].ToString() != "")
|
||||
// {
|
||||
// DateTime date = Convert.ToDateTime(Grid1.Rows[i - 1].Values[1]);
|
||||
// reportModel.GetRow(i).GetCell(0).SetCellValue(date.ToString("yyyy/MM/dd"));
|
||||
// // reportModel.GetRow(i).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式
|
||||
// }
|
||||
|
||||
// //Time
|
||||
// if (reportModel.GetRow(i).GetCell(1) == null) reportModel.GetRow(i).CreateCell(1);
|
||||
// reportModel.GetRow(i).GetCell(1).SetCellValue(Grid1.Rows[i - 1].Values[2].ToString());
|
||||
// // Contract No.
|
||||
// if (reportModel.GetRow(i).GetCell(2) == null) reportModel.GetRow(i).CreateCell(2);
|
||||
// reportModel.GetRow(i).GetCell(2).SetCellValue(Grid1.Rows[i - 1].Values[3].ToString());
|
||||
// //是否框架合格
|
||||
// if (reportModel.GetRow(i).GetCell(3) == null) reportModel.GetRow(i).CreateCell(3);
|
||||
// reportModel.GetRow(i).GetCell(3).SetCellValue(Grid1.Rows[i - 1].Values[4].ToString() == "True" ? "是" : "否");
|
||||
|
||||
// // Discipline
|
||||
// if (reportModel.GetRow(i).GetCell(4) == null) reportModel.GetRow(i).CreateCell(4);
|
||||
// reportModel.GetRow(i).GetCell(4).SetCellValue(Grid1.Rows[i - 1].Values[5].ToString());
|
||||
// // Contractor
|
||||
// if (reportModel.GetRow(i).GetCell(5) == null) reportModel.GetRow(i).CreateCell(5);
|
||||
// reportModel.GetRow(i).GetCell(5).SetCellValue(Grid1.Rows[i - 1].Values[6].ToString());
|
||||
// // Location
|
||||
// if (reportModel.GetRow(i).GetCell(6) == null) reportModel.GetRow(i).CreateCell(6);
|
||||
// reportModel.GetRow(i).GetCell(6).SetCellValue(Grid1.Rows[i - 1].Values[7].ToString());
|
||||
// //Violation Person
|
||||
// if (reportModel.GetRow(i).GetCell(7) == null) reportModel.GetRow(i).CreateCell(7);
|
||||
// reportModel.GetRow(i).GetCell(7).SetCellValue(Grid1.Rows[i - 1].Values[8].ToString());
|
||||
// // Violation Description
|
||||
// if (reportModel.GetRow(i).GetCell(8) == null) reportModel.GetRow(i).CreateCell(8);
|
||||
// reportModel.GetRow(i).GetCell(8).SetCellValue(Grid1.Rows[i - 1].Values[9].ToString());
|
||||
// //Violation Clause
|
||||
// if (reportModel.GetRow(i).GetCell(9) == null) reportModel.GetRow(i).CreateCell(9);
|
||||
// reportModel.GetRow(i).GetCell(9).SetCellValue(Grid1.Rows[i - 1].Values[10].ToString());
|
||||
|
||||
// // Company(RMB)
|
||||
// if (reportModel.GetRow(i).GetCell(10) == null) reportModel.GetRow(i).CreateCell(10);
|
||||
// reportModel.GetRow(i).GetCell(10).SetCellValue(Grid1.Rows[i - 1].Values[11].ToString());
|
||||
// // Individual(RMB)
|
||||
// if (reportModel.GetRow(i).GetCell(11) == null) reportModel.GetRow(i).CreateCell(11);
|
||||
// reportModel.GetRow(i).GetCell(11).SetCellValue(Grid1.Rows[i - 1].Values[12].ToString());
|
||||
// // Backcharge(RMB)
|
||||
// if (reportModel.GetRow(i).GetCell(12) == null) reportModel.GetRow(i).CreateCell(12);
|
||||
// reportModel.GetRow(i).GetCell(12).SetCellValue(Grid1.Rows[i - 1].Values[13].ToString());
|
||||
|
||||
// // Violation Degree
|
||||
// if (reportModel.GetRow(i).GetCell(13) == null) reportModel.GetRow(i).CreateCell(13);
|
||||
// reportModel.GetRow(i).GetCell(13).SetCellValue(Grid1.Rows[i - 1].Values[14].ToString());
|
||||
// // Contract Admin
|
||||
// if (reportModel.GetRow(i).GetCell(14) == null) reportModel.GetRow(i).CreateCell(14);
|
||||
// reportModel.GetRow(i).GetCell(14).SetCellValue(Grid1.Rows[i - 1].Values[15].ToString());
|
||||
// // Main Coordinator
|
||||
// if (reportModel.GetRow(i).GetCell(15) == null) reportModel.GetRow(i).CreateCell(15);
|
||||
// reportModel.GetRow(i).GetCell(15).SetCellValue(Grid1.Rows[i - 1].Values[16].ToString());
|
||||
// // M.C.Dept
|
||||
// if (reportModel.GetRow(i).GetCell(16) == null) reportModel.GetRow(i).CreateCell(16);
|
||||
// reportModel.GetRow(i).GetCell(16).SetCellValue(Grid1.Rows[i - 1].Values[17].ToString());
|
||||
// // User Representative
|
||||
// if (reportModel.GetRow(i).GetCell(17) == null) reportModel.GetRow(i).CreateCell(17);
|
||||
// reportModel.GetRow(i).GetCell(17).SetCellValue(Grid1.Rows[i - 1].Values[18].ToString());
|
||||
// // BYC RU
|
||||
// if (reportModel.GetRow(i).GetCell(18) == null) reportModel.GetRow(i).CreateCell(18);
|
||||
// reportModel.GetRow(i).GetCell(18).SetCellValue(Grid1.Rows[i - 1].Values[19].ToString());
|
||||
// // Violation Inspector
|
||||
// if (reportModel.GetRow(i).GetCell(19) == null) reportModel.GetRow(i).CreateCell(19);
|
||||
// reportModel.GetRow(i).GetCell(19).SetCellValue(Grid1.Rows[i - 1].Values[20].ToString());
|
||||
// // Inspection Department
|
||||
// if (reportModel.GetRow(i).GetCell(20) == null) reportModel.GetRow(i).CreateCell(20);
|
||||
// reportModel.GetRow(i).GetCell(20).SetCellValue(Grid1.Rows[i - 1].Values[21].ToString());
|
||||
// //Requistioner
|
||||
// if (reportModel.GetRow(i).GetCell(21) == null) reportModel.GetRow(i).CreateCell(21);
|
||||
// reportModel.GetRow(i).GetCell(21).SetCellValue(Grid1.Rows[i - 1].Values[22].ToString());
|
||||
|
||||
// // Backcharge SES No.
|
||||
// if (reportModel.GetRow(i).GetCell(22) == null) reportModel.GetRow(i).CreateCell(22);
|
||||
// reportModel.GetRow(i).GetCell(22).SetCellValue(Grid1.Rows[i - 1].Values[23].ToString());
|
||||
// // Backcharge Completion Date
|
||||
// if (reportModel.GetRow(i).GetCell(23) == null) reportModel.GetRow(i).CreateCell(23);
|
||||
// if (Grid1.Rows[i - 1].Values[24] != null && Grid1.Rows[i - 1].Values[24].ToString() != "")
|
||||
// {
|
||||
// DateTime date = Convert.ToDateTime(Grid1.Rows[i - 1].Values[24]);
|
||||
// reportModel.GetRow(i).GetCell(23).SetCellValue(date.ToString("yyyy/MM/dd"));
|
||||
// // reportModel.GetRow(i).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式
|
||||
// }
|
||||
// #endregion
|
||||
// }
|
||||
// }
|
||||
// #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=CQuality_Punishment_" + 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();
|
||||
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.IncidentInvestigationMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnOut))
|
||||
//{
|
||||
// this.btnExport.Hidden = false;
|
||||
//}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
|
||||
|
||||
public partial class IncidentInvestigation
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// hdID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdID;
|
||||
|
||||
/// <summary>
|
||||
/// txtFO_NO 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtFO_NO;
|
||||
|
||||
/// <summary>
|
||||
/// txtPunishDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPunishDate;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentInvestigationEdit.aspx.cs" Inherits="FineUIPro.Web.ContractorQuality.IncidentInvestigationEdit" %>
|
||||
|
||||
<!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="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel1" Title="申报人填写" Layout="Anchor" runat="server">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtPunishDate" runat="server" Label="发现日期" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="150px"></f:DatePicker>
|
||||
<f:TextBox ID="txtLocation" runat="server" Label="位置" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtDescription" runat="server" Label="质量事件描述" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="150px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractor" runat="server" Label="涉及承包商" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
<f:Panel ID="Panel3" Width="500px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="lblAttach" runat="server" Label="相关附件上传" LabelAlign="Right" LabelWidth="150px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="上传" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel2" Title="SSR管理员填写" Layout="Anchor" runat="server">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractor2" runat="server" Label="涉及承包商" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
<f:TextBox ID="txtFO_No" runat="server" Label="合同号" LabelAlign="Right" LabelWidth="150px" AutoPostBack="true" OnTextChanged="txtText_TextChanged"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMainCoordinator" runat="server" Label="主协调员" LabelAlign="Right" LabelWidth="150px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtMCDept" runat="server" Label="主协调员所在部门" LabelAlign="Right" LabelWidth="150px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="frNoRequester" Hidden="true">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpContractRequester" runat="server" Label="合同需求人" LabelAlign="Right" LabelWidth="150px" EnableEdit="true"></f:DropDownList>
|
||||
<f:TextBox ID="txtContractRequesterDep" runat="server" Label="需求合同部门" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUserRepresentative" runat="server" Label="用户代表" LabelAlign="Right" LabelWidth="150px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpContractAdmin" runat="server" Label="合同管理员" LabelAlign="Right" LabelWidth="150px" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtItemNo" runat="server" Label="序号" LabelWidth="150px" Readonly="true"></f:TextBox>
|
||||
<f:Label ID="Label1" runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel3" Title="主协调员填写" Layout="Anchor" runat="server">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpViolationClause" runat="server" Label="违章条款" EnableEdit="true" LabelAlign="Right" LabelWidth="150px" EnableGroup="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpViolationClause_OnSelectedIndexChanged" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpViolationDegree" runat="server" Label="违章等级" LabelAlign="Right" LabelWidth="150px">
|
||||
<f:ListItem Value="1" Text="一般违章" />
|
||||
<f:ListItem Value="2" Text="严重违章" />
|
||||
<f:ListItem Value="3" Text="零容忍违章" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtCompany" runat="server" Label="违章扣款(公司)" LabelAlign="Right" LabelWidth="150px" DecimalPrecision="2" ShowRedStar="true" Required="true"></f:NumberBox>
|
||||
<f:TextBox ID="txtIndividualPerson" runat="server" Label="违章人员" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtIndividual" runat="server" Label="违章扣款(个人)" LabelAlign="Right" DecimalPrecision="2" LabelWidth="150px" ShowRedStar="true" Required="true"></f:NumberBox>
|
||||
<f:DropDownList ID="drpUserDep" runat="server" Label="用户部门" LabelAlign="Right" LabelWidth="150px" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" Width="500px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="Label2" runat="server" Label="质量调查相关附件" LabelAlign="Right" LabelWidth="150px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach2" Icon="TableCell" EnablePostBack="true" Text="上传" runat="server" OnClick="btnAttach2_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel4" Title="用户部门填写" Layout="Anchor" runat="server">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtIndividualSES" runat="server" Label="违章相关SES" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel5" Title="合同管理员填写" Layout="Anchor" runat="server">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtSES_No" runat="server" Label="扣款SES" LabelAlign="Right" LabelWidth="150px"></f:TextBox>
|
||||
<f:DatePicker ID="txtCompletionDate" runat="server" Label="扣款完成时间" LabelAlign="Right" LabelWidth="150px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GPAudit" Title="审核" Layout="Anchor" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:Form ShowBorder="false" ShowHeader="false" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rbIsPass" runat="server" Label="审核结果" LabelWidth="150px">
|
||||
<f:RadioItem Value="1" Text="通过" Selected="true" />
|
||||
<f:RadioItem Value="0" Text="拒绝" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtAuditResult" runat="server" Label="通过/拒绝描述" LabelWidth="150px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存(暂存)" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSbumit" Icon="DatabaseSave" runat="server" Text="提交" ToolTip="提交下一审核人" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSbumit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,700 @@
|
||||
using BLL;
|
||||
using NPOI.OpenXml4Net.OPC.Internal.Unmarshallers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
public partial class IncidentInvestigationEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string PunishmentId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["PunishmentId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PunishmentId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();//按钮权限
|
||||
GroupPanel2.Hidden = true;
|
||||
GroupPanel3.Hidden = true;
|
||||
GroupPanel4.Hidden = true;
|
||||
GroupPanel5.Hidden = true;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
BLL.ViolationClauseService.InitViolationClause(this.drpViolationClause, true);//违章条款
|
||||
BLL.Sys_UserService.InitUserDropDownList(this.drpUserDep, true);//用户部门
|
||||
BLL.Sys_UserService.InitUserDropDownList(this.drpContractAdmin, true);//合同管理员
|
||||
BLL.Sys_UserService.InitUserDropDownList(this.drpContractRequester, true);//合同需求人
|
||||
|
||||
this.PunishmentId = Request.Params["punishmentId"];
|
||||
if (!string.IsNullOrEmpty(this.PunishmentId))
|
||||
{
|
||||
Model.EMC_Punishment pun = BLL.PunishmentService.GetPunishmentById(this.PunishmentId);
|
||||
if (pun != null)
|
||||
{
|
||||
string view = Request.Params["view"];
|
||||
if (view == "1")
|
||||
{
|
||||
#region 查看显示
|
||||
Model.FC_SESRelatedData fcdata = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(pun.FO_NO);
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSbumit.Hidden = true;
|
||||
if (this.CurrUser.UserId == pun.Violation_Inspector)
|
||||
{
|
||||
this.GroupPanel1.Hidden = false;
|
||||
this.GroupPanel2.Hidden = true;
|
||||
this.GroupPanel3.Hidden = true;
|
||||
this.GroupPanel4.Hidden = true;
|
||||
this.GroupPanel5.Hidden = true;
|
||||
}
|
||||
else if ((fcdata != null && this.CurrUser.UserId == fcdata.Main_Coordinator) || this.CurrUser.UserId == pun.ContractRequester)
|
||||
{
|
||||
this.GroupPanel1.Hidden = false;
|
||||
this.GroupPanel2.Hidden = false;
|
||||
this.GroupPanel3.Hidden = false;
|
||||
this.GroupPanel4.Hidden = true;
|
||||
this.GroupPanel5.Hidden = true;
|
||||
this.GPAudit.Hidden = false;
|
||||
if (pun.IsFrame == true)
|
||||
{
|
||||
frNoRequester.Hidden = true;
|
||||
txtUserRepresentative.Hidden = true;
|
||||
txtMainCoordinator.Hidden = false;
|
||||
txtMCDept.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
frNoRequester.Hidden = false;
|
||||
txtUserRepresentative.Hidden = false;
|
||||
txtMainCoordinator.Hidden = true;
|
||||
txtMCDept.Hidden = true;
|
||||
}
|
||||
}
|
||||
else if (this.CurrUser.UserId == pun.UserDep && pun.IsFrame == true)
|
||||
{
|
||||
this.GroupPanel1.Hidden = false;
|
||||
this.GroupPanel2.Hidden = false;
|
||||
this.GroupPanel3.Hidden = false;
|
||||
this.GroupPanel4.Hidden = false;
|
||||
this.GroupPanel5.Hidden = true;
|
||||
}
|
||||
else if (this.CurrUser.UserId == pun.ContractAdmin && pun.IsFrame == true)
|
||||
{
|
||||
this.GroupPanel1.Hidden = false;
|
||||
this.GroupPanel2.Hidden = false;
|
||||
this.GroupPanel3.Hidden = false;
|
||||
this.GroupPanel4.Hidden = false;
|
||||
this.GroupPanel5.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
|
||||
if (role != null)
|
||||
{
|
||||
if (role.RoleName.Trim() == "SSRC")//申请人已提交、SSR办理
|
||||
{
|
||||
this.GroupPanel1.Hidden = false;
|
||||
this.GroupPanel2.Hidden = false;
|
||||
this.GroupPanel3.Hidden = true;
|
||||
this.GroupPanel4.Hidden = true;
|
||||
this.GroupPanel5.Hidden = true;
|
||||
if (pun.IsFrame == true)//框架合同
|
||||
{
|
||||
this.txtMainCoordinator.Hidden = false;
|
||||
this.txtMainCoordinator.Required = true;
|
||||
this.txtMainCoordinator.ShowRedStar = true;
|
||||
this.txtMCDept.Hidden = false;
|
||||
this.txtMCDept.Required = true;
|
||||
this.txtMCDept.ShowRedStar = true;
|
||||
this.txtUserRepresentative.Hidden = false;
|
||||
this.txtUserRepresentative.Required = true;
|
||||
this.txtUserRepresentative.ShowRedStar = true;
|
||||
frNoRequester.Hidden = true;
|
||||
this.txtItemNo.Hidden = false;
|
||||
|
||||
}
|
||||
else //非框架合同
|
||||
{
|
||||
this.txtMainCoordinator.Hidden = true;
|
||||
this.txtMCDept.Hidden = true;
|
||||
this.txtUserRepresentative.Hidden = true;
|
||||
frNoRequester.Hidden = false;
|
||||
this.drpContractRequester.Required = true;
|
||||
this.drpContractRequester.ShowRedStar = true;
|
||||
this.txtContractRequesterDep.Required = true;
|
||||
this.txtContractRequesterDep.ShowRedStar = true;
|
||||
this.drpContractAdmin.Required = true;
|
||||
this.drpContractAdmin.ShowRedStar = true;
|
||||
this.txtItemNo.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
#region 操作显示
|
||||
if (pun.States == "1")
|
||||
{
|
||||
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
|
||||
if (role != null)
|
||||
{
|
||||
if (role.RoleName.Trim() == "SSRC")//申请人已提交、SSR办理
|
||||
{
|
||||
GroupPanel1.Enabled = false;
|
||||
GroupPanel2.Hidden = false;
|
||||
this.txtContractor.Hidden = true;
|
||||
this.txtContractor2.Required = true;
|
||||
this.txtContractor2.ShowRedStar = true;
|
||||
this.txtFO_No.Required = true;
|
||||
this.txtFO_No.ShowRedStar = true;
|
||||
if (!string.IsNullOrEmpty(this.txtContractor.Text))
|
||||
{
|
||||
this.txtContractor2.Text = this.txtContractor.Text;
|
||||
}
|
||||
if (pun.IsFrame == true)//框架合同
|
||||
{
|
||||
this.txtMainCoordinator.Hidden = false;
|
||||
this.txtMainCoordinator.Required = true;
|
||||
this.txtMainCoordinator.ShowRedStar = true;
|
||||
this.txtMCDept.Hidden = false;
|
||||
this.txtMCDept.Required = true;
|
||||
this.txtMCDept.ShowRedStar = true;
|
||||
this.txtUserRepresentative.Hidden = false;
|
||||
this.txtUserRepresentative.Required = true;
|
||||
this.txtUserRepresentative.ShowRedStar = true;
|
||||
frNoRequester.Hidden = true;
|
||||
this.txtItemNo.Hidden = false;
|
||||
|
||||
}
|
||||
else //非框架合同
|
||||
{
|
||||
this.txtMainCoordinator.Hidden = true;
|
||||
this.txtMCDept.Hidden = true;
|
||||
this.txtUserRepresentative.Hidden = true;
|
||||
frNoRequester.Hidden = false;
|
||||
this.drpContractRequester.Required = true;
|
||||
this.drpContractRequester.ShowRedStar = true;
|
||||
this.txtContractRequesterDep.Required = true;
|
||||
this.txtContractRequesterDep.ShowRedStar = true;
|
||||
this.drpContractAdmin.Required = true;
|
||||
this.drpContractAdmin.ShowRedStar = true;
|
||||
this.txtItemNo.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pun.States == "2") //框架合同:主协调员办理,非框架合同:需求人办理
|
||||
{
|
||||
GroupPanel1.Enabled = false;
|
||||
GroupPanel2.Hidden = false;
|
||||
GroupPanel2.Enabled = false;
|
||||
GroupPanel3.Hidden = false;
|
||||
this.GPAudit.Hidden = false;
|
||||
this.drpViolationClause.Required = true;
|
||||
this.drpViolationClause.ShowRedStar = true;
|
||||
this.drpViolationDegree.Required = true;
|
||||
this.drpViolationDegree.ShowRedStar = true;
|
||||
this.txtCompany.Required = true;
|
||||
this.txtCompany.ShowRedStar = true;
|
||||
this.txtIndividual.Required = true;
|
||||
this.txtIndividual.ShowRedStar = true;
|
||||
if (pun.IsFrame == true)//框架合同
|
||||
{
|
||||
this.drpUserDep.Required = true;
|
||||
this.drpUserDep.ShowRedStar = true;
|
||||
GroupPanel3.Title = "主协调员填写";
|
||||
//this.GPAudit.Hidden = false;
|
||||
}
|
||||
else //非框架合同
|
||||
{
|
||||
txtMainCoordinator.Hidden = true;
|
||||
txtMCDept.Hidden = true;
|
||||
this.txtItemNo.Hidden = true;
|
||||
frNoRequester.Hidden = false;
|
||||
txtUserRepresentative.Hidden = true;
|
||||
this.drpUserDep.Required = false;
|
||||
this.drpUserDep.ShowRedStar = false;
|
||||
this.drpUserDep.Hidden = true;
|
||||
GroupPanel3.Title = "合同需求人填写";
|
||||
}
|
||||
}
|
||||
else if (pun.States == "3")//用户部门填写
|
||||
{
|
||||
GroupPanel1.Enabled = false;
|
||||
GroupPanel2.Hidden = false;
|
||||
GroupPanel2.Enabled = false;
|
||||
GroupPanel3.Enabled = false;
|
||||
GroupPanel3.Hidden = false;
|
||||
GroupPanel4.Hidden = false;
|
||||
}
|
||||
else if (pun.States == "4")//合同管理员填写
|
||||
{
|
||||
GroupPanel1.Enabled = false;
|
||||
GroupPanel2.Hidden = false;
|
||||
GroupPanel2.Enabled = false;
|
||||
GroupPanel3.Enabled = false;
|
||||
GroupPanel3.Hidden = false;
|
||||
GroupPanel4.Hidden = false;
|
||||
GroupPanel4.Enabled = false;
|
||||
GroupPanel5.Hidden = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region 赋值
|
||||
this.hdId.Text = this.PunishmentId;
|
||||
this.txtPunishDate.Text = pun.PunishDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pun.PunishDate) : "";
|
||||
this.txtLocation.Text = pun.Location;
|
||||
this.txtDescription.Text = pun.Description;
|
||||
this.txtContractor.Text = pun.Contractor;
|
||||
if (!string.IsNullOrEmpty(this.txtContractor.Text))
|
||||
{
|
||||
this.txtContractor2.Text = this.txtContractor.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtContractor2.Text = pun.Contractor;
|
||||
}
|
||||
this.txtFO_No.Text = pun.FO_NO;
|
||||
Model.View_FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataViewByFO(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
txtMainCoordinator.Text = fc.Main_Coordinator;
|
||||
txtMCDept.Text = fc.MCDept;
|
||||
txtUserRepresentative.Text = fc.User_Representative;
|
||||
//this.drpContractAdmin.SelectedValue = fc.Contract_Admin;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pun.ContractAdmin))
|
||||
{
|
||||
this.drpContractAdmin.SelectedValue = pun.ContractAdmin;
|
||||
}
|
||||
this.txtItemNo.Text = pun.ItemNo;
|
||||
if (!string.IsNullOrEmpty(pun.ContractRequester))
|
||||
{
|
||||
this.drpContractRequester.SelectedValue = pun.ContractRequester;
|
||||
}
|
||||
this.txtContractRequesterDep.Text = pun.ContractRequesterDep;
|
||||
if (!string.IsNullOrEmpty(pun.ViolationClauseId))
|
||||
{
|
||||
this.drpViolationClause.SelectedValue = pun.ViolationClauseId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pun.ViolationDegree))
|
||||
{
|
||||
this.drpViolationDegree.SelectedValue = pun.ViolationDegree;
|
||||
}
|
||||
this.txtCompany.Text = pun.Company.HasValue ? pun.Company.ToString() : "";
|
||||
this.txtIndividualPerson.Text = pun.IndividualPerson;
|
||||
this.txtIndividual.Text = pun.Individual.HasValue ? pun.Individual.ToString() : "";
|
||||
if (!string.IsNullOrEmpty(pun.UserDep))
|
||||
{
|
||||
this.drpUserDep.SelectedValue = pun.UserDep;
|
||||
}
|
||||
this.txtIndividualSES.Text = pun.ViolationRelatedSes;
|
||||
this.txtSES_No.Text = pun.SES_No;
|
||||
this.txtCompletionDate.Text = pun.CompletionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pun.CompletionDate) : "";
|
||||
this.rbIsPass.SelectedValue = pun.IsPass.HasValue && pun.IsPass == true ? "1" : "0";
|
||||
this.txtAuditResult.Text = pun.AuditResult;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtPunishDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存、提交
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveMethod(BLL.Const.BtnSave);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSbumit_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveMethod(BLL.Const.BtnSubmit);
|
||||
}
|
||||
|
||||
private void SaveMethod(string type)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.PunishmentId))
|
||||
{
|
||||
var pun = BLL.PunishmentService.GetPunishmentById(this.PunishmentId);
|
||||
if (pun != null)
|
||||
{
|
||||
if (pun.States == "1")//SSR办理
|
||||
{
|
||||
pun.Contractor = this.txtContractor2.Text.Trim();
|
||||
pun.FO_NO = this.txtFO_No.Text.Trim();
|
||||
Model.View_FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataViewByFO(pun.FO_NO);
|
||||
if (fc != null)
|
||||
{
|
||||
pun.ItemNo = this.txtItemNo.Text.Trim();
|
||||
pun.IsFrame = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//非框架合同
|
||||
pun.IsFrame = false;
|
||||
if (this.drpContractRequester.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pun.ContractRequester = this.drpContractRequester.SelectedValue;
|
||||
}
|
||||
pun.ContractRequesterDep = this.txtContractRequesterDep.Text.Trim();
|
||||
}
|
||||
if (this.drpContractAdmin.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pun.ContractAdmin = this.drpContractAdmin.SelectedValue;
|
||||
}
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "2";//SSR已提交
|
||||
}
|
||||
else
|
||||
{
|
||||
pun.States = "1";//SSR保存未提交
|
||||
}
|
||||
}
|
||||
else if (pun.States == "2")
|
||||
{
|
||||
pun.ViolationClauseId = this.drpViolationClause.SelectedValue;
|
||||
pun.ViolationDegree = this.drpViolationDegree.SelectedValue;
|
||||
pun.Company = Funs.GetNewDecimal(this.txtCompany.Text.Trim());
|
||||
pun.IndividualPerson = this.txtIndividualPerson.Text.Trim();
|
||||
pun.Individual = Funs.GetNewDecimal(this.txtIndividual.Text.Trim());
|
||||
if (rbIsPass.SelectedValue == "1")
|
||||
{
|
||||
pun.IsPass = true;
|
||||
//pun.States = "3";//主协调员已通过并提交
|
||||
}
|
||||
else
|
||||
{
|
||||
pun.IsPass = false;
|
||||
//pun.States = "0";//拒绝并打回 系统通知所有人
|
||||
}
|
||||
pun.AuditResult = txtAuditResult.Text.Trim();
|
||||
if (pun.IsFrame == true)//框架合同
|
||||
{
|
||||
if (this.drpUserDep.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pun.UserDep = this.drpUserDep.SelectedValue;
|
||||
}
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "3";//主协调员提交
|
||||
}
|
||||
}
|
||||
else //非框架合同
|
||||
{
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "5";//合同需求人已提交
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pun.States == "3")//用户部门提交
|
||||
{
|
||||
pun.ViolationRelatedSes = this.txtIndividualSES.Text.Trim();
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "4";//用户部门提交
|
||||
}
|
||||
}
|
||||
else if (pun.States == "4")//合同管理员
|
||||
{
|
||||
pun.SES_No = this.txtSES_No.Text.Trim();
|
||||
pun.CompletionDate = Funs.GetNewDateTime(this.txtCompletionDate.Text);
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "5";//合同管理员已提交
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pun.PunishDate = Funs.GetNewDateTime(this.txtPunishDate.Text);
|
||||
pun.Location = this.txtLocation.Text.Trim();
|
||||
pun.Description = this.txtDescription.Text.Trim();
|
||||
pun.Contractor = this.txtContractor.Text.Trim();
|
||||
pun.Flag = "2";//质量
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
pun.States = "1";//申请人已提交
|
||||
}
|
||||
else
|
||||
{
|
||||
pun.States = "0";//申请人未提交
|
||||
}
|
||||
}
|
||||
}
|
||||
pun.PunishmentId = this.PunishmentId;
|
||||
var att = from x in Funs.DB.AttachFile where x.ToKeyId == this.PunishmentId select x;
|
||||
if (att.Count() > 0)
|
||||
{
|
||||
pun.AttachUrl = att.First().AttachUrl;
|
||||
}
|
||||
BLL.PunishmentService.UpdatePunishment(pun);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "修改承包商质量事件调查");
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.EMC_Punishment punishment = new Model.EMC_Punishment();
|
||||
punishment.PunishDate = Funs.GetNewDateTime(this.txtPunishDate.Text);
|
||||
punishment.Location = this.txtLocation.Text.Trim();
|
||||
punishment.Description = this.txtDescription.Text.Trim();
|
||||
punishment.Contractor = this.txtContractor.Text.Trim();
|
||||
punishment.Flag = "2";//质量
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
punishment.States = "1";//申请人已提交
|
||||
}
|
||||
else
|
||||
{
|
||||
punishment.States = "0";//申请人未提交
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
punishment.PunishmentId = this.hdId.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
punishment.PunishmentId = SQLHelper.GetNewID(typeof(Model.EMC_Punishment));
|
||||
this.hdId.Text = punishment.PunishmentId;
|
||||
}
|
||||
var att = from x in Funs.DB.AttachFile where x.ToKeyId == punishment.PunishmentId select x;
|
||||
if (att.Count() > 0)
|
||||
{
|
||||
punishment.AttachUrl = att.First().AttachUrl;
|
||||
}
|
||||
punishment.Violation_Inspector = this.CurrUser.UserId;//发起人
|
||||
punishment.CreateDate = DateTime.Now;
|
||||
BLL.PunishmentService.AddPunishment(punishment);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "增加承包商质量事件调查");
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 文本框、下拉框事件
|
||||
/// <summary>
|
||||
/// 合同号改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(txtFO_No.Text))
|
||||
{
|
||||
string foNO = txtFO_No.Text.Trim();
|
||||
Model.View_FC_SESRelatedData fc = BLL.SESRelatedDataService.GetSESRelatedDataViewByFO(foNO);
|
||||
if (fc != null)
|
||||
{
|
||||
this.drpContractAdmin.SelectedIndex = 0;
|
||||
this.drpContractRequester.SelectedIndex = 0;
|
||||
this.txtContractRequesterDep.Text = string.Empty;
|
||||
|
||||
this.drpContractRequester.Required = false;
|
||||
this.drpContractRequester.ShowRedStar = false;
|
||||
this.txtContractRequesterDep.Required = false;
|
||||
this.txtContractRequesterDep.ShowRedStar = false;
|
||||
|
||||
this.frNoRequester.Hidden = true;
|
||||
|
||||
this.txtMainCoordinator.Hidden = false;
|
||||
this.txtMCDept.Hidden = false;
|
||||
this.txtUserRepresentative.Hidden = false;
|
||||
this.txtItemNo.Hidden = false;
|
||||
|
||||
this.txtMainCoordinator.Required = true;
|
||||
this.txtMainCoordinator.ShowRedStar = true;
|
||||
this.txtMCDept.Required = true;
|
||||
this.txtMCDept.ShowRedStar = true;
|
||||
this.txtUserRepresentative.Required = true;
|
||||
this.txtUserRepresentative.ShowRedStar = true;
|
||||
|
||||
if (string.IsNullOrEmpty(this.txtContractor.Text))
|
||||
{
|
||||
txtContractor2.Text = fc.Contractor;
|
||||
}
|
||||
txtMainCoordinator.Text = fc.Main_Coordinator;
|
||||
txtMCDept.Text = fc.MCDept;
|
||||
txtUserRepresentative.Text = fc.User_Representative;
|
||||
this.drpContractAdmin.SelectedValue = fc.Contract_AdminId;
|
||||
|
||||
// 序号
|
||||
var pun = from x in Funs.DB.EMC_Punishment where x.FO_NO == foNO && x.Flag == "2" select x;
|
||||
if (pun.Count() == 0)
|
||||
{
|
||||
txtItemNo.Text = "001";
|
||||
}
|
||||
else
|
||||
{
|
||||
var max = pun.Max(x => x.ItemNo);
|
||||
if (!string.IsNullOrEmpty(max))
|
||||
{
|
||||
int maxNo = Convert.ToInt32(max) + 1;
|
||||
txtItemNo.Text = "00" + maxNo.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtItemNo.Text = "001";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtMainCoordinator.Text = string.Empty;
|
||||
this.txtMCDept.Text = string.Empty;
|
||||
this.txtUserRepresentative.Text = string.Empty;
|
||||
this.drpContractAdmin.SelectedIndex = 0;
|
||||
this.txtItemNo.Text = string.Empty;
|
||||
|
||||
this.txtMainCoordinator.Required = false;
|
||||
this.txtMainCoordinator.ShowRedStar = false;
|
||||
this.txtMCDept.Required = false;
|
||||
this.txtMCDept.ShowRedStar = false;
|
||||
this.txtUserRepresentative.Required = false;
|
||||
this.txtUserRepresentative.ShowRedStar = false;
|
||||
this.drpContractAdmin.Required = false;
|
||||
this.drpContractAdmin.ShowRedStar = false;
|
||||
|
||||
txtMainCoordinator.Hidden = true;
|
||||
txtMCDept.Hidden = true;
|
||||
txtUserRepresentative.Hidden = true;
|
||||
this.txtItemNo.Hidden = true;
|
||||
|
||||
frNoRequester.Hidden = false;
|
||||
|
||||
this.drpContractRequester.Required = true;
|
||||
this.drpContractRequester.ShowRedStar = true;
|
||||
this.txtContractRequesterDep.Required = true;
|
||||
this.txtContractRequesterDep.ShowRedStar = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 违章条款下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpViolationClause_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (drpViolationClause.SelectedValue != Const._Null)
|
||||
{
|
||||
var vio = BLL.ViolationClauseService.GetViolationClause(drpViolationClause.SelectedValue);
|
||||
if (vio.DeductionComPany1 != 0)
|
||||
{
|
||||
drpViolationDegree.SelectedValue = "1";
|
||||
txtCompany.Text = vio.DeductionComPany1.ToString();
|
||||
txtIndividual.Text = vio.DeductionIndividual1.ToString();
|
||||
//txtBackcharge.Text = (vio.DeductionComPany1 + vio.DeductionIndividual1).ToString();
|
||||
}
|
||||
if (vio.DeductionComPany2 != 0)
|
||||
{
|
||||
drpViolationDegree.SelectedValue = "2";
|
||||
txtCompany.Text = vio.DeductionComPany2.ToString();
|
||||
txtIndividual.Text = vio.DeductionIndividual2.ToString();
|
||||
////txtBackcharge.Text = (vio.DeductionComPany2 + vio.DeductionIndividual2).ToString();
|
||||
}
|
||||
if (vio.DeductionComPany3 != 0)
|
||||
{
|
||||
drpViolationDegree.SelectedValue = "3";
|
||||
txtCompany.Text = vio.DeductionComPany3.ToString();
|
||||
txtIndividual.Text = vio.DeductionIndividual3.ToString();
|
||||
//txtBackcharge.Text = (vio.DeductionComPany2 + vio.DeductionIndividual3).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 相关附件上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
|
||||
{
|
||||
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment));
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量调查相关附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
|
||||
{
|
||||
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment));
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.IncidentInvestigationMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSubmit))
|
||||
{
|
||||
this.btnSbumit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+440
@@ -0,0 +1,440 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
|
||||
|
||||
public partial class IncidentInvestigationEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// txtPunishDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPunishDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtLocation 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtLocation;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescription 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDescription;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractor 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractor;
|
||||
|
||||
/// <summary>
|
||||
/// Panel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel3;
|
||||
|
||||
/// <summary>
|
||||
/// lblAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblAttach;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel2;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractor2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractor2;
|
||||
|
||||
/// <summary>
|
||||
/// txtFO_No 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtFO_No;
|
||||
|
||||
/// <summary>
|
||||
/// txtMainCoordinator 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMainCoordinator;
|
||||
|
||||
/// <summary>
|
||||
/// txtMCDept 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMCDept;
|
||||
|
||||
/// <summary>
|
||||
/// frNoRequester 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow frNoRequester;
|
||||
|
||||
/// <summary>
|
||||
/// drpContractRequester 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpContractRequester;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractRequesterDep 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractRequesterDep;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserRepresentative 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserRepresentative;
|
||||
|
||||
/// <summary>
|
||||
/// drpContractAdmin 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpContractAdmin;
|
||||
|
||||
/// <summary>
|
||||
/// txtItemNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtItemNo;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// drpViolationClause 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpViolationClause;
|
||||
|
||||
/// <summary>
|
||||
/// drpViolationDegree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpViolationDegree;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompany 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtCompany;
|
||||
|
||||
/// <summary>
|
||||
/// txtIndividualPerson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIndividualPerson;
|
||||
|
||||
/// <summary>
|
||||
/// txtIndividual 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtIndividual;
|
||||
|
||||
/// <summary>
|
||||
/// drpUserDep 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUserDep;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach2;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel4;
|
||||
|
||||
/// <summary>
|
||||
/// txtIndividualSES 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIndividualSES;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel5;
|
||||
|
||||
/// <summary>
|
||||
/// txtSES_No 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSES_No;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompletionDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompletionDate;
|
||||
|
||||
/// <summary>
|
||||
/// GPAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GPAudit;
|
||||
|
||||
/// <summary>
|
||||
/// rbIsPass 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbIsPass;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuditResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAuditResult;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdId;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSbumit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSbumit;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user