Beispiel #1
0
 /// <summary>
 /// 修改月报告信息
 /// </summary>
 /// <param name="monthReport">月报告实体</param>
 public static void UpdateMonthReport(Model.Manager_MonthReport monthReport)
 {
     Model.SUBHSSEDB           db             = Funs.DB;
     Model.Manager_MonthReport newMonthReport = db.Manager_MonthReport.FirstOrDefault(e => e.MonthReportId == monthReport.MonthReportId);
     if (newMonthReport != null)
     {
         newMonthReport.MonthReportCode         = monthReport.MonthReportCode;
         newMonthReport.Months                  = monthReport.Months;
         newMonthReport.MonthReportDate         = monthReport.MonthReportDate;
         newMonthReport.MonthReportStartDate    = monthReport.MonthReportStartDate;
         newMonthReport.ReportMan               = monthReport.ReportMan;
         newMonthReport.ReportMonths            = monthReport.ReportMonths;
         newMonthReport.AllProjectData          = monthReport.AllProjectData;
         newMonthReport.ThisMonthKeyPoints      = monthReport.ThisMonthKeyPoints;
         newMonthReport.ThisMonthSafetyCost     = monthReport.ThisMonthSafetyCost;
         newMonthReport.TotalSafetyCost         = monthReport.TotalSafetyCost;
         newMonthReport.ThisMonthSafetyActivity = monthReport.ThisMonthSafetyActivity;
         newMonthReport.NextMonthWorkFocus      = monthReport.NextMonthWorkFocus;
         newMonthReport.AllManhoursData         = monthReport.AllManhoursData;
         newMonthReport.EquipmentQualityData    = monthReport.EquipmentQualityData;
         newMonthReport.FileAttachUrl           = monthReport.FileAttachUrl;
         newMonthReport.AttachUrl               = monthReport.AttachUrl;
         newMonthReport.Flag = monthReport.Flag;
         db.SubmitChanges();
     }
 }
Beispiel #2
0
 /// <summary>
 /// 增加月报告信息
 /// </summary>
 /// <param name="monthReport">月报告实体</param>
 public static void AddMonthReport(Model.Manager_MonthReport monthReport)
 {
     Model.SUBHSSEDB           db             = Funs.DB;
     Model.Manager_MonthReport newMonthReport = new Model.Manager_MonthReport
     {
         MonthReportId           = monthReport.MonthReportId,
         MonthReportCode         = monthReport.MonthReportCode,
         ProjectId               = monthReport.ProjectId,
         Months                  = monthReport.Months,
         ReportMonths            = monthReport.ReportMonths,
         MonthReportDate         = monthReport.MonthReportDate,
         MonthReportStartDate    = monthReport.MonthReportStartDate,
         ReportMan               = monthReport.ReportMan,
         AllProjectData          = monthReport.AllProjectData,
         ThisMonthKeyPoints      = monthReport.ThisMonthKeyPoints,
         ThisMonthSafetyCost     = monthReport.ThisMonthSafetyCost,
         TotalSafetyCost         = monthReport.TotalSafetyCost,
         ThisMonthSafetyActivity = monthReport.ThisMonthSafetyActivity,
         NextMonthWorkFocus      = monthReport.NextMonthWorkFocus,
         AllManhoursData         = monthReport.AllManhoursData,
         EquipmentQualityData    = monthReport.EquipmentQualityData,
         FileAttachUrl           = monthReport.FileAttachUrl,
         AttachUrl               = monthReport.AttachUrl,
         Flag = monthReport.Flag
     };
     db.Manager_MonthReport.InsertOnSubmit(newMonthReport);
     db.SubmitChanges();
     ////增加一条编码记录
     BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectManagerMonthMenuId, monthReport.ProjectId, null, monthReport.MonthReportId, monthReport.MonthReportDate);
 }
Beispiel #3
0
 /// <summary>
 /// 根据月报告主键删除一个月报告信息
 /// </summary>
 /// <param name="monthReportId">月报告主键</param>
 public static void DeleteMonthReportByMonthReportId(string monthReportId)
 {
     Model.SUBHSSEDB           db          = Funs.DB;
     Model.Manager_MonthReport monthReport = db.Manager_MonthReport.FirstOrDefault(e => e.MonthReportId == monthReportId);
     if (monthReport != null)
     {
         ///删除编码表记录
         BLL.CodeRecordsService.DeleteCodeRecordsByDataId(monthReportId);
         BLL.CommonService.DeleteAttachFileById(monthReportId);  //删除附件
         BLL.CommonService.DeleteFlowOperateByID(monthReportId); //删除审核流程
         db.Manager_MonthReport.DeleteOnSubmit(monthReport);
         db.SubmitChanges();
     }
 }