11
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
+187
-131
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user