111
This commit is contained in:
@@ -70,6 +70,8 @@
|
||||
OnClick="btnSendEmail_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="Search" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:Button ID="btnUpdateState" ToolTip="Modify" Text="UpdateState" runat="server" OnClick="btnUpdateState_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar6" Position="Top" runat="server">
|
||||
@@ -1295,6 +1297,50 @@
|
||||
</Items>
|
||||
</f:Tab>
|
||||
|
||||
<f:Tab ID="Tab14" Title="To_do" BodyPadding="1px" Layout="VBox" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid16" ShowBorder="true" ShowHeader="false" Title="To_do" EnableCollapse="true" Height="200px"
|
||||
runat="server" BoxFlex="1" DataKeyNames="FileId" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="FileId" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid16_RowDoubleClick">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar17" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill17" runat="server"></f:ToolbarFill>
|
||||
<f:RadioButtonList ID="rdbIsHandle" runat="server" OnSelectedIndexChanged="rdbIsHandle_SelectedIndexChanged" AutoPostBack="true">
|
||||
<f:RadioItem Text="待办" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="已处理" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField Width="50px" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label15" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="90px" ColumnID="FO_NO" DataField="FO_NO" FieldType="String" HeaderText="合同号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="Contract" DataField="Contract" FieldType="String" HeaderText="承包商" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ViolationBehavior" DataField="ViolationBehavior" FieldType="String" HeaderText="违章或违规行为" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="Result" DataField="Result" FieldType="String" HeaderText="后果" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="90px" ColumnID="ToDoMan" DataField="ToDoMan" FieldType="String" HeaderText="上传人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="IsHandle" DataField="IsHandle" FieldType="String" HeaderText="是否处理" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu15" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Tab>
|
||||
|
||||
</Tabs>
|
||||
</f:TabStrip>
|
||||
</Items>
|
||||
@@ -1458,6 +1504,11 @@
|
||||
Icon="Delete" ConfirmText="Delete selected row ?" ConfirmTarget="Top" runat="server" Text="Delete" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu16" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit16" OnClick="btnMenuEdit16_Click" EnablePostBack="true"
|
||||
Icon="BulletEdit" runat="server" Text="处理" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.SES
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
if (this.CurrUser.Account == Const.Gly)
|
||||
{
|
||||
btnUpdateState.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnUpdateState.Hidden = true;
|
||||
}
|
||||
}
|
||||
else if (GetRequestEventArgument() == "FilterChange")
|
||||
{
|
||||
@@ -970,7 +979,7 @@ namespace FineUIPro.Web.SES
|
||||
mailCode = fo.FO_NO + "|" + disc + "|" + contractor.Contractor + " " + contractor.ContractorCN;
|
||||
var contractAdmin = from x in Funs.DB.Sys_User where x.UserId == fo.Contract_Admin && x.Email != null && x.Email != "" select x;
|
||||
|
||||
var buyer = from x in Funs.DB.Sys_User where x.UserName == fo.Buyer && x.Email != null && x.Email != "" select x;
|
||||
var buyer = from x in Funs.DB.Sys_User where x.UserId == fo.BuyerId && x.Email != null && x.Email != "" select x;
|
||||
if (buyer.Count() > 0)
|
||||
{
|
||||
userList.Add(buyer.First());
|
||||
@@ -3194,6 +3203,71 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 更新状态
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdateState_Click(object sender, EventArgs e)
|
||||
{
|
||||
var date = (from x in Funs.DB.FC_SESRelatedData where x.FC_Status != "Closed" select x).ToList();
|
||||
foreach (var d in date)
|
||||
{
|
||||
string lastPayment = string.Empty;
|
||||
string status = d.FC_Status;
|
||||
if (!string.IsNullOrEmpty(d.FO_NO))
|
||||
{
|
||||
lastPayment = Funs.DB.CPTList.FirstOrDefault(x => x.Contract_No == d.FO_NO)?.Last_Payment;
|
||||
}
|
||||
|
||||
if (d.Validate_Date.HasValue)
|
||||
{
|
||||
if (d.Validate_Date.Value < DateTime.Now)
|
||||
{
|
||||
status = "Ready";
|
||||
}
|
||||
}
|
||||
|
||||
if (d.Expire_Date.HasValue)
|
||||
{
|
||||
if (d.Expire_Date.Value >= DateTime.Now)
|
||||
{
|
||||
if (d.Expire_Date.Value.AddMonths(-6) <= DateTime.Now)
|
||||
{
|
||||
status = "Expired Soon";
|
||||
}
|
||||
else
|
||||
{
|
||||
status = "Valid";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status = "Expired";
|
||||
if (lastPayment == "Y")
|
||||
{
|
||||
status = "Closed";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string strSql = "UPDATE dbo.FC_SESRelatedData SET FC_Status=@status WHERE ID=@id";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@status", status));
|
||||
listStr.Add(new SqlParameter("@id", d.ID));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
try
|
||||
{
|
||||
BLL.SQLHelper.ExecutSql(strSql, parameter);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"执行当前sql:{strSql}错误:{ex.Message},当前ID={d.ID},当前status={status}");
|
||||
//记录日志到数据中。
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Grid行点击事件
|
||||
/// <summary>
|
||||
///Grid行点击事件
|
||||
@@ -4002,6 +4076,45 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid16()
|
||||
{
|
||||
string strSql = @"select ToDoId,U.UserName AS ToDoMan,ViolationBehavior,Result,
|
||||
(case when IsHandle=1 then '已处理' else '待办' end) as IsHandle,
|
||||
(case when contractor.Contractor is not null
|
||||
then (case when contractor.ContractorCN is not null
|
||||
then contractor.Contractor+' '+contractor.ContractorCN
|
||||
else contractor.Contractor end)
|
||||
else contractor.ContractorCN end) as Contractor
|
||||
from FC_ToDo todo
|
||||
LEFT JOIN Sys_User AS U ON U.UserId = todo.ToDoMan
|
||||
LEFT JOIN Base_Contractor as contractor on contractor.ContractorId = todo.ContractId
|
||||
WHERE 1=1 ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.CurrUser.Account != Const.Gly)
|
||||
{
|
||||
strSql += " AND todo.ToDoMan = @ToDoMan";
|
||||
listStr.Add(new SqlParameter("@ToDoMan", CurrUser.UserId));
|
||||
}
|
||||
|
||||
if (rdbIsHandle.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND todo.IsHandle = 1";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND todo.IsHandle = 0";
|
||||
}
|
||||
//strSql += " ORDER BY con.UploadDate DESC";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid16.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid3, tb);
|
||||
Grid16.DataSource = table;
|
||||
Grid16.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 选项卡改变事件
|
||||
@@ -4090,6 +4203,10 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
BindGrid15(this.hdID.Text);
|
||||
}
|
||||
else if (this.TabStrip2.ActiveTabIndex == 13)
|
||||
{
|
||||
BindGrid16();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4168,6 +4285,10 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
BindGrid15(this.hdID.Text);
|
||||
}
|
||||
else if (this.TabStrip2.ActiveTabIndex == 13)
|
||||
{
|
||||
BindGrid16();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5122,6 +5243,59 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region TODO
|
||||
/// <summary>
|
||||
/// Grid3行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid16_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuEdit16_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid3右键编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit16_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid16.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string todoId = Grid16.SelectedRowID;
|
||||
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
|
||||
if (todo != null)
|
||||
{
|
||||
// 约谈
|
||||
if (todo.ViolationBehavior == "一次零容忍违章" || todo.ViolationBehavior == "累计两次月度评估低于60或安全评估低于12分")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("SESRelatedDataContractManage7.aspx?todoId={0}", todoId, "编辑 - ")));
|
||||
}
|
||||
// NCR
|
||||
if (todo.ViolationBehavior == "三次零容忍违章")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("SESRelatedDataContractManage6.aspx?todoId={0}", todoId, "编辑 - ")));
|
||||
}
|
||||
|
||||
// 邮件 不得参与下轮合同次数
|
||||
if (todo.ViolationBehavior == "累计三次月度评估低于60分")
|
||||
{
|
||||
|
||||
}
|
||||
// 邮件 提前终止合同及不得参与下轮合同次数
|
||||
if (todo.ViolationBehavior == "三次NCR")
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗体
|
||||
/// </summary>
|
||||
@@ -5459,5 +5633,10 @@ namespace FineUIPro.Web.SES
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
protected void rdbIsHandle_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid16();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -257,6 +257,15 @@ namespace FineUIPro.Web.SES
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdateState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdateState;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar6 控件。
|
||||
/// </summary>
|
||||
@@ -1661,6 +1670,60 @@ namespace FineUIPro.Web.SES
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnUrl15;
|
||||
|
||||
/// <summary>
|
||||
/// Tab14 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tab Tab14;
|
||||
|
||||
/// <summary>
|
||||
/// Grid16 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid16;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar17 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar17;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill17 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill17;
|
||||
|
||||
/// <summary>
|
||||
/// rdbIsHandle 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rdbIsHandle;
|
||||
|
||||
/// <summary>
|
||||
/// Label15 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label15;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -2119,5 +2182,23 @@ namespace FineUIPro.Web.SES
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete15;
|
||||
|
||||
/// <summary>
|
||||
/// Menu16 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu16;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit16 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit16;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,10 +133,8 @@ namespace FineUIPro.Web.SES
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "1";//合同续签
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -159,6 +157,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,10 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
|
||||
newContract.FileTypeId = "10";//停工整改报告// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +184,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "11";//合同终止// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "12";//组织架构// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,8 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "13";//框架承包商评估表// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +182,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -140,10 +140,9 @@ namespace FineUIPro.Web.SES
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
string id = "";//Request.Params["id"];
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "2";//费用增补
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -156,8 +155,11 @@ namespace FineUIPro.Web.SES
|
||||
newContract.Remark = this.txtRemark.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(fileId))
|
||||
{
|
||||
newContract.FileId = fileId;
|
||||
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
|
||||
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
|
||||
id = con.FC_ID.ToString();
|
||||
newContract.FileId = fileId;
|
||||
|
||||
if (att.Count() > 0)
|
||||
{
|
||||
newContract.AttachUrl = att.First().AttachUrl;
|
||||
@@ -168,6 +170,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
id= Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
@@ -192,14 +196,8 @@ namespace FineUIPro.Web.SES
|
||||
var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id);
|
||||
if (data != null)
|
||||
{
|
||||
//decimal? totalBudget = 0;
|
||||
//var conMaLists = BLL.ContractManagementService.GetContractManagementByDataIdFileType(id, "2");
|
||||
//foreach (var item in conMaLists)
|
||||
//{
|
||||
// totalBudget += item.TotalBudget;
|
||||
//}
|
||||
data.Actual_Budget = newContract.TotalBudget;
|
||||
BLL.SESRelatedDataService.UpdateSESRelatedData(data);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
@@ -139,10 +139,10 @@ namespace FineUIPro.Web.SES
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
string id = "";
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
//newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "3";//份额变更
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -153,6 +153,8 @@ namespace FineUIPro.Web.SES
|
||||
newContract.Remark = this.txtRemark.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(fileId))
|
||||
{
|
||||
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
|
||||
id = con.FC_ID.ToString();
|
||||
newContract.FileId = fileId;
|
||||
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
|
||||
if (att.Count() > 0)
|
||||
@@ -165,6 +167,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -138,10 +138,9 @@ namespace FineUIPro.Web.SES
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
string id = "";
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "4";//短期延续
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -154,6 +153,8 @@ namespace FineUIPro.Web.SES
|
||||
newContract.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text);
|
||||
if (!string.IsNullOrEmpty(fileId))
|
||||
{
|
||||
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
|
||||
id = con.FC_ID.ToString();
|
||||
newContract.FileId = fileId;
|
||||
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
|
||||
if (att.Count() > 0)
|
||||
@@ -166,6 +167,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -166,10 +166,8 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择审计结果!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "5";//承包商EHSQ审计报告
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -196,6 +194,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,8 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "6";//NCR// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +182,26 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
|
||||
// 从todo过来
|
||||
string todoId = Request.Params["todoId"];
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(todoId))
|
||||
{
|
||||
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
|
||||
if (todo != null)
|
||||
{
|
||||
var fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(todo.FO_NO);
|
||||
id = fc.ID.ToString();
|
||||
newContract.ToDoId = todoId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
@@ -200,6 +218,18 @@ namespace FineUIPro.Web.SES
|
||||
newContract.AttachUrl = att.First().AttachUrl;
|
||||
}
|
||||
BLL.ContractManagementService.AddContractManagement(newContract);
|
||||
|
||||
// 回写ToDo
|
||||
if (!string.IsNullOrEmpty(todoId))
|
||||
{
|
||||
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
|
||||
if (todo != null)
|
||||
{
|
||||
todo.IsHandle = true;
|
||||
todo.HandleDate = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "增加NCR合同!");
|
||||
ShowNotify("Save successfully!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "7";//合同约谈// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +183,24 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
// 从todo过来
|
||||
string todoId = Request.Params["todoId"];
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(todoId))
|
||||
{
|
||||
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
|
||||
if (todo != null)
|
||||
{
|
||||
var fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(todo.FO_NO);
|
||||
id = fc.ID.ToString();
|
||||
newContract.ToDoId = todoId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
@@ -200,6 +217,19 @@ namespace FineUIPro.Web.SES
|
||||
newContract.AttachUrl = att.First().AttachUrl;
|
||||
}
|
||||
BLL.ContractManagementService.AddContractManagement(newContract);
|
||||
|
||||
// 回写ToDo
|
||||
if (!string.IsNullOrEmpty(todoId))
|
||||
{
|
||||
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
|
||||
if (todo != null)
|
||||
{
|
||||
todo.IsHandle = true;
|
||||
todo.HandleDate= DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "增加合同约谈!");
|
||||
ShowNotify("Save successfully!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
newContract.FileTypeId = "8";//开工会// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
@@ -153,10 +153,10 @@ namespace FineUIPro.Web.SES
|
||||
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Request.Params["id"];
|
||||
|
||||
string fileId = Request.Params["fileId"];
|
||||
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
|
||||
newContract.FileTypeId = "9";//会议纪要// this.drpFileTypeId.SelectedValue;
|
||||
newContract.FileName = this.txtFileName.Text.Trim();
|
||||
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
|
||||
@@ -184,6 +184,8 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
newContract.FC_ID = Convert.ToInt32(id);
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
newContract.FileId = this.hdId.Text.Trim();
|
||||
|
||||
Reference in New Issue
Block a user