提交代码

This commit is contained in:
2024-05-06 15:57:32 +08:00
parent ea6bbd39f8
commit 90f61fc20d
11 changed files with 685 additions and 216 deletions
@@ -436,9 +436,9 @@ namespace FineUIPro.Web.JDGL.Check
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
if (string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
ShowNotify("请选择开始、结束日期", MessageBoxIcon.Warning);
ShowNotify("请选择月份", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(errorInfos))
@@ -447,8 +447,7 @@ namespace FineUIPro.Web.JDGL.Check
var quantityCompletionLists = from x in Funs.DB.JDGL_QuantityCompletion where x.ProjectId == this.ProjectId select x;
string quantityListId = string.Empty;
int a = quantityCompletions.Count();
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
for (int i = 0; i < a; i++)
{
var oldQuantityList = quantityLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Name == quantityCompletions[i].Name);
@@ -470,7 +469,7 @@ namespace FineUIPro.Web.JDGL.Check
oldQuantityList.DesignNum = quantityCompletions[i].DesignNum;
BLL.QuantityListService.UpdateQuantityList(oldQuantityList);
}
var oldQuantityCompletion = quantityCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.QuantityListId == quantityListId && x.StartDate == startDate && x.EndDate == endDate);
var oldQuantityCompletion = quantityCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.QuantityListId == quantityListId && x.Months == month);
if (oldQuantityCompletion == null)
{
Model.JDGL_QuantityCompletion newQuantityCompletion = new Model.JDGL_QuantityCompletion();
@@ -482,8 +481,7 @@ namespace FineUIPro.Web.JDGL.Check
newQuantityCompletion.NextNum = quantityCompletions[i].NextNum;
newQuantityCompletion.CompileMan = this.CurrUser.UserId;
newQuantityCompletion.CompileDate = DateTime.Now;
newQuantityCompletion.StartDate = startDate;
newQuantityCompletion.EndDate = endDate;
newQuantityCompletion.Months = month;
BLL.QuantityCompletionService.AddQuantityCompletion(newQuantityCompletion);
}
else