Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public DelegationModel()
 {
     FromEmployee = new User();
     ToEmployee   = new List <LookupItemModel>();
     Requester    = new LookupItemModel();
     Department   = new LookupItemModel();
 }
Ejemplo n.º 3
0
 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>();
 }
Ejemplo n.º 4
0
 public EmployeeModel()
 {
     EmployeeLevel = new LookupItemModel();
 }
 public BusinessTripEmployeeModel()
 {
     BusinessTripManagementID = new LookupItemModel();
 }
 public BusinessTripScheduleModel()
 {
     this.BusinessTripManagementID = new LookupItemModel();
 }