Exemplo n.º 1
0
        public ActionResult SearchEmployeeSetting(DataSourceLoadOptions loadOptions, EmployeeSettingCriteria criteria)
        {
            try
            {
                List <EmployeeSettingViewModel> result = new List <EmployeeSettingViewModel>();
                if (!criteria.isFirstLoad)
                {
                    criteria.userCode = UserDetail.UserID;
                    result            = MasterService.GetEmployeeSetting(criteria).ToModels();
                }

                return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(result, loadOptions)), ConstantValues.JSON_CONTENT_TYPE));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public List <EmployeeSetting> GetEmployeeSetting(EmployeeSettingCriteria criteria)
        {
            using (TransactionEntities Context = new TransactionEntities())
            {
                var result = Context.SearchEmpSetting(
                    searchEmpCode: criteria.searchEmpCode
                    , searchEmpName: criteria.searchEmpName
                    , divCodeKey: criteria.divCodeKey
                    , deptCodeKey: criteria.deptCodeKey
                    , secCodeKey: criteria.secCodeKey
                    , empStatus: criteria.empStatus
                    , userStatus: criteria.userStatus
                    , displayStatus: criteria.displayStatus
                    , isViewActiveOrg: criteria.viewActiveOrg
                    , userCode: criteria.userCode
                    ).ToList();

                return(result);
            }
        }