当前位置: 首页>>代码示例>>C#>>正文


C# BaseService.GetData方法代码示例

本文整理汇总了C#中BaseService.GetData方法的典型用法代码示例。如果您正苦于以下问题:C# BaseService.GetData方法的具体用法?C# BaseService.GetData怎么用?C# BaseService.GetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseService的用法示例。


在下文中一共展示了BaseService.GetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetById

        public Rec_JobConditionModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new Rec_JobConditionModel();

            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Rec_JobConditionEntity>(id, ConstantSql.hrm_rec_sp_get_JobConditionById, ref status);//note
            if (entity != null)
            {
                model = entity.CopyData<Rec_JobConditionModel>();
                if (model.ConditionName == ConditionName.E_DISEASEIDS.ToString() && !string.IsNullOrEmpty(model.Value1))
                {
                    var service1 = new BaseService();
                    var lst = service1.GetData<Cat_ComputingLevelMultiEntity>(model.Value1, ConstantSql.hrm_cat_sp_get_LevelGeneralByIds, UserLogin ,ref status).ToList();
                    var ids = model.Value1
                            .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                            .Select(x => Common.OracleToDotNet(x.ToString()))
                            .ToList();

                    model.Value1 = string.Join(",", ids);
                    model.DiseaseIDs = string.Join(",", ids);
                    //   model.ArrDisease = lst;

                }

            }
            model.ActionStatus = status;
            return model;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:29,代码来源:Rec_JobConditionController.cs

