20241023 合同管理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using NPOI.OpenXmlFormats.Spreadsheet;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
@@ -24,7 +25,7 @@ namespace FineUIPro.Web.SES
|
||||
else
|
||||
{
|
||||
GetButtonPower();//按钮权限
|
||||
}
|
||||
}
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
//是否需要交工资料
|
||||
@@ -64,10 +65,11 @@ namespace FineUIPro.Web.SES
|
||||
this.drpContract_Admin.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpContract_Admin);
|
||||
|
||||
var q= (from x in Funs.DB.Sys_User
|
||||
join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
|
||||
where (x.RoleId == BLL.Const.Role_ContractAdministratorId || x.RoleId == BLL.Const.Role_CostEngineerId || y.RoleName== "Cost Engineer Leader")
|
||||
&& x.IsPost == true select x).ToList();
|
||||
var q = (from x in Funs.DB.Sys_User
|
||||
join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
|
||||
where (x.RoleId == BLL.Const.Role_ContractAdministratorId || x.RoleId == BLL.Const.Role_CostEngineerId || y.RoleName == "Cost Engineer Leader")
|
||||
&& x.IsPost == true
|
||||
select x).ToList();
|
||||
this.drpCost_Checker.DataTextField = "UserName";
|
||||
this.drpCost_Checker.DataValueField = "UserId";
|
||||
this.drpCost_Checker.DataSource = q;
|
||||
@@ -173,12 +175,12 @@ namespace FineUIPro.Web.SES
|
||||
//this.txtApplicant.Text = data.Applicant; // 主协调人
|
||||
this.txtValidate_Date.Text = data.Validate_Date == null ? "" : Convert.ToDateTime(data.Validate_Date).ToString("yyyy-MM-dd");
|
||||
this.txtExpire_Date.Text = data.Expire_Date == null ? "" : Convert.ToDateTime(data.Expire_Date).ToString("yyyy-MM-dd");
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(data.FC_Status))
|
||||
{
|
||||
drpFCStatus.SelectedValue = data.FC_Status;
|
||||
}
|
||||
|
||||
|
||||
this.txtContactPerson.Text = data.Contract_Person;
|
||||
this.txtContract_Tel.Text = data.Contract_Tel;
|
||||
if (data.Proportion_of_FC_Definition != null)
|
||||
@@ -189,13 +191,14 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
this.numProportion_of_FC_Definition.Text = "";
|
||||
}
|
||||
this.txtInitial_Budget.Text = data.InitialBudget.HasValue ? data.InitialBudget.Value.ToString() : "";
|
||||
this.txtActual_Budget.Text = data.Actual_Budget.HasValue ? data.Actual_Budget.Value.ToString() : "";
|
||||
this.txtRemark.Text = data.Remark;
|
||||
if (!string.IsNullOrEmpty(data.ConstRecords))
|
||||
{
|
||||
this.drpConstRecords.SelectedValue = data.ConstRecords.Trim();
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(data.DisciplineId))
|
||||
{
|
||||
this.drpDiscispline.SelectedValue = data.DisciplineId;
|
||||
@@ -225,6 +228,21 @@ namespace FineUIPro.Web.SES
|
||||
this.txtRemainingDurationRate.Text = (s1 / s2 * 100).ToString();
|
||||
}
|
||||
}
|
||||
if (data.IfExtend.HasValue)
|
||||
{
|
||||
if (data.IfExtend==true)
|
||||
{
|
||||
this.drpIfExtend.SelectedValue = "True";
|
||||
this.txtPreviousFO.Enabled = true;
|
||||
this.txtPreviousFO.Text = data.PreviousFO;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpIfExtend.SelectedValue = "False";
|
||||
this.txtPreviousFO.Enabled = false;
|
||||
}
|
||||
}
|
||||
this.txtInitialAllocation.Text = data.InitialAllocation.HasValue ? data.InitialAllocation.ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,6 +359,7 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
this.numProportion_of_FC_Definition.Text = "";
|
||||
}
|
||||
this.txtInitial_Budget.Text = data.InitialBudget.HasValue ? data.InitialBudget.Value.ToString() : "";
|
||||
this.txtActual_Budget.Text = data.Actual_Budget.HasValue ? data.Actual_Budget.Value.ToString() : "";
|
||||
this.txtRemark.Text = data.Remark;
|
||||
if (!string.IsNullOrEmpty(data.ConstRecords))
|
||||
@@ -377,6 +396,21 @@ namespace FineUIPro.Web.SES
|
||||
this.txtRemainingDurationRate.Text = (s1 / s2 * 100).ToString();
|
||||
}
|
||||
}
|
||||
if (data.IfExtend.HasValue)
|
||||
{
|
||||
if (data.IfExtend == true)
|
||||
{
|
||||
this.drpIfExtend.SelectedValue = "True";
|
||||
this.txtPreviousFO.Enabled = true;
|
||||
this.txtPreviousFO.Text = data.PreviousFO;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpIfExtend.SelectedValue = "False";
|
||||
this.txtPreviousFO.Enabled = false;
|
||||
}
|
||||
}
|
||||
this.txtInitialAllocation.Text = data.InitialAllocation.HasValue ? data.InitialAllocation.ToString() : "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -395,7 +429,7 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
string id = Request.Params["id"];
|
||||
|
||||
if (this.drpDiscispline.SelectedValue==BLL.Const._Null)
|
||||
if (this.drpDiscispline.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("Please select Discispline!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -404,7 +438,7 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
Alert.ShowInTop("The FO.NO. already exists!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.drpContractor.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("Please select Contractor!", MessageBoxIcon.Warning);
|
||||
@@ -426,7 +460,7 @@ namespace FineUIPro.Web.SES
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Model.FC_SESRelatedData newData = new Model.FC_SESRelatedData();
|
||||
@@ -504,7 +538,7 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
newData.Allocation = drpAllocation.SelectedValue;
|
||||
}
|
||||
|
||||
|
||||
newData.Contract_Person = this.txtContactPerson.Text.Trim();
|
||||
newData.Contract_Tel = this.txtContract_Tel.Text.Trim();
|
||||
newData.Email = txtEMial.Text.Trim();
|
||||
@@ -524,7 +558,7 @@ namespace FineUIPro.Web.SES
|
||||
{
|
||||
newData.Proportion_of_FC_Definition = null;
|
||||
}
|
||||
|
||||
newData.InitialBudget = Funs.GetNewDecimal(this.txtInitial_Budget.Text.Trim());
|
||||
newData.Actual_Budget = Funs.GetNewDecimal(this.txtActual_Budget.Text.Trim());
|
||||
newData.Remark = this.txtRemark.Text.Trim();
|
||||
if (this.drpDiscispline.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDiscispline.SelectedValue))
|
||||
@@ -545,6 +579,12 @@ namespace FineUIPro.Web.SES
|
||||
}
|
||||
|
||||
newData.ExceedLimit = Funs.GetNewInt(this.txtNumExceedLimit.Text.Trim());
|
||||
if (this.drpIfExtend.SelectedValue != "0")
|
||||
{
|
||||
newData.IfExtend = this.drpIfExtend.SelectedValue == "True" ? true : false;
|
||||
}
|
||||
newData.PreviousFO = this.txtPreviousFO.Text.Trim();
|
||||
newData.InitialAllocation = Funs.GetNewDecimal(this.txtInitialAllocation.Text.Trim());
|
||||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
@@ -595,7 +635,7 @@ namespace FineUIPro.Web.SES
|
||||
protected void drpContractor_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtVendor_NO.Text = string.Empty;
|
||||
|
||||
|
||||
if (this.drpContractor.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpContractor.SelectedValue))
|
||||
{
|
||||
var contractor = BLL.ContractorService.GetContractorById(this.drpContractor.SelectedValue);
|
||||
@@ -660,13 +700,13 @@ namespace FineUIPro.Web.SES
|
||||
DateTime expireDate = Convert.ToDateTime(this.txtExpire_Date.Text.Trim());
|
||||
if (expireDate >= Convert.ToDateTime(DateTime.Now.ToShortDateString()) && expireDate.AddMonths(-6) <= Convert.ToDateTime(DateTime.Now.ToShortDateString()))
|
||||
{
|
||||
drpFCStatus.SelectedValue= "Expired Soon";
|
||||
drpFCStatus.SelectedValue = "Expired Soon";
|
||||
//this.txtFC_Status.Text = "Expired Soon";
|
||||
}
|
||||
else if (expireDate < Convert.ToDateTime(DateTime.Now))
|
||||
{
|
||||
drpFCStatus.SelectedValue = "Expired";
|
||||
if (lastPayment=="Y")
|
||||
if (lastPayment == "Y")
|
||||
{
|
||||
drpFCStatus.SelectedValue = "Closed";
|
||||
}
|
||||
@@ -676,7 +716,28 @@ namespace FineUIPro.Web.SES
|
||||
drpFCStatus.SelectedValue = "Valid";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IfExtend下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpIfExtend_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtPreviousFO.Text = string.Empty;
|
||||
if (this.drpIfExtend.SelectedValue != "0")
|
||||
{
|
||||
if (this.drpIfExtend.SelectedValue == "True")
|
||||
{
|
||||
this.txtPreviousFO.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtPreviousFO.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user