public void Delete(Guid id) { sysBpmsLane lane = this.Context.sysBpmsLanes.FirstOrDefault(d => d.ID == id); if (lane != null) { this.Context.sysBpmsLanes.Remove(lane); } }
public LaneDTO(sysBpmsLane lane) { if (lane != null) { this.ID = lane.ID; this.ProcessID = lane.ProcessID; this.ElementID = lane.ElementID; } }
public ResultOperation Update(sysBpmsLane lane) { ResultOperation resultOperation = new ResultOperation(); if (resultOperation.IsSuccess) { this.UnitOfWork.Repository <ILaneRepository>().Update(lane); this.UnitOfWork.Save(); } return(resultOperation); }
public void Update(Guid processID, WorkflowProcess _WorkflowProcess) { List <sysBpmsLane> Lanes = this.GetList(processID); var CurrentWorkflowLane = WorkflowLane.GetAllLanes(_WorkflowProcess.LaneSet); foreach (sysBpmsLane item in Lanes.Where(c => !CurrentWorkflowLane.Any(d => d.ID == c.ElementID))) { this.Delete(item.ID); } //StartEvents foreach (WorkflowLane item in CurrentWorkflowLane) { sysBpmsLane lane = Lanes.FirstOrDefault(c => c.ElementID == item.ID); if (lane != null) { this.Update(lane); //Element lane.Element.Name = item.Name; new ElementService(this.UnitOfWork).Update(lane.Element); } else { lane = new sysBpmsLane() { ID = Guid.NewGuid(), ElementID = item.ID, ProcessID = processID, //Element Element = new sysBpmsElement() { ID = item.ID, Name = item.Name, ProcessID = processID, TypeLU = (int)sysBpmsElement.e_TypeLU.Lane, } }; this.Add(lane); new ElementService(this.UnitOfWork).Update(lane.Element); } } }
public ResultOperation Delete(Guid ID) { ResultOperation resultOperation = new ResultOperation(); try { sysBpmsLane lane = this.GetInfo(ID); this.BeginTransaction(); this.UnitOfWork.Repository <ILaneRepository>().Delete(ID); this.UnitOfWork.Save(); resultOperation = new ElementService(this.UnitOfWork).Delete(lane.ElementID, lane.ProcessID); } catch (Exception ex) { return(base.ExceptionHandler(ex)); } base.FinalizeService(resultOperation); return(resultOperation); }
public void Update(sysBpmsLane lane) { this.Context.Entry(lane).State = EntityState.Modified; }
public void Add(sysBpmsLane lane) { this.Context.sysBpmsLanes.Add(lane); }