代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HSSE.License;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -66,7 +64,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Model.CostGoods_Expense expense = new Model.CostGoods_Expense();
|
||||
if (string.IsNullOrEmpty(this.ExpenseId))
|
||||
{
|
||||
expense = Funs.DB.CostGoods_Expense.FirstOrDefault(x =>x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year == Funs.GetNewInt(this.txtYear.Text));
|
||||
expense = Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year == Funs.GetNewInt(this.txtYear.Text));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,9 +81,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
///
|
||||
/// </summary>
|
||||
private void SetPage(Model.CostGoods_Expense expense)
|
||||
{
|
||||
{
|
||||
if (expense != null)
|
||||
{
|
||||
{
|
||||
this.ExpenseId = expense.ExpenseId;
|
||||
this.ProjectId = expense.ProjectId;
|
||||
this.drpUnit.SelectedValue = expense.UnitId;
|
||||
@@ -105,7 +103,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
else
|
||||
{
|
||||
var index = Funs.DB.CostGoods_Expense.Where(x =>x.ProjectId == this.ProjectId && x.Year.ToString() == this.txtYear.Text).Max(x => x.SortIndex);
|
||||
var index = Funs.DB.CostGoods_Expense.Where(x => x.ProjectId == this.ProjectId && x.Year.ToString() == this.txtYear.Text).Max(x => x.SortIndex);
|
||||
if (index.HasValue)
|
||||
{
|
||||
this.lbSortIndex.Text = (index.Value + 1).ToString();
|
||||
@@ -128,8 +126,8 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Year = Funs.GetNewInt(this.txtYear.Text),
|
||||
SortIndex = Funs.GetNewIntOrZero(this.lbSortIndex.Text),
|
||||
};
|
||||
|
||||
ExpenseService.AddExpense(newExpense);
|
||||
|
||||
ExpenseService.AddExpense(newExpense);
|
||||
this.ExpenseId = newExpense.ExpenseId;
|
||||
ExpenseDetailService.AddCostDetail(this.ExpenseId);
|
||||
}
|
||||
@@ -173,21 +171,21 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
Model.CostGoods_Expense expense = new Model.CostGoods_Expense
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
ProjectId = this.ProjectId,
|
||||
UnitId = this.drpUnit.SelectedValue,
|
||||
ReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim()),
|
||||
ReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim()),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.PersonId,
|
||||
SortIndex = Funs.GetNewInt(this.lbSortIndex.Text),
|
||||
Year =Funs.GetNewInt(this.txtYear.Text),
|
||||
Year = Funs.GetNewInt(this.txtYear.Text),
|
||||
};
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ExpenseId))
|
||||
{
|
||||
expense.ExpenseId = this.ExpenseId;
|
||||
BLL.ExpenseService.UpdateExpense(expense);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, expense.ExpenseCode, expense.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnModify);
|
||||
// BLL.ExpenseDetailService.DeleteCostDetailByExpenseId(this.ExpenseId);
|
||||
// BLL.ExpenseDetailService.DeleteCostDetailByExpenseId(this.ExpenseId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,7 +230,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
if (this.drpUnit.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.txtYear.Text))
|
||||
{
|
||||
SetPage(Funs.DB.CostGoods_Expense.FirstOrDefault(x =>x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year.ToString() == this.txtYear.Text));
|
||||
SetPage(Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year.ToString() == this.txtYear.Text));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -244,7 +242,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
private List<Model.CostGoods_ExpenseDetail> jerqueSaveList()
|
||||
{
|
||||
var returnList = Funs.DB.CostGoods_ExpenseDetail.Where(x => x.ExpenseId == this.ExpenseId);
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
{
|
||||
string status = mergedRow.Value<string>("status");
|
||||
@@ -254,7 +252,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
item.CostMoney = Funs.GetNewDecimalOrZero(values.Value<string>("CostMoney"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return returnList.ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user