This commit is contained in:
2024-06-04 14:03:46 +08:00
parent d2af9745a6
commit 3bdc613bac
53 changed files with 2919 additions and 239 deletions
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -21,6 +21,8 @@
<f:RenderField Width="150px" ColumnID="FileType" DataField="FileType"
FieldType="String" HeaderText="File Type" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderCheckField Width="90px" ColumnID="IsExport" DataField="IsExport" HeaderText="是否导出" EnableColumnEdit="false">
</f:RenderCheckField>
<f:RenderField Width="300px" ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="Remark" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
@@ -47,9 +49,10 @@
<f:HiddenField ID="hfFormID" runat="server">
</f:HiddenField>
<f:TextBox ID="txtFileType" Label="File Type" ShowRedStar="true" Required="true"
runat="server" LabelAlign="right" LabelWidth="120px">
runat="server" LabelAlign="right" LabelWidth="100px" >
</f:TextBox>
<f:TextArea ID="txtRemark" Label="Remark" runat="server" LabelAlign="Right" MaxLength="500" LabelWidth="120px"></f:TextArea>
<f:CheckBox ID="cbIsExport" Checked="true" Label="报表导出" runat="server" LabelAlign="Right" LabelWidth="100px"/>
<f:TextArea ID="txtRemark" Label="Remark" runat="server" LabelAlign="Right" MaxLength="500" LabelWidth="100px"></f:TextArea>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
+13 -2
View File
@@ -133,6 +133,15 @@ namespace FineUIPro.Web.BaseInfo
{
this.txtFileType.Text = fileType.FileType;
this.txtRemark.Text = fileType.Remark;
if (fileType.IsExport == true)
{
cbIsExport.Checked = true;
}
else
{
cbIsExport.Checked = false;
}
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
}
@@ -152,8 +161,9 @@ namespace FineUIPro.Web.BaseInfo
{
Model.Base_FileType fileType = new Model.Base_FileType
{
FileType=this.txtFileType.Text.Trim(),
Remark = this.txtRemark.Text.Trim()
FileType = this.txtFileType.Text.Trim(),
Remark = this.txtRemark.Text.Trim(),
IsExport = cbIsExport.Checked
};
if (string.IsNullOrEmpty(strRowID))
{
@@ -222,6 +232,7 @@ namespace FineUIPro.Web.BaseInfo
this.hfFormID.Text = string.Empty;
this.txtFileType.Text = string.Empty;
this.txtRemark.Text = string.Empty;
cbIsExport.Checked = false;
this.btnDelete.Enabled = false;
}
#endregion
+34 -23
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo {
public partial class FileType {
namespace FineUIPro.Web.BaseInfo
{
public partial class FileType
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// hfFormID 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hfFormID;
/// <summary>
/// txtFileType 控件。
/// </summary>
@@ -101,7 +103,16 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFileType;
/// <summary>
/// cbIsExport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsExport;
/// <summary>
/// txtRemark 控件。
/// </summary>
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnDelete 控件。
/// </summary>
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -147,7 +147,7 @@ namespace FineUIPro.Web.Evaluation
// 过期提示,30天范围
var foList = from x in Funs.DB.FC_SESRelatedData
where x.Expire_Date != null
&& x.Expire_Date.Value.AddMonths(-6).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-6).AddDays(-7).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.Date >= DateTime.Now.Date
select x;
if (foList.Count() > 0)
@@ -1804,8 +1804,8 @@ namespace FineUIPro.Web.Evaluation
percent = 0;
url = "";
List<Model.View_EMC_Punishment> punishList = (from x in Funs.DB.View_EMC_Punishment where x.Flag == "1" select x).ToList();
List<Model.View_FC_ContractManagement> cmList = (from x in Funs.DB.View_FC_ContractManagement orderby x.FO_NO, x.FileType select x).ToList();
List<Model.View_FC_Contractor> conList = (from x in Funs.DB.View_FC_Contractor orderby x.Contractor, x.Expire_Date select x).ToList();
List<Model.View_FC_ContractManagement> cmList = (from x in Funs.DB.View_FC_ContractManagement where x.IsExport==true orderby x.FO_NO, x.FileType select x).ToList();
List<Model.View_FC_Contractor> conList = (from x in Funs.DB.View_FC_Contractor where x.FC_Status=="Valid" || x.FC_Status == "Expired Soon" orderby x.Contractor, x.Expire_Date select x).ToList();
List<Model.FC_OverviewReport> overviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == false orderby x.ReportMonth, x.FO_NO select x).ToList();
List<Model.FC_OverviewReport> safeOverviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == true orderby x.ReportMonth, x.FO_NO select x).ToList();
List<Model.FC_NoEvaluatedUser> noEvaluatedUser= (from x in Funs.DB.FC_NoEvaluatedUser orderby x.ReportMonth, x.IsSafe select x).ToList();
@@ -1820,8 +1820,8 @@ namespace FineUIPro.Web.Evaluation
percent = 0;
url = "";
List<Model.View_EMC_Punishment> punishList = (from x in Funs.DB.View_EMC_Punishment where x.Flag == "1" select x).ToList();
List<Model.View_FC_ContractManagement> cmList = (from x in Funs.DB.View_FC_ContractManagement orderby x.FO_NO, x.FileType select x).ToList();
List<Model.View_FC_Contractor> conList = (from x in Funs.DB.View_FC_Contractor orderby x.Contractor, x.Expire_Date select x).ToList();
List<Model.View_FC_ContractManagement> cmList = (from x in Funs.DB.View_FC_ContractManagement where x.IsExport == true orderby x.FO_NO, x.FileType select x).ToList();
List<Model.View_FC_Contractor> conList = (from x in Funs.DB.View_FC_Contractor where x.FC_Status == "Valid" || x.FC_Status == "Expired Soon" orderby x.Contractor, x.Expire_Date select x).ToList();
List<Model.FC_OverviewReport> overviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == false orderby x.ReportMonth, x.FO_NO select x).ToList();
List<Model.FC_OverviewReport> safeOverviewReport = (from x in Funs.DB.FC_OverviewReport where x.IsSafe == true orderby x.ReportMonth, x.FO_NO select x).ToList();
List<Model.FC_NoEvaluatedUser> noEvaluatedUser = (from x in Funs.DB.FC_NoEvaluatedUser orderby x.ReportMonth, x.IsSafe select x).ToList();
@@ -1849,7 +1849,7 @@ namespace FineUIPro.Web.Evaluation
{
Directory.CreateDirectory(filePath);
}
string ReportFileName = filePath + "Performance Report_CN" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
string ReportFileName = filePath + "承包商现场绩效评估报告" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
@@ -2131,7 +2131,7 @@ namespace FineUIPro.Web.Evaluation
XSSFSheet wss = (XSSFSheet)hssfworkbook.GetSheet("非安全监护框架承包商绩效");
if (overviewCount > 0)
{
var rowIndex = 2;
var rowIndex = 1;
foreach(var vs in OverviewReport)
{
if (wss.GetRow(rowIndex) == null) wss.CreateRow(rowIndex);
@@ -2241,7 +2241,7 @@ namespace FineUIPro.Web.Evaluation
XSSFSheet wssafe = (XSSFSheet)hssfworkbook.GetSheet("安全监护框架承包商绩效");
if (safeOverviewCount > 0)
{
var rowIndex = 2;
var rowIndex = 1;
foreach (var vs in safeOverviewReport)
{
if (wssafe.GetRow(rowIndex) == null) wssafe.CreateRow(rowIndex);
@@ -2384,6 +2384,10 @@ namespace FineUIPro.Web.Evaluation
{
if (findex < 250)
{
if (wsevalu.GetRow(0).GetCell(7 + findex) == null) wsevalu.GetRow(0).CreateCell(7 + findex);
wsevalu.GetRow(0).GetCell(7 + findex).SetCellValue("未评价合同号"+ (findex+1).ToString());
wsevalu.GetRow(0).GetCell(7 + findex).CellStyle = wsevalu.GetRow(0).GetCell(7).CellStyle;
if (wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7 + findex);
wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex).SetCellValue(itemFoNo);
wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex).CellStyle = fontStyle;
@@ -2731,7 +2735,7 @@ namespace FineUIPro.Web.Evaluation
XSSFSheet wss = (XSSFSheet)hssfworkbook.GetSheet("Non-Safety Contr. Performance");
if (overviewCount > 0)
{
var rowIndex = 2;
var rowIndex = 1;
foreach (var vs in OverviewReport)
{
if (wss.GetRow(rowIndex) == null) wss.CreateRow(rowIndex);
@@ -2841,7 +2845,7 @@ namespace FineUIPro.Web.Evaluation
XSSFSheet wssafe = (XSSFSheet)hssfworkbook.GetSheet("Safety Contr. Performance");
if (safeOverviewCount > 0)
{
var rowIndex = 2;
var rowIndex = 1;
foreach (var vs in safeOverviewReport)
{
if (wssafe.GetRow(rowIndex) == null) wssafe.CreateRow(rowIndex);
@@ -2984,6 +2988,10 @@ namespace FineUIPro.Web.Evaluation
{
if (findex < 250)
{
if (wsevalu.GetRow(0).GetCell(7 + findex) == null) wsevalu.GetRow(0).CreateCell(7 + findex);
wsevalu.GetRow(0).GetCell(7 + findex).SetCellValue("Contract No. \r\nNot Evaluated" + (findex + 1).ToString());
wsevalu.GetRow(0).GetCell(7 + findex).CellStyle = wsevalu.GetRow(0).GetCell(7).CellStyle;
if (wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex) == null) wsevalu.GetRow(rowEvalIndex).CreateCell(7 + findex);
wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex).SetCellValue(itemFoNo);
wsevalu.GetRow(rowEvalIndex).GetCell(7 + findex).CellStyle = fontStyle;
+8
View File
@@ -2512,6 +2512,7 @@
<Content Include="SendEmail\SendEmailTemplateList.aspx" />
<Content Include="SES\ContractorQualification.aspx" />
<Content Include="SES\ContractorQualificationEdit.aspx" />
<Content Include="SES\ContractorQueCopy.aspx" />
<Content Include="SES\CQualityPunish.aspx" />
<Content Include="SES\CQualityPunishEdit.aspx" />
<Content Include="SES\CSafePunishEdit.aspx" />
@@ -3231,6 +3232,13 @@
<Compile Include="SES\ContractorQualificationEdit.aspx.designer.cs">
<DependentUpon>ContractorQualificationEdit.aspx</DependentUpon>
</Compile>
<Compile Include="SES\ContractorQueCopy.aspx.cs">
<DependentUpon>ContractorQueCopy.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SES\ContractorQueCopy.aspx.designer.cs">
<DependentUpon>ContractorQueCopy.aspx</DependentUpon>
</Compile>
<Compile Include="SES\CQualityPunish.aspx.cs">
<DependentUpon>CQualityPunish.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+7 -4
View File
@@ -690,8 +690,8 @@
{
// 过期提示,30天范围
var foList = from x in Funs.DB.FC_SESRelatedData where x.Expire_Date != null
&& x.Expire_Date.Value.AddMonths(-6).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-5).Date >= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-6).AddDays(-7).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-5).AddDays(-7).Date >= DateTime.Now.Date
select x;
if (foList.Count() > 0)
{
@@ -833,8 +833,8 @@
// 过期提示,30天范围
var foList = from x in Funs.DB.FC_SESRelatedData
where x.Expire_Date != null
&& x.Expire_Date.Value.AddMonths(-6).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-5).Date >= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-6).AddDays(-7).Date <= DateTime.Now.Date
&& x.Expire_Date.Value.AddMonths(-5).AddDays(-7).Date >= DateTime.Now.Date
select x;
if (foList.Count() > 0)
{
@@ -1469,6 +1469,9 @@
NameValueCollection myPram = new NameValueCollection();
myPram.Add("ContractNo", fo.FO_NO);
myPram.Add("Contractor", contractor);
myPram.Add("Date", ses.PunishDate != null ? ses.PunishDate.Value.ToString("yyyy-MM-dd") : "");
myPram.Add("Time", ses.PunishDate != null ? ses.PunishDate.Value.ToString("HH:mm") : "");
myPram.Add("Violation Description", ses.Description);
bool result = MailHelper.SendPunishSesMail(pops, myPram, "承包商EHSS违规关联SES号的填写通知", mailTo, mailCC, out resultMessage);
if (result)
@@ -333,7 +333,7 @@ namespace FineUIPro.Web.SES
// select x;
// if (userTo != null)
// {
// mailTo= userTo.Select(x => x.Email).ToArray();
// mailTo = userTo.Select(x => x.Email).ToArray();
// }
// var fo = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(drpFO_No.SelectedValue);
@@ -351,6 +351,9 @@ namespace FineUIPro.Web.SES
// NameValueCollection myPram = new NameValueCollection();
// myPram.Add("ContractNo", fo.FO_NO);
// myPram.Add("Contractor", drpContractor.SelectedText);
// myPram.Add("Date", punishment.PunishDate != null ? punishment.PunishDate.Value.ToString("yyyy-MM-dd") : "");
// myPram.Add("Time", punishment.PunishDate != null ? punishment.PunishDate.Value.ToString("HH:mm") : "");
// myPram.Add("Violation Description", punishment.Description);
// MailHelper.SendPunishSesMail(pops, myPram, "承包商EHSS违规关联SES号的填写通知", mailTo, mailCC, out resultMessage);
// }
// }
@@ -39,7 +39,8 @@
SortField="FC_Status" SortDirection="DESC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
AllowFilters="true" OnFilterChange="Grid1_FilterChange" OnRowDataBound="Grid1_RowDataBound"
EnableRowSelectEvent="true" OnRowSelect="Grid1_RowSelect">
EnableRowSelectEvent="true" OnRowSelect="Grid1_RowSelect" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
@@ -57,6 +58,10 @@
<f:HiddenField runat="server" ID="hdFoType"></f:HiddenField>
<f:HiddenField runat="server" ID="hdQuetype"></f:HiddenField>
<f:DropDownList ID="drpValidContracts" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList_SelectedIndexChanged">
<f:ListItem Value="1" Text="Valid Contracts" />
<f:ListItem Value="2" Text="All Contracts" />
</f:DropDownList>
<f:TextBox ID="txtFO" runat="server" Label="FO" EmptyText="Search by FO." LabelAlign="Right" NextFocusControl="btnFind" LabelWidth="80px"></f:TextBox>
<f:DropDownList ID="drpContractor" runat="server" Label="Contractor" EnableEdit="true" LabelAlign="Right" NextFocusControl="btnFind"></f:DropDownList>
<f:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Icon="SystemSearch"></f:Button>
@@ -545,7 +550,9 @@
</Filter>
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
@@ -761,6 +768,10 @@
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window0" Title="FC List" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="true"
Width="1400px" Height="660px">
</f:Window>
<f:Window ID="Window1" Title="营业执照" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="720px" Height="480px">
@@ -773,7 +784,20 @@
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" OnClose="WindowAtt_Close"
Height="500px">
</f:Window>
<f:Window ID="WindowCopy" Title="拷贝资质" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="360px" Height="240px">
</f:Window>
<f:Menu ID="Menu0" runat="server">
<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true"
Icon="PageCopy" runat="server" Text="Copy">
</f:MenuButton>
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" EnablePostBack="true"
Icon="Find" runat="server" Text="View">
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit1" OnClick="btnMenuEdit1_Click" EnablePostBack="true"
Icon="BulletEdit" runat="server" Text="Modify" Hidden="true">
@@ -799,7 +823,7 @@
Icon="Delete" ConfirmText="Delete selected row ?" ConfirmTarget="Top" runat="server" Text="Delete" Hidden="true">
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu4" runat="server">
<f:Menu ID="Menu4" runat="server">
<f:MenuButton ID="btnMenuEdit4" OnClick="btnMenuEdit4_Click" EnablePostBack="true"
Icon="BulletEdit" runat="server" Text="Modify" Hidden="true">
</f:MenuButton>
@@ -809,6 +833,13 @@
</f:Menu>
</form>
<script type="text/javascript">
var menuID0 = '<%= Menu0.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID0).show(); //showAt(event.pageX, event.pageY);
return false;
}
var menuID1 = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu1(event, rowId) {
@@ -38,7 +38,11 @@ namespace FineUIPro.Web.SES
string strSql = @"SELECT * from View_FC_SESRelatedData WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.drpValidContracts.SelectedValue == "1")
{
strSql += " AND Expire_Date >= @expire_Date";
listStr.Add(new SqlParameter("@expire_Date", DateTime.Now));
}
if (!string.IsNullOrEmpty(hdConstRecords.Text.Trim()))
{
strSql += " AND ConstRecords =@ConstRecords";
@@ -754,6 +758,14 @@ namespace FineUIPro.Web.SES
{
BindGrid();
}
#region DropDownList下拉选择事件
///查询
protected void DropDownList_SelectedIndexChanged(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#endregion
#region
@@ -983,6 +995,36 @@ namespace FineUIPro.Web.SES
}
#endregion
#region
protected void btnMenuCopy_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("Please select at least one record!");
return;
}
string Id = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(WindowCopy.GetShowReference(String.Format("ContractorQueCopy.aspx?id={0}", Id, "资质拷贝 - ")));
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("Please select at least one record!");
return;
}
string Id = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(Window0.GetShowReference(String.Format("SESRelatedDataEdit.aspx?id={0}&view=1", Id, "查看 - ")));
}
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
btnMenuView_Click(null, null);
}
#endregion
#region
private void BindGridTab(string foId, string queType, Grid grid)
@@ -1487,66 +1529,99 @@ namespace FineUIPro.Web.SES
backgroundstyle.SetFont(font);
#endregion
Grid1.PageSize = 10000;
BindGrid();
if (Grid1.Rows.Count > 0)
{
var rowIndex = 1;
for (int i=0; i < Grid1.Rows.Count; i++)
{
int rowID = Convert.ToInt32(Grid1.DataKeys[i][0]);
var queList = from x in Funs.DB.EMC_Contractor_Qualification
join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
where x.FoId == rowID orderby x.QueType, x.LimitStartDate
select new { x.FoId, y.FO_NO, x.QueName, x.QueDef, x.QueType, x.LimitStartDate, x.LimitEndDate, x.Remark };
foreach (var item in queList)
{
if (wsMonth.GetRow(rowIndex) == null) wsMonth.CreateRow(rowIndex);
#region
if (wsMonth.GetRow(rowIndex).GetCell(0) == null) wsMonth.GetRow(rowIndex).CreateCell(0);
wsMonth.GetRow(rowIndex).GetCell(0).SetCellValue(item.FO_NO);
wsMonth.GetRow(rowIndex).GetCell(0).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(1) == null) wsMonth.GetRow(rowIndex).CreateCell(1);
wsMonth.GetRow(rowIndex).GetCell(1).SetCellValue(item.QueName);
wsMonth.GetRow(rowIndex).GetCell(1).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(2) == null) wsMonth.GetRow(rowIndex).CreateCell(2);
string queType = string.Empty;
if (item.QueType == "1")
{
queType = "营业执照";
}
if (item.QueType == "2")
{
queType = "专业资质";
}
if (item.QueType == "3")
{
queType = "安全资质";
}
if (item.QueType == "4")
{
queType = "环保资质";
}
wsMonth.GetRow(rowIndex).GetCell(2).SetCellValue(queType);
wsMonth.GetRow(rowIndex).GetCell(2).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(3) == null) wsMonth.GetRow(rowIndex).CreateCell(3);
wsMonth.GetRow(rowIndex).GetCell(3).SetCellValue(item.QueDef);
wsMonth.GetRow(rowIndex).GetCell(3).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(4) == null) wsMonth.GetRow(rowIndex).CreateCell(4);
wsMonth.GetRow(rowIndex).GetCell(4).SetCellValue(item.LimitStartDate.HasValue ? item.LimitStartDate.Value.ToString("yyyy-MM-dd") : "");
wsMonth.GetRow(rowIndex).GetCell(4).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(5) == null) wsMonth.GetRow(rowIndex).CreateCell(5);
wsMonth.GetRow(rowIndex).GetCell(5).SetCellValue(item.LimitEndDate.HasValue ? item.LimitEndDate.Value.ToString("yyyy-MM-dd") : "");
wsMonth.GetRow(rowIndex).GetCell(5).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(6) == null) wsMonth.GetRow(rowIndex).CreateCell(6);
wsMonth.GetRow(rowIndex).GetCell(6).SetCellValue(item.Remark);
rowIndex++;
}
#endregion
}
var queList = from x in Funs.DB.View_EMC_Contractor_Qualification select x;
if (!string.IsNullOrEmpty(txtFO.Text.Trim()))
{
queList = queList.Where(x => x.FO_NO.Contains(txtFO.Text.Trim()));
}
if (this.drpValidContracts.SelectedValue == "1")
{
queList = queList.Where(x => x.Expire_Date >= DateTime.Now);
}
if (drpContractor.SelectedValue != Const._Null)
{
queList = queList.Where(x => x.ContractorId == drpContractor.SelectedValue);
}
queList = queList.OrderBy(x => x.LimitStartDate).OrderBy(x => x.QueType).OrderBy(x => x.FO_NO);
var rowIndex = 1;
foreach (var item in queList.ToList())
{
if (wsMonth.GetRow(rowIndex) == null) wsMonth.CreateRow(rowIndex);
#region
if (wsMonth.GetRow(rowIndex).GetCell(0) == null) wsMonth.GetRow(rowIndex).CreateCell(0);
wsMonth.GetRow(rowIndex).GetCell(0).SetCellValue(item.FO_NO);
wsMonth.GetRow(rowIndex).GetCell(0).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(1) == null) wsMonth.GetRow(rowIndex).CreateCell(1);
wsMonth.GetRow(rowIndex).GetCell(1).SetCellValue(item.QueName);
wsMonth.GetRow(rowIndex).GetCell(1).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(2) == null) wsMonth.GetRow(rowIndex).CreateCell(2);
string queType = string.Empty;
if (item.QueType == "1")
{
queType = "营业执照";
}
if (item.QueType == "2")
{
queType = "专业资质";
}
if (item.QueType == "3")
{
queType = "安全资质";
}
if (item.QueType == "4")
{
queType = "环保资质";
}
wsMonth.GetRow(rowIndex).GetCell(2).SetCellValue(queType);
wsMonth.GetRow(rowIndex).GetCell(2).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(3) == null) wsMonth.GetRow(rowIndex).CreateCell(3);
wsMonth.GetRow(rowIndex).GetCell(3).SetCellValue(item.QueDef);
wsMonth.GetRow(rowIndex).GetCell(3).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(4) == null) wsMonth.GetRow(rowIndex).CreateCell(4);
wsMonth.GetRow(rowIndex).GetCell(4).SetCellValue(item.Discipline);
wsMonth.GetRow(rowIndex).GetCell(4).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(5) == null) wsMonth.GetRow(rowIndex).CreateCell(5);
wsMonth.GetRow(rowIndex).GetCell(5).SetCellValue(item.Contract_Admin);
wsMonth.GetRow(rowIndex).GetCell(5).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(6) == null) wsMonth.GetRow(rowIndex).CreateCell(6);
wsMonth.GetRow(rowIndex).GetCell(6).SetCellValue(item.Main_Coordinator);
wsMonth.GetRow(rowIndex).GetCell(6).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(7) == null) wsMonth.GetRow(rowIndex).CreateCell(7);
wsMonth.GetRow(rowIndex).GetCell(7).SetCellValue(item.Contractor);
wsMonth.GetRow(rowIndex).GetCell(7).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(8) == null) wsMonth.GetRow(rowIndex).CreateCell(8);
wsMonth.GetRow(rowIndex).GetCell(8).SetCellValue(item.LimitStartDate.HasValue ? item.LimitStartDate.Value.ToString("yyyy-MM-dd") : "");
wsMonth.GetRow(rowIndex).GetCell(8).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(9) == null) wsMonth.GetRow(rowIndex).CreateCell(9);
wsMonth.GetRow(rowIndex).GetCell(9).SetCellValue(item.LimitEndDate.HasValue ? item.LimitEndDate.Value.ToString("yyyy-MM-dd") : "");
wsMonth.GetRow(rowIndex).GetCell(9).CellStyle = fontStyle;
if (wsMonth.GetRow(rowIndex).GetCell(10) == null) wsMonth.GetRow(rowIndex).CreateCell(10);
wsMonth.GetRow(rowIndex).GetCell(10).SetCellValue(item.Remark);
rowIndex++;
#endregion
}
//Grid1.PageSize = 10000;
//BindGrid();
//if (Grid1.Rows.Count > 0)
//{
// var rowIndex = 1;
// for (int i=0; i < Grid1.Rows.Count; i++)
// {
// int rowID = Convert.ToInt32(Grid1.DataKeys[i][0]);
// var queList = from x in Funs.DB.EMC_Contractor_Qualification
// join y in Funs.DB.FC_SESRelatedData on x.FoId equals y.ID
// where x.FoId == rowID orderby x.QueType, x.LimitStartDate
// select new { x.FoId, y.FO_NO, x.QueName, x.QueDef, x.QueType, x.LimitStartDate, x.LimitEndDate, x.Remark };
// }
//}
wsMonth.ForceFormulaRecalculation = true;
File diff suppressed because it is too large Load Diff
@@ -30,7 +30,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtLimitEndDate" runat="server" Label="有效期到期时间" LabelAlign="Right" LabelWidth="150px" Required="true"></f:DatePicker>
<f:DatePicker ID="txtLimitEndDate" runat="server" Label="有效期到期时间" LabelAlign="Right" LabelWidth="150px" Required="true" ></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
@@ -15,7 +15,7 @@ namespace FineUIPro.Web.SES
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
//txtLimitEndDate.MinDate = DateTime.Now;
string queId = Request.Params["queId"];
if (!string.IsNullOrEmpty(queId))
{
@@ -102,7 +102,7 @@ namespace FineUIPro.Web.SES
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.StandardTemplate));
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Contractor_Qualification));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/ContractorQualification&menuId={1}", this.hdId.Text, BLL.Const.ContractorQualificationMenuId)));
}
@@ -0,0 +1,36 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContractorQueCopy.aspx.cs" Inherits="FineUIPro.Web.SES.ContractorQueCopy" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RT委托替换</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</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:TextBox ID="txtFoNo" runat="server" Label="要拷贝的合同号" LabelAlign="Right" LabelWidth="120px" Width="360px"></f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,80 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.SES
{
public partial class ContractorQueCopy : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string foId = Request.Params["Id"];
if (txtFoNo.Text.Trim() != "")
{
var fo=BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(txtFoNo.Text.Trim());
if (fo != null)
{
var queList = from x in Funs.DB.EMC_Contractor_Qualification where x.FoId == fo.ID select x;
foreach (var que in queList)
{
Model.EMC_Contractor_Qualification newQue = new Model.EMC_Contractor_Qualification();
string newCode= SQLHelper.GetNewID(typeof(Model.EMC_Contractor_Qualification));
newQue.FoId = Convert.ToInt32(foId);
newQue.QueId = newCode;
newQue.QueType = que.QueType;
newQue.QueName = que.QueName;
newQue.AttachUrl = que.AttachUrl;
newQue.QueDef = que.QueDef;
newQue.LimitStartDate = que.LimitStartDate;
newQue.LimitEndDate = que.LimitEndDate;
newQue.Remark = que.Remark;
Funs.DB.EMC_Contractor_Qualification.InsertOnSubmit(newQue);
Funs.DB.SubmitChanges();
var att = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == que.QueId && x.MenuId == BLL.Const.ContractorQualificationMenuId);
if (att != null)
{
Model.AttachFile newAtt = new Model.AttachFile();
newAtt.AttachFileId = SQLHelper.GetNewID(typeof(Model.AttachFile));
newAtt.ToKeyId = newCode;
newAtt.AttachSource=att.AttachSource;
newAtt.AttachUrl = att.AttachUrl;
newAtt.MenuId = att.MenuId;
Funs.DB.AttachFile.InsertOnSubmit(newAtt);
Funs.DB.SubmitChanges();
}
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
}
else
{
Alert.ShowInParent("Please select FoNO Error!");
return;
}
}
else
{
Alert.ShowInParent("Please select FoNO!");
return;
}
}
}
}
+80
View File
@@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SES
{
public partial class ContractorQueCopy
{
/// <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>
/// txtFoNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFoNo;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}
@@ -19,6 +19,7 @@ namespace FineUIPro.Web.SES
if (view == "1")
{
this.btnSave.Hidden = true;
Toolbar2.Hidden = true;
}
else
{