Basf_FCL/FCL/FineUIPro.Web/Evaluation/ContractorEvaluationEdit.as...

526 lines
26 KiB
C#
Raw Normal View History

2024-05-08 10:17:02 +08:00
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using BLL;
2025-02-13 10:06:57 +08:00
using System.Drawing;
2024-05-08 10:17:02 +08:00
namespace FineUIPro.Web.Evaluation
{
public partial class ContractorEvaluationEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
2024-05-08 10:20:39 +08:00
//
2024-05-08 10:17:02 +08:00
string foNo = Request.Params["foNo"];
var foview = from x in Funs.DB.View_Contractor_Evaluation where x.FO_NO == foNo select x;
if (foview.Count() > 0)
{
// 权限
if (CurrUser.UserId != Const.GlyId)
{
2025-01-22 14:30:40 +08:00
2024-05-08 10:17:02 +08:00
txtReviewOfFC.Enabled = false;
lbPriceEvaluation.Enabled = false;
txtPriceEvaluation1.Enabled = false;
txtPriceEvaluation2.Enabled = false;
cbPriceLevel.Enabled = false;
txtEnumeration.Enabled = false;
txtForecasted.Enabled = false;
2025-01-22 14:30:40 +08:00
//cbNCR.Enabled = false;
2024-05-08 10:17:02 +08:00
numNCRTime.Enabled = false;
2025-01-22 14:30:40 +08:00
//cbInquiry.Enabled = false;
2024-05-08 10:17:02 +08:00
numInquiryTime.Enabled = false;
2025-01-22 14:30:40 +08:00
numWorkRe.Enabled = false;
txtGreenTimes.Enabled = false;
txtYellowGreenTimes.Enabled = false;
txtYellowTimes.Enabled = false;
txtRedYellowTimes.Enabled = false;
txtRedTimes.Enabled = false;
//cbAuditResult.Enabled = false;
2024-05-08 10:17:02 +08:00
//cbBoQIsAudit.Enabled = false;
//txtBoQ.Enabled = false;
2025-01-22 14:30:40 +08:00
//cbIsOthers.Enabled = false;
//txtOtherDef.Enabled = false;
numOthers.Enabled = false;
2024-05-08 10:17:02 +08:00
txtProposed.Enabled = false;
txtTechnicalBonus.Enabled = false;
txtSafetyBonus.Enabled = false;
btnSave.Hidden = true;
// 商务
if (foview.First().BuyerId == CurrUser.UserId)
{
txtReviewOfFC.Enabled = true;
lbPriceEvaluation.Enabled = false;
txtPriceEvaluation1.Enabled = true;
txtPriceEvaluation2.Enabled = true;
cbPriceLevel.Enabled = true;
txtEnumeration.Enabled = true;
btnSave.Hidden = false;
2025-01-22 14:30:40 +08:00
}
2024-05-08 10:17:02 +08:00
// 合同员
if (foview.First().Contract_Admin == CurrUser.UserId)
{
2025-01-22 14:30:40 +08:00
//cbNCR.Enabled = true;
2024-05-08 10:17:02 +08:00
numNCRTime.Enabled = true;
2025-01-22 14:30:40 +08:00
//cbInquiry.Enabled = true;
2024-05-08 10:17:02 +08:00
numInquiryTime.Enabled = true;
2025-01-22 14:30:40 +08:00
numWorkRe.Enabled = true;
txtGreenTimes.Enabled = true;
txtYellowGreenTimes.Enabled = true;
txtYellowTimes.Enabled = true;
txtRedYellowTimes.Enabled = true;
txtRedTimes.Enabled = true;
numOthers.Enabled = true;
//cbAuditResult.Enabled = true;
2024-05-08 10:17:02 +08:00
btnSave.Hidden = false;
}
// 主协调员
if (foview.First().Main_CoordinatorId == CurrUser.UserId)
{
txtForecasted.Enabled = true;
txtTechnicalBonus.Enabled = true;
2025-01-22 14:30:40 +08:00
//cbIsOthers.Enabled = true;
numOthers.Enabled = true;
//txtOtherDef.Enabled= true;
2024-05-08 10:17:02 +08:00
txtProposed.Enabled = true;
btnSave.Hidden = false;
}
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
//if (role != null && role.RoleName.Contains("CTK Engineer"))
var depart = BLL.DepartService.GetDepartById(CurrUser.DepartId);
// CT/K部门
//if (depart != null && depart.DepartCode.Contains("CT/K"))
//{
// cbBoQIsAudit.Enabled = true;
// txtBoQ.Enabled = true;
// btnSave.Hidden = false;
//}
// CTS/S角色
if (role != null && role.RoleName.Contains("CTS/S"))
{
txtSafetyBonus.Enabled = true;
btnSave.Hidden = false;
}
}
2025-01-22 14:30:40 +08:00
2024-05-08 10:17:02 +08:00
// 框架合同信息
2025-02-13 14:47:54 +08:00
2024-05-08 10:17:02 +08:00
txtSpending_commitment.Text = foview.First().Spending_commitment.ToString();
2025-02-13 10:06:57 +08:00
txtForecasted.Text = foview.First().Forecasted.ToString();
2024-05-08 10:17:02 +08:00
txtTotal.Text = foview.First().Total.ToString();
txtYearAvg.Text = foview.First().YearAvg.ToString();
txtFo.Text = foview.First().FO_NO;
txtContractor.Text = foview.First().Contractor;
txtDiscipline.Text = foview.First().Discipline;
txtValidate_Date.Text = foview.First().Validate_Date.HasValue ? foview.First().Validate_Date.Value.ToString("yyyy-MM-dd") : "";
txtExpire_Date.Text = foview.First().Expire_Date.HasValue ? foview.First().Expire_Date.Value.ToString("yyyy-MM-dd") : "";
txtPercentage.Text = foview.First().VolumeAllocation;
txtYearDiff.Text = foview.First().YearDiff.ToString();
2025-01-22 14:30:40 +08:00
if (foview.First().IfExtend == "Y")
{
cbIfExtend.Checked = true;
}
else
{
cbIfExtend.Checked = false;
}
if (!string.IsNullOrEmpty(foview.First().PreviousFO))
{
txtPreviousFO.Text = foview.First().PreviousFO.ToString();
}
var d = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(txtPreviousFO.Text.Trim());
if (d != null)
{
txtFoValidateDate.Text = d.Validate_Date.HasValue ? string.Format("{0:yyyy-MM-dd}", d.Validate_Date) : "";
txtFoExpiryDate.Text = d.Expire_Date.HasValue ? string.Format("{0:yyyy-MM-dd}", d.Expire_Date) : "";
}
2024-05-08 10:17:02 +08:00
// 采购
txtReviewOfFC.Text = foview.First().ReviewOfFC;
txtPriceEvaluation1.Text = foview.First().PriceEvaluation1;
txtPriceEvaluation2.Text = foview.First().PriceEvaluation2;
if (!string.IsNullOrEmpty(foview.First().PriceLevel))
{
cbPriceLevel.SelectedValueArray = new string[] { foview.First().PriceLevel };
}
txtEnumeration.Text = foview.First().Enumeration;
2025-02-13 10:06:57 +08:00
numInquiryTime.Text = foview.First().InterviewTimes.ToString();//约谈
numNCRTime.Text = foview.First().NCRTimes.ToString();//NCR
numWorkRe.Text = foview.First().RectificationTimes.ToString();//停工整改
2025-01-22 14:30:40 +08:00
txtGreenTimes.Text = foview.First().GreenTimes.ToString();
txtYellowGreenTimes.Text = foview.First().YellowGreenTimes.ToString();
txtYellowTimes.Text = foview.First().YellowTimes.ToString();
txtRedYellowTimes.Text = foview.First().RedYellowTimes.ToString();
txtRedTimes.Text = foview.First().RedTimes.ToString();
if (txtGreenTimes.Text.Trim() == "0" && txtYellowGreenTimes.Text.Trim() == "0" && txtYellowTimes.Text.Trim() == "0" && txtRedYellowTimes.Text.Trim() == "0" && txtRedTimes.Text.Trim() == "0")
2024-05-08 10:17:02 +08:00
{
2025-01-22 14:30:40 +08:00
cbNotAudit.Checked = true;
2024-05-08 10:17:02 +08:00
}
2025-01-22 14:30:40 +08:00
numOthers.Text = foview.First().OthersNum.ToString();
2025-02-13 10:06:57 +08:00
txtTechnicalBonus.Text = foview.First().TechnicalBonusMalus.ToString();
if (!string.IsNullOrEmpty(foview.First().SafetyBonus))
{
txtSafetyBonus.Text = Funs.GetNewDecimalOrZero(foview.First().SafetyBonus).ToString();
}
2024-05-08 10:17:02 +08:00
}
else
{
}
2025-02-13 10:06:57 +08:00
int s = 0;
2024-05-08 10:17:02 +08:00
DateTime startDate = DateTime.Now.AddMonths(-23);
DateTime startTime = DateTime.Parse(startDate.Year + "-" + startDate.Month + "-01");
DateTime endTime = DateTime.Parse(DateTime.Now.Year + "-" + DateTime.Now.Month + "-13");
2025-02-13 10:06:57 +08:00
//绩效评估最终计算是每月12日如果每月12日导出那么此上月的数据的报告分数不显示
if (DateTime.Now.Day <= 12)
{
DateTime dtime = DateTime.Now.AddMonths(-2);
endTime = DateTime.Parse(dtime.Year + "-" + dtime.Month + "-13");
}
else
{
DateTime dtime = DateTime.Now.AddMonths(-1);
endTime = DateTime.Parse(dtime.Year + "-" + dtime.Month + "-13");
}
2024-05-08 10:17:02 +08:00
2025-02-13 10:06:57 +08:00
if (cbIfExtend.Checked)//续签合同如果2年数据跨域两个合同期本合同周期的评分使用加粗字体
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
List<SqlParameter> yearToDateParam = new List<SqlParameter>();
yearToDateParam.Add(new SqlParameter("@StartTime", startTime));
yearToDateParam.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam.Add(new SqlParameter("@FoNo", foNo));
SqlParameter[] yearToDateParList = yearToDateParam.ToArray();
var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList);
2024-05-08 10:17:02 +08:00
2025-02-13 10:06:57 +08:00
//上一轮合同
var fo = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(foNo);
if (fo != null)
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
if (!string.IsNullOrEmpty(fo.PreviousFO))
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
List<SqlParameter> yearToDateParam2 = new List<SqlParameter>();
yearToDateParam2.Add(new SqlParameter("@StartTime", startTime));
yearToDateParam2.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam2.Add(new SqlParameter("@FoNo", fo.PreviousFO));
SqlParameter[] yearToDateParList2 = yearToDateParam2.ToArray();
var sesDataTable2 = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList2);
2025-02-13 14:47:54 +08:00
2025-02-13 10:06:57 +08:00
sesDataTable.Merge(sesDataTable2);
2024-05-08 10:17:02 +08:00
}
2025-02-13 10:06:57 +08:00
}
var sesDataScore = JsonConvert.DeserializeObject<List<YearToDateModel>>(JsonConvert.SerializeObject(sesDataTable));
string strSql = "SELECT * FROM dbo.YearsScore";
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
Grid1.DataSource = dt;
Grid1.DataBind();
for (int j = 0; j < 24; j++)
{
var curDate = DateTime.Parse("" + startDate.Year + "-" + startDate.Month + "-01").AddMonths(j);
if (j >= 0 && j < 12)
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
Grid1.Rows[0].Values[j + 1] = curDate.ToString("yyyy-MM");
2025-02-13 14:47:54 +08:00
//if (j == 0)
//{
Grid1.Rows[0].Values[0] = "1st Year";
Grid1.Rows[1].Values[0] = "";
Grid1.Rows[2].Values[0] = "2st Year";
Grid1.Rows[3].Values[0] = "";
//}
//else
//{
2025-02-13 10:06:57 +08:00
if (sesDataScore.Count(p => p.dataMonth == curDate.ToString("yyyy-MM")) > 0 && Funs.GetNewDecimal(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore) > 0)
{
var yearNums = float.Parse(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore).ToString("0.##");
Grid1.Rows[1].Values[j + 1] = yearNums;
//设置字体加粗
var sesFo = sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).FO_NO;
if (sesFo == foNo)
{
Grid1.Rows[1].Values[j + 1] = "<font style='font-weight: bold'>" + yearNums + "</font>";
}
//记录小于60分的次数
if (Funs.GetNewDecimalOrZero(yearNums) < 60)
{
s++;
}
}
else
{
Grid1.Rows[1].Values[j + 1] = "";
}
2025-02-13 14:47:54 +08:00
//}
2025-02-13 10:06:57 +08:00
}
if (j >= 12 && j < 24)
{
Grid1.Rows[2].Values[j - 11] = curDate.ToString("yyyy-MM");
2024-05-08 10:17:02 +08:00
if (sesDataScore.Count(p => p.dataMonth == curDate.ToString("yyyy-MM")) > 0 && Funs.GetNewDecimal(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore) > 0)
{
var yearNums = float.Parse(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore).ToString("0.##");
2025-02-13 10:06:57 +08:00
Grid1.Rows[3].Values[j - 11] = yearNums;
//本期合同字体加粗
var sesFo = sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).FO_NO;
if (sesFo == foNo)
{
Grid1.Rows[3].Values[j - 11] = "<font style='font-weight: bold'>" + yearNums + "</font>";
}
//记录小于60的次数
2025-01-22 14:30:40 +08:00
if (Funs.GetNewDecimalOrZero(yearNums) < 60)
{
s++;
}
2024-05-08 10:17:02 +08:00
}
else
{
2025-02-13 10:06:57 +08:00
Grid1.Rows[3].Values[j - 11] = "";
2024-05-08 10:17:02 +08:00
}
}
}
2025-02-13 10:06:57 +08:00
}
else
{
List<SqlParameter> yearToDateParam = new List<SqlParameter>();
yearToDateParam.Add(new SqlParameter("@StartTime", startTime));
yearToDateParam.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam.Add(new SqlParameter("@FoNo", foNo));
SqlParameter[] yearToDateParList = yearToDateParam.ToArray();
var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList);
var sesDataScore = JsonConvert.DeserializeObject<List<YearToDateModel>>(JsonConvert.SerializeObject(sesDataTable));
string strSql = "SELECT * FROM dbo.YearsScore";
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
Grid1.DataSource = dt;
Grid1.DataBind();
for (int j = 0; j < 24; j++)
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
var curDate = DateTime.Parse("" + startDate.Year + "-" + startDate.Month + "-01").AddMonths(j);
if (j >= 0 && j < 12)
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
Grid1.Rows[0].Values[j + 1] = curDate.ToString("yyyy-MM");
2025-02-13 14:47:54 +08:00
//if (j == 0)
//{
Grid1.Rows[0].Values[0] = "1st Year";
Grid1.Rows[1].Values[0] = "";
Grid1.Rows[2].Values[0] = "2st Year";
Grid1.Rows[3].Values[0] = "";
//}
//else
//{
if (sesDataScore.Count(p => p.dataMonth == curDate.ToString("yyyy-MM")) > 0 && Funs.GetNewDecimal(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore) > 0)
2025-02-13 10:06:57 +08:00
{
var yearNums = float.Parse(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore).ToString("0.##");
Grid1.Rows[1].Values[j + 1] = yearNums;
if (Funs.GetNewDecimalOrZero(yearNums) < 60)
{
s++;
}
}
else
{
Grid1.Rows[1].Values[j + 1] = "";
}
2025-02-13 14:47:54 +08:00
//}
2025-02-13 10:06:57 +08:00
2024-05-08 10:17:02 +08:00
}
2025-02-13 10:06:57 +08:00
if (j >= 12 && j < 24)
2024-05-08 10:17:02 +08:00
{
2025-02-13 10:06:57 +08:00
Grid1.Rows[2].Values[j - 11] = curDate.ToString("yyyy-MM");
if (sesDataScore.Count(p => p.dataMonth == curDate.ToString("yyyy-MM")) > 0 && Funs.GetNewDecimal(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore) > 0)
{
var yearNums = float.Parse(sesDataScore.FirstOrDefault(p => p.dataMonth == curDate.ToString("yyyy-MM")).SumScore).ToString("0.##");
Grid1.Rows[3].Values[j - 11] = yearNums;
if (Funs.GetNewDecimalOrZero(yearNums) < 60)
{
s++;
}
}
else
{
Grid1.Rows[3].Values[j - 11] = "";
}
2024-05-08 10:17:02 +08:00
}
}
}
2025-01-22 14:30:40 +08:00
string rs = string.Empty;
if (s >= 3 && foview.First().NCRTimes >= 3)
{
2025-02-13 10:06:57 +08:00
rs = "序号1该合同累计3次月度评估低于60分, 不得参与下轮合同\r\n序号2该合同累计三个NCR提前终止合同且不得参与下轮合同";
2025-01-22 14:30:40 +08:00
}
else if (s >= 3)
{
rs = "序号1该合同累计3次月度评估低于60分, 不得参与下轮合同";
}
else if (foview.First().NCRTimes >= 3)
{
rs = "序号1该合同累计三个NCR提前终止合同且不得参与下轮合同";
}
2025-02-13 14:47:54 +08:00
if (!string.IsNullOrEmpty(foview.First().Proposed) && !string.IsNullOrEmpty(rs))
2025-02-13 10:06:57 +08:00
{
txtProposed.Text = rs + "\r\n" + foview.First().Proposed;
}
2025-02-13 14:47:54 +08:00
else if (!string.IsNullOrEmpty(foview.First().Proposed) && string.IsNullOrEmpty(rs))
{
txtProposed.Text = foview.First().Proposed;
}
2025-02-13 10:06:57 +08:00
else
{
txtProposed.Text = rs;
}
2024-05-08 10:17:02 +08:00
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string foNo = Request.Params["foNo"];
Model.FC_SESRelatedData newFo = Funs.DB.FC_SESRelatedData.FirstOrDefault(x => x.FO_NO == foNo);
if (newFo != null)
{
if (txtForecasted.Text!=string.Empty)
{
newFo.Forecasted = Convert.ToDecimal(txtForecasted.Text);
}
newFo.ReviewOfFC= txtReviewOfFC.Text.Trim();
newFo.PriceEvaluation1= txtPriceEvaluation1.Text.Trim();
newFo.PriceEvaluation2= txtPriceEvaluation2.Text.Trim();
if (cbPriceLevel.SelectedValueArray.Length>0)
{
newFo.PriceLevel = cbPriceLevel.SelectedValueArray[0].ToString();
}
newFo.Enumeration= txtEnumeration.Text.Trim();
// 合同员
2025-01-22 14:30:40 +08:00
//if (cbInquiry.SelectedValueArray.Length > 0)
//{
// newFo.IsInquiry = Convert.ToBoolean(cbInquiry.SelectedValueArray[0].ToString());
//}
//else if (newFo.Contract_Admin == CurrUser.UserId)
//{
// Alert.ShowInTop("若无Interview请勾选无No!", MessageBoxIcon.Warning);
// return;
//}
2024-05-08 10:17:02 +08:00
if (!string.IsNullOrEmpty(numInquiryTime.Text))
{
newFo.InquiryNum = Convert.ToInt32(numInquiryTime.Text);
}
2025-01-22 14:30:40 +08:00
//if (cbNCR.SelectedValueArray.Length>0)
//{
// newFo.NCRIsReview = Convert.ToBoolean(cbNCR.SelectedValueArray[0].ToString());
//}
//else if (newFo.Contract_Admin == CurrUser.UserId)
//{
// Alert.ShowInTop("若无Review请勾选无No!", MessageBoxIcon.Warning);
// return;
//}
2024-05-08 10:17:02 +08:00
if (!string.IsNullOrEmpty(numNCRTime.Text))
{
newFo.NCRReviewNum = Convert.ToInt32(numNCRTime.Text);
}
2025-01-22 14:30:40 +08:00
//if (cbAuditResult.SelectedValueArray.Length>0)
//{
// newFo.AuditResult = cbAuditResult.SelectedValueArray[0].ToString();
//}
//else if (newFo.Contract_Admin == CurrUser.UserId)
//{
// Alert.ShowInTop("若无FC EHSQ Audit result ,请勾选无不适用!", MessageBoxIcon.Warning);
// return;
//}
2024-05-08 10:17:02 +08:00
//if (cbBoQIsAudit.SelectedValueArray.Length>0)
//{
// newFo.BoQIsAudit = Convert.ToBoolean(cbBoQIsAudit.SelectedValueArray[0].ToString());
//}
2025-01-22 14:30:40 +08:00
//newFo.BoQAuditComments= txtBoQ.Text.Trim();
2024-05-08 10:17:02 +08:00
2025-01-22 14:30:40 +08:00
//if (cbIsOthers.SelectedValueArray.Length>0)
//{
// newFo.IsOthers = Convert.ToBoolean(cbIsOthers.SelectedValueArray[0].ToString());
//}
//else if (newFo.Main_Coordinator == CurrUser.UserId)
2024-05-16 10:17:34 +08:00
//{
2025-01-22 14:30:40 +08:00
// Alert.ShowInTop("若无Others 请勾选无No!", MessageBoxIcon.Warning);
// return;
2024-05-16 10:17:34 +08:00
//}
2025-01-22 14:30:40 +08:00
if (!string.IsNullOrEmpty(numOthers.Text))
{
newFo.OthersNum = Convert.ToInt32(numOthers.Text);
}
//newFo.OtherDef = txtOtherDef.Text.Trim();
2024-05-08 10:17:02 +08:00
newFo.TechnicalBonus = txtTechnicalBonus.Text.Trim();
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
2025-02-13 10:06:57 +08:00
//if (txtSafetyBonus.Text != string.Empty)
//{
2024-05-08 10:17:02 +08:00
newFo.SafetyBonus = txtSafetyBonus.Text.Trim();
2025-02-13 10:06:57 +08:00
//}
//else if (role != null && role.RoleName.Contains("CTS/S"))
//{
// Alert.ShowInTop("若无加减分,请填写无!", MessageBoxIcon.Warning);
// return;
//}
2024-05-08 10:17:02 +08:00
newFo.Proposed= txtProposed.Text.Trim();
Funs.DB.SubmitChanges();
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify FC List!");
ShowNotify("Save successfully!", MessageBoxIcon.Success);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
protected void Forecasted_OnTextChanged(object sender, EventArgs e)
{
if (txtForecasted.Text != string.Empty)
{
txtTotal.Text = (Convert.ToDecimal(txtForecasted.Text) + Convert.ToDecimal(txtSpending_commitment.Text != string.Empty ? txtSpending_commitment.Text : "0")).ToString();
if (txtYearDiff.Text != string.Empty && Convert.ToDecimal(txtYearDiff.Text) != 0)
{
txtYearAvg.Text = ((Convert.ToDecimal(txtForecasted.Text) + Convert.ToDecimal(txtSpending_commitment.Text != string.Empty ? txtSpending_commitment.Text : "0")) / Convert.ToDecimal(txtYearDiff.Text)).ToString("0.00");
}
}
}
#region
/// <summary>
/// 实体
/// </summary>
public class YearToDateModel
{
public string FO_NO { get; set; } = string.Empty;
public string dataMonth { get; set; } = string.Empty;
public string SumScore { get; set; } = string.Empty;
}
#endregion
}
}