public DelegationModel(Delegation delegation) : this() { if (delegation != null) { ModuleName = delegation.ModuleName; VietnameseModuleName = delegation.VietnameseModuleName; FromDate = delegation.FromDate.ToString(StringConstant.DateFormatddMMyyyyHHmm); ToDate = delegation.ToDate.ToString(StringConstant.DateFormatddMMyyyyHHmm); if (delegation.ToEmployee != null) { ToEmployee.AddRange(delegation.ToEmployee.Select(item => new LookupItemModel { LookupId = item.LookupId, LookupValue = item.LookupValue })); } Requester = new LookupItemModel { LookupId = (delegation.Requester != null ? delegation.Requester.LookupId : 0), LookupValue = (delegation.Requester != null ? delegation.Requester.LookupValue : string.Empty) }; Department = new LookupItemModel { LookupId = (delegation.Department != null ? delegation.Department.LookupId : 0), LookupValue = (delegation.Department != null ? delegation.Department.LookupValue : string.Empty) }; EmployeeInfoDAL _employeeInfoDAL = new EmployeeInfoDAL(SPContext.Current.Site.Url); FromEmployee = _employeeInfoDAL.GetByID(delegation.FromEmployee.LookupId).ADAccount; } }
public DelegationModel() { FromEmployee = new User(); ToEmployee = new List <LookupItemModel>(); Requester = new LookupItemModel(); Department = new LookupItemModel(); }
public BusinessTripManagementModel() { Requester = new LookupItemModel(); Department = new LookupItemModel(); Location = new LookupItemModel(); Driver = new LookupItemModel(); Cashier = new LookupItemModel(); EmployeeList = new List <BusinessTripEmployeeModel>(); ScheduleList = new List <BusinessTripScheduleModel>(); }
public EmployeeModel() { EmployeeLevel = new LookupItemModel(); }
public BusinessTripEmployeeModel() { BusinessTripManagementID = new LookupItemModel(); }
public BusinessTripScheduleModel() { this.BusinessTripManagementID = new LookupItemModel(); }