public StatusTransition RetrieveOrgStatusTranstion(int qmsStatusTransId) { QmsStatusTrans statusTrans = context.QmsStatusTrans.AsNoTracking().Where(s => s.StatusTransId == qmsStatusTransId && s.DeletedAt == null).Include(s => s.ToStatus).Include(s => s.FromStatus).SingleOrDefault(); QmsStatus fromStatus = statusTrans.FromStatus; QmsStatus toStatus = statusTrans.ToStatus; StatusTransition retval = new StatusTransition(statusTrans, fromStatus, toStatus); return(retval); }
public Status(QmsStatus status, string displayLabel, int statusId) { this.StatusId = statusId; this.StatusCode = status.StatusCode; this.StatusLabel = displayLabel; this.DisplayOrder = status.DisplayOrder; this.CreatedAt = status.CreatedAt; this.UpdatedAt = status.UpdatedAt; this.DeletedAt = status.DeletedAt; }
public Status(QmsStatus status) { this.StatusId = status.StatusId; this.StatusCode = status.StatusCode; this.StatusLabel = status.StatusLabel; this.DisplayOrder = status.DisplayOrder; this.CreatedAt = status.CreatedAt; this.UpdatedAt = status.UpdatedAt; this.DeletedAt = status.DeletedAt; }
public StatusTransition(QmsStatusTrans statusTrans, QmsStatus fromStatus, QmsStatus toStatus) { FromStatus = new Status(fromStatus); ToStatus = new Status(toStatus); TransitionLabel = statusTrans.StatusTransLabel; }