Пример #1
0
 /// <summary>
 /// 添加动土作业票
 /// </summary>
 /// <param name="breakGround"></param>
 public static void AddBreakGround(Model.License_BreakGround breakGround)
 {
     Model.SUBHSSEDB           db             = Funs.DB;
     Model.License_BreakGround newBreakGround = new Model.License_BreakGround
     {
         BreakGroundId     = breakGround.BreakGroundId,
         ProjectId         = breakGround.ProjectId,
         LicenseCode       = breakGround.LicenseCode,
         ApplyUnitId       = breakGround.ApplyUnitId,
         ApplyManId        = breakGround.ApplyManId,
         ApplyDate         = breakGround.ApplyDate,
         WorkPalce         = breakGround.WorkPalce,
         WorkDepth         = breakGround.WorkDepth,
         ValidityStartTime = breakGround.ValidityStartTime,
         ValidityEndTime   = breakGround.ValidityEndTime,
         WorkMeasures      = breakGround.WorkMeasures,
         CancelManId       = breakGround.CancelManId,
         CancelReasons     = breakGround.CancelReasons,
         CancelTime        = breakGround.CancelTime,
         CloseManId        = breakGround.CloseManId,
         CloseReasons      = breakGround.CloseReasons,
         CloseTime         = breakGround.CloseTime,
         NextManId         = breakGround.NextManId,
         States            = breakGround.States,
     };
     db.License_BreakGround.InsertOnSubmit(newBreakGround);
     db.SubmitChanges();
     ////增加一条编码记录
     CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectBreakGroundMenuId, breakGround.ProjectId, breakGround.ApplyUnitId, breakGround.BreakGroundId, breakGround.ApplyDate);
 }
Пример #2
0
 /// <summary>
 /// 根据主键删除动土作业票
 /// </summary>
 /// <param name="breakGroundId"></param>
 public static void DeleteBreakGroundById(string breakGroundId)
 {
     Model.SUBHSSEDB           db          = Funs.DB;
     Model.License_BreakGround breakGround = db.License_BreakGround.FirstOrDefault(e => e.BreakGroundId == breakGroundId);
     if (breakGround != null)
     {
         ///删除编码表记录
         CodeRecordsService.DeleteCodeRecordsByDataId(breakGroundId);
         ////删除附件
         CommonService.DeleteAttachFileById(breakGroundId);
         ///删除-安全措施
         DeleteLicenseItemByDataId(breakGroundId);
         ///删除作业票审核信息
         DeleteFlowOperateByDataId(breakGroundId);
         db.License_BreakGround.DeleteOnSubmit(breakGround);
         db.SubmitChanges();
     }
 }
Пример #3
0
 /// <summary>
 /// 修改动土作业票
 /// </summary>
 /// <param name="breakGround"></param>
 public static void UpdateBreakGround(Model.License_BreakGround breakGround)
 {
     Model.SUBHSSEDB           db             = Funs.DB;
     Model.License_BreakGround newBreakGround = db.License_BreakGround.FirstOrDefault(e => e.BreakGroundId == breakGround.BreakGroundId);
     if (newBreakGround != null)
     {
         newBreakGround.WorkPalce         = breakGround.WorkPalce;
         newBreakGround.WorkDepth         = breakGround.WorkDepth;
         newBreakGround.ValidityStartTime = breakGround.ValidityStartTime;
         newBreakGround.ValidityEndTime   = breakGround.ValidityEndTime;
         newBreakGround.WorkMeasures      = breakGround.WorkMeasures;
         newBreakGround.CancelManId       = breakGround.CancelManId;
         newBreakGround.CancelReasons     = breakGround.CancelReasons;
         newBreakGround.CancelTime        = breakGround.CancelTime;
         newBreakGround.CloseManId        = breakGround.CloseManId;
         newBreakGround.CloseReasons      = breakGround.CloseReasons;
         newBreakGround.CloseTime         = breakGround.CloseTime;
         newBreakGround.NextManId         = breakGround.NextManId;
         newBreakGround.States            = breakGround.States;
         db.SubmitChanges();
     }
 }