提交代码

This commit is contained in:
2023-11-26 17:43:05 +08:00
parent 206d2c5c43
commit 560f6d8b7b
7 changed files with 340 additions and 158 deletions
@@ -139,6 +139,10 @@ namespace FineUIPro.Web.common
var table = GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString());
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString());
decimal notCompleteDin = totalDin - finishSize;
this.lbNotCompleteDinTotal.Text = notCompleteDin.ToString();
}
/// <summary>
@@ -220,5 +224,48 @@ namespace FineUIPro.Web.common
return;
}
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnQueryTotal_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtLeaveDayTotal.Text.Trim()))
{
ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWorkEfficiencyTotal.Text.Trim()))
{
ShowNotify("请输入日工效!", MessageBoxIcon.Warning);
return;
}
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString());
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString());
decimal notCompleteDin = totalDin - finishSize;
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDayTotal.Text.Trim());
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiencyTotal.Text.Trim());
if (notCompleteDin > 0)
{
if (leaveDay == 0)
{
ShowNotify("剩余工期(天)为0", MessageBoxIcon.Warning);
return;
}
if (workEfficiency == 0)
{
ShowNotify("日工效为0", MessageBoxIcon.Warning);
return;
}
this.lbNeedWelderNumTotal.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
}
else
{
ShowNotify("未完成达因为0", MessageBoxIcon.Warning);
return;
}
}
}
}