public static IStatusGeneric <FormDictionary> CreateFormDicFactory(FormDictionaryType type, string description, string code, string activityName, string fileName , int workPackageId, int[] desciplineId, int priority, float mh) { var status = new StatusGenericHandler <FormDictionary>(); var formDic = new FormDictionary { Description = description, Code = code, ActivityName = activityName, Type = type, FileName = fileName, WorkPackageId = workPackageId, Priority = priority, ManHours = mh }; formDic.DesciplineLink = new List <FormDictionaryDescipline>(); foreach (var ids in desciplineId) { formDic.DesciplineLink.Add(FormDictionaryDescipline.CreateFormDicDescipline(0, ids).Result); } status.Result = formDic; return(status); }
public IStatusGeneric UpdateFormDictioanry(FormDictionaryType type, string description, string code, string activityName, int workPackageId, int priority, string fileName , float mh) { var status = new StatusGenericHandler(); //All Ok //this.Code = code; this.Description = description; this.ActivityName = activityName; this.Priority = priority; this.FileName = fileName; this.ManHours = mh; return(status); }
public FormDictionary(FormDictionaryType type, string description, string code, string activityName, string fileName , int workPackageId, int priority, float mh) { if (string.IsNullOrWhiteSpace(code)) { throw new ArgumentNullException(nameof(code)); } this.Description = description; this.Code = code; this.ActivityName = activityName; this.Type = type; this.FileName = fileName; this.WorkPackageId = workPackageId; this.Priority = priority; this.ManHours = mh; this.DesciplineLink = new List <FormDictionaryDescipline>(); this.Activityes = new List <Activity>(); }