代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
{
|
||||
string strSql = @" SELECT CostManage.CostManageId, CostManage.ProjectId,CostManage.UnitId,Unit.UnitName,CostManage.ContractNum,CostManage.CostManageDate,
|
||||
CostManage.States,(CASE WHEN CostManage.States =1 THEN '审核中' WHEN CostManage.States =2 THEN '已完成' ELSE '待提交' END) AS StatesName,
|
||||
CostManage.CompileMan,Users.PersonName AS CompileManName,CostManage.CompileDate,CostManage.SumMoney
|
||||
@@ -62,7 +62,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
LEFT JOIN Person_Persons AS Users ON CostManage.CompileMan = Users.PersonId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND CostManage.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageEdit.aspx?CostManageId={0}", costManage.CostManageId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageView.aspx?CostManageId={0}", costManage.CostManageId, "查看 - ")));
|
||||
}
|
||||
@@ -304,7 +304,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
else
|
||||
{
|
||||
strValue="待【"+Person_PersonsService.GetPersonsNameById(costManage.CompileMan) +"】提交";
|
||||
strValue = "待【" + Person_PersonsService.GetPersonsNameById(costManage.CompileMan) + "】提交";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +314,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
#endregion
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
{
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -348,7 +348,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
else
|
||||
{
|
||||
string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum,costManageId);
|
||||
string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum, costManageId);
|
||||
if (string.IsNullOrEmpty(messaage))
|
||||
{
|
||||
Alert.ShowInTop("推送成功!", MessageBoxIcon.Success);
|
||||
|
||||
@@ -60,27 +60,27 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.CostManageId = Request.Params["CostManageId"];
|
||||
var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
this.ProjectId = costManage.ProjectId;
|
||||
this.drpUnit.Text = UnitService.GetUnitNameByUnitId(costManage.UnitId);
|
||||
|
||||
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
BindGrid();
|
||||
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(this.ProjectId);
|
||||
this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(this.ProjectId, costManage.UnitId).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, costManage.UnitId , this.CostManageId).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, costManage.UnitId, this.CostManageId).ToString();
|
||||
NowFlow = CostManageService.getNowCostManageFlowOperateList(costManage.CostManageId);
|
||||
if (NowFlow != null)
|
||||
{
|
||||
this.txtOpinion.Text = NowFlow.Opinion;
|
||||
}
|
||||
|
||||
NextFlow = CostManageService.getNextCostManageFlowOperateList(costManage.CostManageId,this.CurrUser.PersonId);
|
||||
|
||||
NextFlow = CostManageService.getNextCostManageFlowOperateList(costManage.CostManageId, this.CurrUser.PersonId);
|
||||
if (NextFlow != null)
|
||||
{
|
||||
Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpNextMan, this.ProjectId, NextFlow.UnitId, true);
|
||||
@@ -120,7 +120,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
JObject summary = new JObject();
|
||||
summary.Add("InvestCostProject", "本次申请合计金额(元)");
|
||||
summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0));
|
||||
summary.Add("PriceMoney", getItem.Sum(x => x.PriceMoney ?? 0));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BindGrid2
|
||||
@@ -142,7 +142,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
private void BindGrid2()
|
||||
{
|
||||
var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == this.CostManageId
|
||||
where x.CostManageId == this.CostManageId
|
||||
select new
|
||||
{
|
||||
x.FlowOperateId,
|
||||
@@ -150,9 +150,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
x.AuditFlowName,
|
||||
x.SortIndex,
|
||||
x.UnitId,
|
||||
UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName,
|
||||
UnitName = Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
x.OperaterId,
|
||||
OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
OperaterName = Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
x.OperaterTime,
|
||||
x.IsAgree,
|
||||
x.Opinion,
|
||||
@@ -172,14 +172,14 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (this.drpNextMan.SelectedValue == BLL.Const._Null && this.rblIsAgree.SelectedValue == "1" && NextFlow != null)
|
||||
{
|
||||
Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.SaveData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -187,7 +187,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData()
|
||||
{
|
||||
{
|
||||
var getCost = CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (getCost != null)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
if (this.rblIsAgree.SelectedValue == "0") ///不同意 直接打回编制人
|
||||
{
|
||||
isAgree = false;
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + ","+ this.txtOpinion.Text;
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + "," + this.txtOpinion.Text;
|
||||
getCost.States = BLL.Const.State_0;
|
||||
getCost.NextManId = getCost.CompileMan;
|
||||
BLL.CostManageService.UpdateCostManage(getCost);
|
||||
@@ -203,7 +203,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
else
|
||||
{
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text+"。";
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + "。";
|
||||
NowFlow.IsClosed = true;
|
||||
if (NextFlow != null)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
BLL.CostManageService.updateCostManageFlowOperate(NextFlow);
|
||||
|
||||
getCost.NextManId = this.drpNextMan.SelectedValue;
|
||||
BLL.CostManageService.UpdateCostManage(getCost);
|
||||
BLL.CostManageService.UpdateCostManage(getCost);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -222,12 +222,12 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
|
||||
NowFlow.IsAgree = isAgree;
|
||||
NowFlow.OperaterTime = DateTime.Now;
|
||||
NowFlow.OperaterTime = DateTime.Now;
|
||||
BLL.CostManageService.updateCostManageFlowOperate(NowFlow);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
@@ -241,7 +241,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
JObject summary = new JObject();
|
||||
summary.Add("InvestCostProject", "本次申请合计金额(元)");
|
||||
summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0));
|
||||
summary.Add("PriceMoney", getItem.Sum(x => x.PriceMoney ?? 0));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增费用申请情况
|
||||
@@ -167,7 +167,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
this.Edit();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
@@ -238,7 +238,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
private void BindGrid2()
|
||||
{
|
||||
var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == this.CostManageId
|
||||
where x.CostManageId == this.CostManageId
|
||||
select new
|
||||
{
|
||||
x.FlowOperateId,
|
||||
@@ -246,16 +246,16 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
x.AuditFlowName,
|
||||
x.SortIndex,
|
||||
x.UnitId,
|
||||
UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName,
|
||||
UnitName = Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
x.OperaterId,
|
||||
OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
OperaterName = Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
x.OperaterTime,
|
||||
x.IsAgree,
|
||||
x.Opinion,
|
||||
x.IsClosed
|
||||
};
|
||||
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x=>x.SortIndex);
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x => x.SortIndex);
|
||||
this.Grid2.DataBind();
|
||||
}
|
||||
#endregion
|
||||
@@ -278,7 +278,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (this.drpNextMan.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning);
|
||||
@@ -311,8 +311,8 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
CompileMan = this.CurrUser.PersonId,
|
||||
CompileDate = DateTime.Now,
|
||||
};
|
||||
var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
if (costManageItems.Count ==0)
|
||||
var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
if (costManageItems.Count == 0)
|
||||
{
|
||||
costManage.SumMoney = decimal.Parse(txtHseCost.Text.Trim());
|
||||
}
|
||||
@@ -326,16 +326,16 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
costManage.NextManId = costManage.CompileMan;
|
||||
}
|
||||
|
||||
var getCost= CostManageService.GetCostManageById(this.CostManageId);
|
||||
var getCost = CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (getCost != null)
|
||||
{
|
||||
{
|
||||
costManage.CostManageId = this.CostManageId;
|
||||
BLL.CostManageService.UpdateCostManage(costManage);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, costManage.CostManageCode, costManage.CostManageId, BLL.Const.ProjectCostManageMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
costManage.CostManageCode = Funs.GetNewFileName();
|
||||
costManage.CostManageCode = Funs.GetNewFileName();
|
||||
costManage.CostManageId = this.CostManageId;
|
||||
BLL.CostManageService.AddCostManage(costManage);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, costManage.CostManageCode, costManage.CostManageId, BLL.Const.ProjectCostManageMenuId, BLL.Const.BtnAdd);
|
||||
@@ -343,10 +343,10 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
if (type == Const.BtnSubmit)
|
||||
{
|
||||
var getNext=CostManageService.getNextCostManageFlowOperateList(this.CostManageId, this.CurrUser.PersonId);
|
||||
if(getNext != null)
|
||||
var getNext = CostManageService.getNextCostManageFlowOperateList(this.CostManageId, this.CurrUser.PersonId);
|
||||
if (getNext != null)
|
||||
{
|
||||
getNext.OperaterId = this.drpNextMan.SelectedValue ;
|
||||
getNext.OperaterId = this.drpNextMan.SelectedValue;
|
||||
CostManageService.updateCostManageFlowOperate(getNext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Model;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
@@ -63,7 +61,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
this.drpSupCostType.SelectedValue = costManageItem.SupCostTypeId;
|
||||
CostTypeService.InitCostTypeItemDropDownList(this.drpCostType, this.drpSupCostType.SelectedValue, false);
|
||||
this.drpCostType.SelectedValue = costManageItem.CostTypeId;
|
||||
this.txtInvestCostProject.Text= costManageItem.InvestCostProject;
|
||||
this.txtInvestCostProject.Text = costManageItem.InvestCostProject;
|
||||
if (costManageItem.PriceMoney != null)
|
||||
{
|
||||
this.txtPriceMoney.Text = Convert.ToString(costManageItem.PriceMoney);
|
||||
@@ -91,7 +89,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
PriceMoney = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim()),
|
||||
};
|
||||
|
||||
var getSupType =CostTypeService.GetCostTypeById(this.drpSupCostType.SelectedValue);
|
||||
var getSupType = CostTypeService.GetCostTypeById(this.drpSupCostType.SelectedValue);
|
||||
if (getSupType != null)
|
||||
{
|
||||
costManageItem.SupCostTypeId = getSupType.CostTypeId;
|
||||
@@ -102,7 +100,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
isSave = false;
|
||||
}
|
||||
var getCostType=CostTypeService.GetCostTypeItemById(this.drpCostType.SelectedValue);
|
||||
var getCostType = CostTypeService.GetCostTypeItemById(this.drpCostType.SelectedValue);
|
||||
if (getCostType != null)
|
||||
{
|
||||
costManageItem.CostTypeId = getCostType.CostTypeItemId;
|
||||
@@ -144,7 +142,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void drpSupCostType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CostTypeService.InitCostTypeItemDropDownList(this.drpCostType,this.drpSupCostType.SelectedValue, false);
|
||||
CostTypeService.InitCostTypeItemDropDownList(this.drpCostType, this.drpSupCostType.SelectedValue, false);
|
||||
}
|
||||
|
||||
#region 附件上传
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
if (costManage != null)
|
||||
{
|
||||
strProjectId = costManage.ProjectId;
|
||||
this.drpUnit.Text=UnitService.GetUnitNameByUnitId(costManage.UnitId);
|
||||
this.drpUnit.Text = UnitService.GetUnitNameByUnitId(costManage.UnitId);
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(strProjectId);
|
||||
this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(strProjectId, costManage.UnitId).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(strProjectId, costManage.UnitId, this.CostManageId).ToString();
|
||||
@@ -113,7 +113,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
x.IsClosed
|
||||
};
|
||||
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x=> x.SortIndex);
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x => x.SortIndex);
|
||||
this.Grid2.DataBind();
|
||||
if (FlowOperates.FirstOrDefault(x => x.OperaterId != null) != null)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
@@ -86,23 +83,23 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
sDate = getMinYear.Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = (sDate + i).ToString() + "年(元)";
|
||||
gr.HeaderTextAlign= TextAlign.Center;
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = (sDate + i).ToString() +"a";
|
||||
bf.DataField = (sDate + i).ToString() + "a";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = (sDate + i).ToString() +"b";
|
||||
bf.DataField = (sDate + i).ToString() + "b";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.Width = 100;
|
||||
@@ -112,7 +109,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Grid1.Columns.Add(gr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = "合计(元)";
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
@@ -135,7 +132,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
Grid1.Columns.Add(gr);
|
||||
Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" };
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -180,10 +177,10 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
DataTable table = new DataTable();
|
||||
table.Columns.Add(new DataColumn("Id", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString() +"a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString() + "a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString() + "b", typeof(string)));
|
||||
}
|
||||
|
||||
@@ -219,7 +216,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem
|
||||
join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States==Const.State_2
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States == Const.State_2
|
||||
select new { x.CostManageId, x.CostManageItemId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney };
|
||||
|
||||
foreach (var item in getType)
|
||||
@@ -278,10 +275,10 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
@@ -325,9 +322,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BLL;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -32,7 +31,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
InitUnitGrid();
|
||||
}
|
||||
|
||||
protected static List<Model.Base_Unit> getUnit= new List<Model.Base_Unit>();
|
||||
protected static List<Model.Base_Unit> getUnit = new List<Model.Base_Unit>();
|
||||
protected static List<Model.Base_Unit> getSUnit = new List<Model.Base_Unit>();
|
||||
|
||||
#region 按年份
|
||||
@@ -46,7 +45,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "编号";
|
||||
bf.Width = 60;
|
||||
bf.Hidden = true;
|
||||
bf.Hidden = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
@@ -68,9 +67,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId;
|
||||
getUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1
|
||||
select y).ToList();
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1
|
||||
select y).ToList();
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
@@ -78,9 +77,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId+"a";
|
||||
bf.DataField = item.UnitId + "a";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 100;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
@@ -94,9 +93,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Grid1.Columns.Add(gr);
|
||||
}
|
||||
getSUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2
|
||||
select y).ToList();
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2
|
||||
select y).ToList();
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
@@ -162,7 +161,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
@@ -191,9 +190,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId+"a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn(item.UnitId+"b", typeof(string)));
|
||||
}
|
||||
table.Columns.Add(new DataColumn(item.UnitId + "a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn(item.UnitId + "b", typeof(string)));
|
||||
}
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId + "a", typeof(string)));
|
||||
@@ -222,7 +221,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="table"></param>
|
||||
/// <param name="year"></param>
|
||||
private void SetTable(DataTable table, int? year)
|
||||
{
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year)
|
||||
@@ -312,7 +311,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
@@ -360,7 +359,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
protected void txtYear_ClearIconClick(object sender, EventArgs e)
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
@@ -107,7 +104,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" };
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -154,7 +151,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
DataTable table = new DataTable();
|
||||
table.Columns.Add(new DataColumn("Id", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString(), typeof(string)));
|
||||
@@ -174,11 +171,11 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
return table;
|
||||
}
|
||||
|
||||
private void SetTable(DataTable table,string unitId)
|
||||
private void SetTable(DataTable table, string unitId)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == this.drpUnit.SelectedValue)
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == this.drpUnit.SelectedValue)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
@@ -220,7 +217,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
int rSum = 3;
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i );
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i);
|
||||
if (getV.Count() > 0)
|
||||
{
|
||||
rowSum[rSum] = getV.Sum(x => x.CostMoney ?? 0);
|
||||
@@ -249,10 +246,10 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
@@ -364,7 +361,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
var getEx = ExpenseService.GetExpenseById(rowID);
|
||||
if (getEx != null && !string.IsNullOrEmpty(getEx.UnitId))
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete);
|
||||
BLL.ExpenseService.DeleteExpenseById(rowID);
|
||||
}
|
||||
}
|
||||
@@ -382,7 +379,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
InitUnitGrid();
|
||||
}
|
||||
|
||||
protected static List<Model.Base_Unit> getUnit= new List<Model.Base_Unit>();
|
||||
protected static List<Model.Base_Unit> getUnit = new List<Model.Base_Unit>();
|
||||
protected static List<Model.Base_Unit> getSUnit = new List<Model.Base_Unit>();
|
||||
|
||||
#region 按年份
|
||||
@@ -44,7 +44,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "编号";
|
||||
bf.Width = 60;
|
||||
bf.Hidden = true;
|
||||
bf.Hidden = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
@@ -66,28 +66,28 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId;
|
||||
getUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1
|
||||
select y).ToList();
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1
|
||||
select y).ToList();
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId;
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = item.UnitName+ "(元)";
|
||||
bf.HeaderText = item.UnitName + "(元)";
|
||||
bf.Width = 200;
|
||||
Grid1.Columns.Add(bf);
|
||||
}
|
||||
getSUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2
|
||||
select y).ToList();
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2
|
||||
select y).ToList();
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId;
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = item.UnitName+ "(元)";
|
||||
bf.HeaderText = item.UnitName + "(元)";
|
||||
bf.Width = 220;
|
||||
Grid1.Columns.Add(bf);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("ExpenseEdit.aspx") + "return false;";
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("ExpenseEdit.aspx") + "return false;";
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId, typeof(string)));
|
||||
}
|
||||
}
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId, typeof(string)));
|
||||
@@ -179,7 +179,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year)
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
@@ -229,12 +229,12 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
@@ -242,7 +242,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
@@ -357,7 +357,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
var getEx = ExpenseService.GetExpenseById(rowID);
|
||||
if (getEx != null && !string.IsNullOrEmpty(getEx.UnitId))
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete);
|
||||
BLL.ExpenseService.DeleteExpenseById(rowID);
|
||||
}
|
||||
}
|
||||
@@ -375,7 +375,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
@@ -58,7 +57,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
this.drpUnit.Readonly = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SetPage(BLL.ExpenseService.GetExpenseById(this.ExpenseId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user