Ejemplo n.º 1
0
 /// <summary>
 /// 根据费用汇总主键删除一个费用汇总信息
 /// </summary>
 /// <param name="pauseNoticeCode">费用汇总主键</param>
 public static void DeleteCostStatisticByCostStatisticCode(string costStatisticCode)
 {
     Model.SUBHSSEDB        db = Funs.DB;
     Model.TC_CostStatistic tc_CostStatistic = db.TC_CostStatistic.FirstOrDefault(e => e.CostStatisticCode == costStatisticCode);
     if (tc_CostStatistic != null)
     {
         db.TC_CostStatistic.DeleteOnSubmit(tc_CostStatistic);
         db.SubmitChanges();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 增加费用汇总信息
 /// </summary>
 /// <param name="pauseNotice">费用汇总实体</param>
 public static void AddCostStatistic(Model.TC_CostStatistic tc_CostStatistic)
 {
     Model.SUBHSSEDB        db = Funs.DB;
     Model.TC_CostStatistic newtc_CostStatistic = new Model.TC_CostStatistic
     {
         CostStatisticCode = tc_CostStatistic.CostStatisticCode,
         ProjectId         = tc_CostStatistic.ProjectId,
         Months            = tc_CostStatistic.Months,
         CompileMan        = tc_CostStatistic.CompileMan,
         CompileDate       = tc_CostStatistic.CompileDate
     };
     db.TC_CostStatistic.InsertOnSubmit(newtc_CostStatistic);
     db.SubmitChanges();
 }