70 lines
3.5 KiB
C#
70 lines
3.5 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace BLL
|
|
{
|
|
public class ConstructionMonthReportMainCostService
|
|
{
|
|
public static Model.SGGLDB db = Funs.DB;
|
|
|
|
/// <summary>
|
|
/// 获取施工月报总包工程施工请款情况模板列表
|
|
/// </summary>
|
|
/// <param name="satartRowIndex"></param>
|
|
/// <param name="maximumRows"></param>
|
|
/// <returns></returns>
|
|
public static List<Model.ZHGL_ConstructionMonthReportMainCost> getListData(string ConstructionMonthReportId)
|
|
{
|
|
return (from x in Funs.DB.ZHGL_ConstructionMonthReportMainCost
|
|
where x.ConstructionMonthReportId == ConstructionMonthReportId
|
|
select x).ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 增加施工月报总包工程施工请款情况
|
|
/// </summary>
|
|
/// <param name="managerRuleApprove">施工月报总包工程施工请款情况实体</param>
|
|
public static void AddConstructionMonthReportMainCost(Model.ZHGL_ConstructionMonthReportMainCost ConstructionMonthReportMainCost)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.ZHGL_ConstructionMonthReportMainCost newApprove = new Model.ZHGL_ConstructionMonthReportMainCost();
|
|
newApprove.ConstructionMonthReportMainCostId = ConstructionMonthReportMainCost.ConstructionMonthReportMainCostId;
|
|
newApprove.ConstructionMonthReportId = ConstructionMonthReportMainCost.ConstructionMonthReportId;
|
|
newApprove.ContractConstructionCost = ConstructionMonthReportMainCost.ContractConstructionCost;
|
|
newApprove.ThisRequestCost = ConstructionMonthReportMainCost.ThisRequestCost;
|
|
newApprove.TotalRequestCost = ConstructionMonthReportMainCost.TotalRequestCost;
|
|
newApprove.ThisCollection = ConstructionMonthReportMainCost.ThisCollection;
|
|
newApprove.TotalCollection = ConstructionMonthReportMainCost.TotalCollection;
|
|
newApprove.TotalCollectionRate = ConstructionMonthReportMainCost.TotalCollectionRate;
|
|
|
|
db.ZHGL_ConstructionMonthReportMainCost.InsertOnSubmit(newApprove);
|
|
db.SubmitChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据月报id删除对应的所有施工月报总包工程施工请款情况
|
|
/// </summary>
|
|
/// <param name="ConstructionMonthReportId">施工月报总包工程施工请款情况编号</param>
|
|
public static void DeleteConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
var q = (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
|
if (q.Count() > 0)
|
|
{
|
|
db.ZHGL_ConstructionMonthReportMainCost.DeleteAllOnSubmit(q);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据月报id获取对应的所有施工月报总包工程施工请款情况
|
|
/// </summary>
|
|
/// <param name="ConstructionMonthReportId">施工月报总包工程施工请款情况编号</param>
|
|
public static List<Model.ZHGL_ConstructionMonthReportMainCost> GetConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
return (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
|
}
|
|
}
|
|
}
|