示例2: Get_Roster_WillBeApproveByUser

        public List<Att_RosterEntity> Get_Roster_WillBeApproveByUser(Guid UserLoginID, List<Att_RosterEntity> lstRosterAfterFilter, string userLogin)
        {
            BaseService service = new BaseService();
            string status = string.Empty;
            List<object> lstParam = new List<object>();
            lstParam.AddRange(new object[10]);
            var lstDelegateApprove = service.GetData<Sys_DelegateApprove>(lstParam, ConstantSql.hrm_sys_sp_get_DelegateApprove, userLogin, ref status);

            DateTime today = DateTime.Today;
            string E_ROSTER = DelegateApproveType.E_ROSTER.ToString();
            List<Guid> lstUserCanView = lstDelegateApprove.Where(m => m.UserID != null
                && m.DataTypeDelegate == E_ROSTER
                && m.DateFrom <= today
                && m.DateTo >= today
                && m.UserDelegateID == UserLoginID).Select(m => m.UserID.Value).ToList();
            lstUserCanView.Add(UserLoginID);
            string E_SUBMIT = RosterStatus.E_SUBMIT.ToString();
            string E_APPROVED = RosterStatus.E_APPROVED.ToString();
            string E_REJECTED = RosterStatus.E_REJECTED.ToString();
            string E_CANCEL = RosterStatus.E_CANCEL.ToString();

            var lstRoster = lstRosterAfterFilter.Where(m =>
                m.Status != E_APPROVED
                && m.Status != E_REJECTED
                && m.Status != E_CANCEL
                && ((m.Status == E_SUBMIT && m.UserApproveID != null && lstUserCanView.Contains(m.UserApproveID.Value))
                || (m.UserApproveID2 != null && lstUserCanView.Contains(m.UserApproveID2.Value)))).ToList();
            return lstRoster;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:29,代码来源:Att_ProcessApprovedServices.cs

示例3: GetCatShiftItem

        public List<Cat_ShiftItemEntity> GetCatShiftItem( string userLogin)
        {
            using (var context = new VnrHrmDataContext())
            {
                IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                Cat_ShiftItemRepository repo = new Cat_ShiftItemRepository(unitOfWork);
                BaseService service = new BaseService();
                string status = string.Empty;
                return service.GetData<Cat_ShiftItemEntity>(ConstantSql.hrm_cat_sp_get_ShiftItem, string.Empty, userLogin, ref status);

            }
        }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Cat_ShiftItemServices.cs

示例4: Post

        public Sal_CostCentreSalModel Post([Bind]Sal_CostCentreSalModel model)
        {
            ActionService service = new ActionService(UserLogin);
            #region Validate
            string message = string.Empty;
            var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Sal_CostCentreSalModel>(model, "Sal_CostCentreSal", ref message);
            if (!checkValidate)
            {
                model.ActionStatus = message;
                return model;

            }
            #endregion
            string status = string.Empty;
            var baseService = new BaseService();
            var objs = new List<object>();
            objs.Add(Common.DotNetToOracle(model.ProfileID.ToString()));
            objs.Add(1);
            objs.Add(10000);
            var result = baseService.GetData<Sal_CostCentreSalEntity>(objs, ConstantSql.hrm_hr_sp_get_Sal_CostCentreSalByProfileId, UserLogin, ref status);
            //kiem tra he so cua 1 nv
            if(model.ID == Guid.Empty)
            {
                double? rate = result.Sum(s => s.Rate);
                double? ratenew = rate + model.Rate;
                if (ratenew > 1)
                {
                    model.SetPropertyValue(Constant.ActionStatus, NotificationType.Error + ",");
                    return model;
                }
            }
            else
            {
                result = result.Where(s => s.ID != model.ID).ToList();
                double? rate = result.Sum(s => s.Rate);
                double? ratenew = rate + model.Rate;
                if (ratenew > 1)
                {
                    model.SetPropertyValue(Constant.ActionStatus, NotificationType.Error + ",");
                    return model;
                }
            }
            //kiem tra trung
            var resultdulicate = result.Where(s => s.CostCentreID == model.CostCentreID && s.ElementType == model.ElementType).ToList();
            if (resultdulicate.Count > 0)
            {
                model.SetPropertyValue(Constant.ActionStatus, NotificationType.Info + "," + ConstantMessages.FieldDuplicate);
                return model;
            }
            return service.UpdateOrCreate<Sal_CostCentreSalEntity, Sal_CostCentreSalModel>(model);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:51,代码来源:Sal_CostCentreSalController.cs

示例5: Get

        //// GET api/<controller>
        ///// <summary>
        ///// Lấy tất cả dữ liệu
        ///// </summary>
        ///// <returns></returns>
        public IEnumerable<Sys_UserMultiModel> Get()
        {
            BaseService service = new BaseService();
            string status = string.Empty;
            var listEntity = service.GetData<Sys_UserMultiModel>(string.Empty, ConstantSql.hrm_sys_sp_get_user_multi, UserLogin, ref status);

            if (listEntity != null)
            {
                var listModel = listEntity.Translate<Sys_UserMultiModel>();
                return listModel;
            }

            return new List<Sys_UserMultiModel>();
        }
开发者ID:dtafe,项目名称:vnr,代码行数:19,代码来源:Sys_UserController.cs

示例6: Get

        /// <summary>
        /// [Hien.Nguyen] Get All Cat_Shift for Multi Control
        /// </summary>
        /// <returns></returns>
        public IEnumerable<CatLeaveDayTypeModel> Get()
        {
            BaseService service = new BaseService();
            string status = string.Empty;
            var listEntity = service.GetData<CatLeaveDayTypeModel>(string.Empty, ConstantSql.hrm_cat_sp_get_LeaveDayType_multi,UserLogin, ref status);

            if (listEntity != null)
            {
                var listModel = listEntity.Translate<CatLeaveDayTypeModel>();
                return listModel;
            }

            return new List<CatLeaveDayTypeModel>();
        }
开发者ID:dtafe,项目名称:vnr,代码行数:18,代码来源:CatLeaveDayTypeController.cs

示例7: Get

        public IEnumerable<Can_MealAllowanceTypeSettingMultiModel> Get()
        {
            BaseService service = new BaseService();
            string status = string.Empty;
          
            var listEntity = service.GetData<Can_MealAllowanceTypeSettingMultiEntity>(string.Empty, ConstantSql.hrm_can_sp_get_MealAllowanceTypeSetting_multi, UserLogin, ref status);

            if (listEntity != null)
            {
                var listModel = listEntity.Translate<Can_MealAllowanceTypeSettingMultiModel>();
                return listModel;
            }

            return new List<Can_MealAllowanceTypeSettingMultiModel>();
        }
开发者ID:dtafe,项目名称:vnr,代码行数:15,代码来源:Can_MealAllowanceTypeSettingController.cs

示例8: Get

        public IEnumerable<Cat_TAMScanReasonMissMuitlModel> Get()
        {
            BaseService service = new BaseService();
            string status = string.Empty;
         
            var listEntity = service.GetData<Cat_TAMScanReasonMissMultiEntity>(string.Empty, ConstantSql.hrm_cat_sp_get_TamScanReasonMiss_multi,UserLogin, ref status);

            if (listEntity!=null)
            {
                var listModel = listEntity.Translate<Cat_TAMScanReasonMissMuitlModel>();
                return listModel;
            }
            
            return new List<Cat_TAMScanReasonMissMuitlModel>();
        }
开发者ID:dtafe,项目名称:vnr,代码行数:15,代码来源:Can_MealRecordMissingController.cs

示例9: GetPerformanceExtendByPerID

        public Eva_PerformanceExtendEntity GetPerformanceExtendByPerID(string ID,string userLogin)
        {
            Guid perID = Guid.Empty;
            Guid.TryParse( ID, out perID);
            BaseService service = new BaseService();
            string status = string.Empty;

            using (var context = new VnrHrmDataContext())
            {
                var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                var repoEva_Performance = new CustomBaseRepository<Eva_Performance>(unitOfWork);
                var repoEva_PerformanceExtend = new CustomBaseRepository<Eva_PerformanceExtend>(unitOfWork);

                var performance = repoEva_Performance.GetAll().Where(s => s.ID == perID).FirstOrDefault();
                var extend = repoEva_PerformanceExtend.GetAll().Where(s => s.ID == performance.PerformanceExtendID).FirstOrDefault();

                var result = extend.Copy<Eva_PerformanceExtendEntity>();
                string proID = Common.DotNetToOracle(performance.ProfileID.Value.ToString());
                var profile = service.GetData<Hre_ProfileEntity>(proID, ConstantSql.hrm_hr_sp_get_ProfileById,userLogin, ref status).FirstOrDefault();

                if (profile != null && result == null)
                {
                    result = new Eva_PerformanceExtendEntity();
                }
                
                result.ProfileName = profile.ProfileName ?? string.Empty;
                result.CodeEmp = profile.CodeEmp ?? string.Empty;
                result.PositionName = profile.PositionName ?? string.Empty;
                result.JobTitleName = profile.JobTitleName ?? string.Empty;
                result.DateOfBirth = profile.DateOfBirth;
                result.DateHire = profile.DateHire;
                result.PayrollGroupName = profile.PayrollGroupName ?? string.Empty;
                result.SupervisorName = profile.SupervisorName ?? string.Empty;
                result.HighSupervisorName = profile.HighSupervisorName ?? string.Empty;
                result.WorkPlaceName = profile.WorkPlaceName ?? string.Empty;
                result.TCountryName = profile.TCountryName ?? string.Empty;
                result.TProvinceName = profile.TProvinceName ?? string.Empty;
                result.Channel = profile.Channel ?? string.Empty;
                result.Region = profile.Region ?? string.Empty;
                result.Area = profile.Area ?? string.Empty;
                result.DateOfEffect = profile.DateOfEffect;

                return result;

            }
        }
开发者ID:dtafe,项目名称:vnr,代码行数:46,代码来源:Eva_PerformanceExtendServices.cs

示例10: ExportHistoryApproveECLAIMByTemplate

        public ActionResult ExportHistoryApproveECLAIMByTemplate([DataSourceRequest] DataSourceRequest request, FIN_HistoryApproveECLAIMSearchModel model)
        {
            string status = string.Empty;
            var baseService = new BaseService();
            var isDataTable = false;
            object obj = new FIN_HistoryApproveECLAIMModel();
            ListQueryModel lstModel = new ListQueryModel
            {
                PageSize = int.MaxValue - 1,
                PageIndex = 1,
                Filters = ExtractFilterAttributes(request),
                Sorts = ExtractSortAttributes(request),
                AdvanceFilters = ExtractAdvanceFilterAttributes(model)
            };
            var result = baseService.GetData<FIN_HistoryApproveECLAIMModel>(lstModel, ConstantSql.hrm_hr_sp_get_HistoryApprovedClaim, UserLogin, ref status);
            if (model != null && model.IsCreateTemplate)
            {
                var path = Common.GetPath("Templates");
                ExportService exportService = new ExportService();

                ConfigExport cfgExport = new ConfigExport()
                {
                    Object = new FIN_HistoryApproveECLAIMModel(),
                    FileName = "FIN_HistoryApproveECLAIM",
                    OutPutPath = path,
                    DownloadPath = Hrm_Main_Web + "Templates",
                    IsDataTable = isDataTable
                };
                var str = exportService.CreateTemplate(cfgExport);
                return Json(str);
            }
            if (model.ExportId != Guid.Empty)
            {
                var fullPath = ExportService.Export(model.ExportId, result, null, model.ExportType);
                return Json(fullPath);
            }
            return Json(result.ToDataSourceResult(request));
        }
开发者ID:dtafe,项目名称:vnr,代码行数:38,代码来源:Fin_GetDataController.cs

示例11: getStatusOTApplyCalcPayroll

        public static string getStatusOTApplyCalcPayroll(string userLogin)
        {
            BaseService _baseService = new BaseService();
            string status = string.Empty;
            var key = AppConfig.HRM_ATT_OT_OVERTIMESTATUS.ToString();
            var lstConfig = _baseService.GetData<Sys_AllSettingEntity>(key, ConstantSql.hrm_sys_sp_get_AllSettingByKey, userLogin, ref status);
            if (lstConfig != null)
            {
                var temp = lstConfig.FirstOrDefault();
                if (!string.IsNullOrWhiteSpace(temp.Value1) && !string.IsNullOrEmpty(temp.Value1))
                {
                    return temp.Value1;
                }
                return EnumDropDown.OverTimeStatus.E_APPROVED.ToString();
            }
            return EnumDropDown.OverTimeStatus.E_APPROVED.ToString();

            //string type = AppConfig.E_RANGE_SALARY_MONTH.ToString();
            //Sys_AppConfig objAppConfig = EntityService.Instance.GetEntity<Sys_AppConfig>(context, userid, ui => ui.Info == type);
            ////Get status ot tinh luong
            //string statusOTCalcBasicSalary = objAppConfig.Value8 == null ? OverTimeStatus.E_APPROVED.ToString() : objAppConfig.Value8;
            //return statusOTCalcBasicSalary;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:23,代码来源:Att_OvertimeServices.cs

示例12: GetSchemaReportRecieveObjectByTime

        public DataTable GetSchemaReportRecieveObjectByTime(string userLogin)
        {
            string status = string.Empty;
            var basevices = new BaseService();
            DataTable tb = new DataTable("Hre_ReportRecieveObjectByTime");
            tb.Columns.Add("ProfileName");
            tb.Columns.Add("CodeEmp");
            tb.Columns.Add("E_UNIT");
            tb.Columns.Add("E_DIVISION");
            tb.Columns.Add("E_DEPARTMENT");
            tb.Columns.Add("E_TEAM");
            tb.Columns.Add("E_SECTION");
            tb.Columns.Add("Unit");
            tb.Columns.Add("Dept");
            tb.Columns.Add("Part");
            tb.Columns.Add("Line");
            tb.Columns.Add("Session");

            List<object> listObjPrice = new List<object>();
            listObjPrice.Add(null);
            listObjPrice.Add(null);
            listObjPrice.Add(null);

            listObjPrice.Add(1);
            listObjPrice.Add(Int32.MaxValue - 1);
            var lstHDTJobTypePrice = basevices.GetData<Cat_HDTJobTypePriceEntity>(listObjPrice, ConstantSql.hrm_cat_sp_get_HDTJobTypePrice, userLogin, ref status).Where(s => s.Price != null).Select(s => s.Price).Distinct().ToList();
            foreach (var item in lstHDTJobTypePrice)
            {
                tb.Columns.Add(item.ToString());
            }
            return tb;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:32,代码来源:Hre_ReportServices.cs

示例13: GetReportProfileHDTNotWork

        public DataTable GetReportProfileHDTNotWork(DateTime DateFrom, DateTime DateTo, string lstOrgOrderNumber, string nameReport, bool isCreateTemplate,string userLogin)
        {
            string status = string.Empty;
            //List<Hre_ReportProfileHDTNotWorkEntity> lstReportProfileHDTNotWork = new List<Hre_ReportProfileHDTNotWorkEntity>();
            using (var context = new VnrHrmDataContext())
            {
                var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                var basevices = new BaseService();


                DataTable tb = GetSchema_ReportProfileHDTNotWork(nameReport);
                if (isCreateTemplate)
                {
                    return tb.ConfigTable();
                }


                var hdtJobServices = new Hre_HDTJobServices();
                List<object> listObjHDTJob = new List<object>();
                listObjHDTJob.AddRange(new object[14]);
                listObjHDTJob[5] = lstOrgOrderNumber;
                listObjHDTJob[6] = DateFrom;
                listObjHDTJob[7] = DateTo;
                listObjHDTJob[12] = 1;
                listObjHDTJob[13] = Int32.MaxValue - 1;
                var lstHDTJob = hdtJobServices.GetData<Hre_HDTJobEntity>(listObjHDTJob, ConstantSql.hrm_hr_sp_get_HDTJob, userLogin, ref status).ToList();

                if (lstHDTJob == null || lstHDTJob.Count == 0)
                {
                    return tb.ConfigTable();
                }

                var lstProfileIDsByHDTJob = lstHDTJob.Select(s => s.ProfileID).Distinct().ToList();

                //var lstobjectProfileids = new List<object>();
                //string strIDs = string.Empty;
                //foreach (var item in lstProfileIDsByHDTJob)
                //{
                //    strIDs += Common.DotNetToOracle(item.ToString()) + ",";
                //}
                //if (strIDs.IndexOf(",") > 0)
                //    strIDs = strIDs.Substring(0, strIDs.Length - 1);
                //lstobjectProfileids.Add(strIDs);
                //var lstLeaveDay = basevices.GetData<Att_LeaveDayEntity>(strIDs, ConstantSql.hrm_att_sp_get_LeavedayByIds, ref status);

                List<object> para = new List<object>();
                para.AddRange(new object[3]);
                para[0] = (object)lstOrgOrderNumber;
                para[1] = DateFrom;
                para[2] = DateTo;
                var lstLeaveDay = GetData<Att_LeaveDayEntity>(para, ConstantSql.hrm_att_getdata_LeaveDay, userLogin, ref status);
                if (lstLeaveDay.Count > 0)
                {
                    lstLeaveDay = lstLeaveDay.Where(s => lstProfileIDsByHDTJob.Contains(s.ProfileID)).ToList();
                }

                if (lstLeaveDay != null && lstLeaveDay.Count > 0)
                {
                    lstLeaveDay = lstLeaveDay.Where(s => s.DateStart != null && s.DateEnd != null && s.DateStart <= DateTo && s.DateEnd >= DateFrom).ToList();
                }

                if (lstLeaveDay == null)
                {
                    return tb.ConfigTable();
                }

                List<object> listObjLeaveDayType = new List<object>();
                listObjLeaveDayType.Add(null);
                listObjLeaveDayType.Add(null);
                listObjLeaveDayType.Add(1);
                listObjLeaveDayType.Add(Int32.MaxValue - 1);
                var lstLeaveDayType = basevices.GetData<Cat_LeaveDayTypeEntity>(listObjLeaveDayType, ConstantSql.hrm_cat_sp_get_LeaveDayType, userLogin, ref status).ToList();

                Hre_ProfileServices hreService = new Hre_ProfileServices();
                lstHDTJob = hreService.getHDTJobByPrice(lstHDTJob, DateFrom, DateTo);

                foreach (var HDTJob in lstHDTJob)
                {
                    DataRow row = tb.NewRow();

                    row["ProfileName"] = HDTJob.ProfileName;
                    row["CodeEmp"] = HDTJob.CodeEmp;
                    row["E_DEPARTMENT"] = HDTJob.E_DEPARTMENT;
                    row["E_DIVISION"] = HDTJob.E_DIVISION;
                    row["E_SECTION"] = HDTJob.E_SECTION;
                    row["E_TEAM"] = HDTJob.E_TEAM;
                    row["E_UNIT"] = HDTJob.E_UNIT;
                    row["HDTJobGroupCode"] = HDTJob.HDTJobGroupCode;
                    row["HDTJobTypeCode"] = HDTJob.HDTJobTypeCode;

                    if (HDTJob.DateFrom != null)
                        row["HDTDateFrom"] = HDTJob.DateFrom;

                    if (HDTJob.DateTo != null)
                        row["HDTDateTo"] = HDTJob.DateTo;

                    if (HDTJob.Price != null)
                        row["Price"] = HDTJob.Price;
                    if (HDTJob.DateTo != null && HDTJob.DateFrom != null)
                    {
//.........这里部分代码省略.........
开发者ID:dtafe,项目名称:vnr,代码行数:101,代码来源:Hre_ReportServices.cs

示例14: GetReportProfileComeBack

        public List<Hre_ReportProfileComeBackEntity> GetReportProfileComeBack(DateTime? DateFrom, DateTime? DateTo, string lstOrgStructureIDs, string userLogin)
        {
            string status = string.Empty;
            List<Hre_ReportProfileComeBackEntity> lstReportProfileComeBackEntity = new List<Hre_ReportProfileComeBackEntity>();
            using (var context = new VnrHrmDataContext())
            {
                BaseService service = new BaseService();
                var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                List<object> lstpara = new List<object>();
                lstpara.Add(DateFrom);
                lstpara.Add(DateTo);
                lstpara.Add(Common.DotNetToOracle(lstOrgStructureIDs));

                var lstProfileComeBack = service.GetData<Hre_ReportProfileComeBackEntity>(lstpara, ConstantSql.hrm_hr_sp_get_RptProfileComBack, userLogin, ref status);
                if (lstProfileComeBack == null)
                {
                    return lstReportProfileComeBackEntity;
                }
                var lstProfileids = lstProfileComeBack.Select(s => s.ProfileID).ToList();

                var lstobjectProfileids = new List<object>();
                string strIDs = string.Empty;
                foreach (var item in lstProfileids)
                {
                    strIDs += Common.DotNetToOracle(item.ToString()) + ",";
                }
                if (strIDs.IndexOf(",") > 0)
                    strIDs = strIDs.Substring(0, strIDs.Length - 1);
                lstobjectProfileids.Add(strIDs);
                var lstprofile = service.GetData<Hre_ProfileEntity>(lstobjectProfileids, ConstantSql.hrm_hr_sp_get_ProfileByIds, userLogin, ref status);
                var repoCat_OrgStructure = new CustomBaseRepository<Cat_OrgStructure>(unitOfWork);
                var repoCat_OrgStructureType = new Cat_OrgStructureTypeRepository(unitOfWork);
                var orgs = repoCat_OrgStructure.FindBy(s => s.IsDelete == null).ToList();
                var orgTypes = repoCat_OrgStructureType.FindBy(s => s.IsDelete == null).ToList();
                foreach (var ProfileComeBack in lstProfileComeBack)
                {
                    var profileByProfileComeBack = lstprofile.Where(s => s.ID == ProfileComeBack.ProfileID).FirstOrDefault();
                    Hre_ReportProfileComeBackEntity EntityReport = new Hre_ReportProfileComeBackEntity();
                    Guid? orgId = profileByProfileComeBack.OrgStructureID;
                    var orgBranch = LibraryService.GetNearestParent(orgId, OrgUnit.E_BRANCH, orgs, orgTypes);
                    var orgOrg = LibraryService.GetNearestParent(orgId, OrgUnit.E_DEPARTMENT, orgs, orgTypes);
                    var orgTeam = LibraryService.GetNearestParent(orgId, OrgUnit.E_TEAM, orgs, orgTypes);
                    var orgSection = LibraryService.GetNearestParent(orgId, OrgUnit.E_SECTION, orgs, orgTypes);
                    EntityReport.CodeEmp = profileByProfileComeBack.CodeEmp;
                    EntityReport.ProfileName = profileByProfileComeBack.ProfileName;
                    EntityReport.BranchName = orgBranch != null ? orgBranch.OrgStructureName : null;
                    EntityReport.DepartmentName = orgOrg != null ? orgOrg.OrgStructureName : null;
                    EntityReport.TeamName = orgTeam != null ? orgTeam.OrgStructureName : null;
                    EntityReport.SectionName = orgSection != null ? orgSection.OrgStructureName : null;
                    EntityReport.PositionName = ProfileComeBack.PositionName;
                    EntityReport.DateOfBirth = ProfileComeBack.DateOfBirth;
                    EntityReport.Gender = ProfileComeBack.Gender;
                    EntityReport.PlaceOfBirth = ProfileComeBack.PlaceOfBirth;
                    EntityReport.IDPlaceOfIssue = ProfileComeBack.IDPlaceOfIssue;
                    EntityReport.PAddress = ProfileComeBack.PAddress;
                    EntityReport.HomePhone = ProfileComeBack.HomePhone;
                    EntityReport.Cellphone = ProfileComeBack.Cellphone;
                    EntityReport.IDNo = ProfileComeBack.IDNo;
                    EntityReport.DateComeBack = ProfileComeBack.DateComeBack;
                    EntityReport.DateHire = ProfileComeBack.DateHire;
                    EntityReport.DateQuit = ProfileComeBack.DateQuit;
                    EntityReport.TypeOfStop = ProfileComeBack.TypeOfStop;
                    EntityReport.ResignReasonName = ProfileComeBack.ResignReasonName;
                    EntityReport.SalaryRankName = ProfileComeBack.SalaryRankName;
                    lstReportProfileComeBackEntity.Add(EntityReport);
                }
            }
            return lstReportProfileComeBackEntity;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:69,代码来源:Hre_ReportServices.cs

示例15: GetMealRecordList

        public ActionResult GetMealRecordList([DataSourceRequest] DataSourceRequest request, Can_MealRecordSearchModel model)
        {
            BaseService baseService = new BaseService();
            string status = string.Empty;

            #region xử lý tìm kiếm từ 6h30
            DateTime dateConfig = DateTime.MinValue;
            var rsTimeConfig = baseService.GetData<Sys_AllSettingEntity>(AppConfig.HRM_CAN_MEALRECORD_EATEND_CONFIG.ToString(), ConstantSql.hrm_sys_sp_get_AllSettingByKey,UserLogin, ref status).FirstOrDefault();
            if (rsTimeConfig != null && rsTimeConfig.Value1 != null)
            {
                dateConfig = DateTimeHelper.ConvertStringToDateTime(rsTimeConfig.Value1, ConstantFormat.HRM_Format_YearMonthDay_HoursMinSecond_ffffff.ToString());
            }
            double hourConfig = dateConfig.Hour + (((double)dateConfig.Minute) / 60);

            if (model.DateFrom != null)
            {
                model.DateFrom = model.DateFrom.Value.Date.AddHours(hourConfig);
            }
            if (model.DateTo != null)
            {
                model.DateTo = model.DateTo.Value.Date.AddDays(1).AddHours(hourConfig).AddMilliseconds(-1);
            }
            #endregion

            var result = GetListData<Can_MealRecordModel, Can_MealRecordEntity, Can_MealRecordSearchModel>(request, model, ConstantSql.hrm_can_get_MealRecord, ref status);
            if (model.IsExport)
            {
                var fullPath = ExportService.Export(result, model.ValueFields.Split(','));
                return Json(fullPath);
            }

            request.Page = 1;
            var dataSourceResult = result.ToDataSourceResult(request);
            dataSourceResult.Total = result.Count() <= 0 ? 0 : result.FirstOrDefault().TotalRow;
            return Json(dataSourceResult);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:36,代码来源:Canteen_GetDataController.cs


注:本文中的BaseService.GetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。