Esempio n. 1
0
 /// <summary>
 /// 根据主键删除环评报告
 /// </summary>
 /// <param name="FileId"></param>
 public static void DeleteEIAReportById(string FileId)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.Environmental_EIAReport EIAReport = db.Environmental_EIAReport.FirstOrDefault(e => e.FileId == FileId);
     if (EIAReport != null)
     {
         ///删除编码表记录
         BLL.CodeRecordsService.DeleteCodeRecordsByDataId(FileId);
         ////删除附件表
         BLL.CommonService.DeleteAttachFileById(EIAReport.FileId);
         BLL.CommonService.DeleteFlowOperateByID(FileId);
         db.Environmental_EIAReport.DeleteOnSubmit(EIAReport);
         db.SubmitChanges();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 修改环评报告
 /// </summary>
 /// <param name="EIAReport"></param>
 public static void UpdateEIAReport(Model.Environmental_EIAReport EIAReport)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.Environmental_EIAReport newEIAReport = db.Environmental_EIAReport.FirstOrDefault(e => e.FileId == EIAReport.FileId);
     if (newEIAReport != null)
     {
         newEIAReport.FileCode    = EIAReport.FileCode;
         newEIAReport.FileName    = EIAReport.FileName;
         newEIAReport.FileContent = EIAReport.FileContent;
         newEIAReport.CompileMan  = EIAReport.CompileMan;
         newEIAReport.CompileDate = EIAReport.CompileDate;
         newEIAReport.AttachUrl   = EIAReport.AttachUrl;
         newEIAReport.States      = EIAReport.States;
         db.SubmitChanges();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 添加环评报告
 /// </summary>
 /// <param name="EIAReport"></param>
 public static void AddEIAReport(Model.Environmental_EIAReport EIAReport)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.Environmental_EIAReport newEIAReport = new Model.Environmental_EIAReport
     {
         FileId      = EIAReport.FileId,
         FileCode    = EIAReport.FileCode,
         ProjectId   = EIAReport.ProjectId,
         FileName    = EIAReport.FileName,
         FileContent = EIAReport.FileContent,
         CompileMan  = EIAReport.CompileMan,
         CompileDate = EIAReport.CompileDate,
         AttachUrl   = EIAReport.AttachUrl,
         States      = EIAReport.States
     };
     db.Environmental_EIAReport.InsertOnSubmit(newEIAReport);
     db.SubmitChanges();
     ////增加一条编码记录
     BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.EIAReportMenuId, EIAReport.ProjectId, null, EIAReport.FileId, EIAReport.CompileDate);
 }