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


C# ActionService.GetByIdUseStore方法代码示例

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


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

示例1: GetById

 /// <summary>
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Tra_RequirementTrainModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Tra_RequirementTrainModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Tra_RequirementTrainEntity>(id, ConstantSql.hrm_tra_sp_get_RequirementTrainIds, ref status);
     if (entity!=null)
     {
         model = entity.CopyData<Tra_RequirementTrainModel>();
         if (entity.PersonRequirement != null)
         {
             Guid profileid = Guid.Parse(entity.PersonRequirement);
             var entityprofile = service.GetByIdUseStore<Tra_RequirementTrainEntity>(profileid, ConstantSql.hrm_hr_sp_get_ProfileById, ref status);
             if (entityprofile != null && entityprofile.ProfileID != null && entityprofile.ProfileName != null)
             {
                 model.ProfileID = entityprofile.ID;
                 model.ProfileName = entityprofile.ProfileName;
                 model.CodeEmp = entityprofile.CodeEmp;
             }
         }
     }
     if (model.IsTrainingOutside != null && model.IsTrainingOutside == false)
         model.IsTrainingInside = true;
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:30,代码来源:Tra_RequirementTrainCustormController.cs

示例2: GetById

        public Att_LeaveDayModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new Att_LeaveDayModel();
            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Att_LeaveDayEntity>(id, ConstantSql.hrm_att_sp_get_LeaveDayById, ref status);
            if (entity != null)
            {
                model = entity.CopyData<Att_LeaveDayModel>();
                if (model.LeaveHours != null && model.LeaveHours > 0)
                {
                    if (model.DurationType == LeaveDayDurationType.E_FIRSTHALFSHIFT.ToString() || model.DurationType == LeaveDayDurationType.E_LASTHALFSHIFT.ToString())
                    {
                        var guiId = model.ProfileID;
                        var start = model.DateStart;
                        var end = model.DateEnd;
                        if (guiId != null && guiId != Guid.Empty && start != null && end != null)
                        {
                            var listRoster = service.GetData<Att_RosterEntity>(guiId, ConstantSql.hrm_att_sp_get_RosterByProfileId, ref status);
                            if (listRoster != null)
                            {
                                for (DateTime i = start; i <= end; i = i.AddDays(1))
                                {
                                    var roster = listRoster.Where(d => d.DateStart <= i && d.DateEnd >= i).FirstOrDefault();
                                    if (roster != null)
                                    {
                                        var shift = SearchShift(roster, i);
                                        if (shift != null && shift != Guid.Empty)
                                        {
                                            var catShift = service.GetByIdUseStore<Cat_ShiftEntity>((Guid)shift, ConstantSql.hrm_cat_sp_get_ShiftById, ref status);
                                            if (catShift != null)
                                            {
                                                if (model.DurationType == LeaveDayDurationType.E_FIRSTHALFSHIFT.ToString())
                                                {
                                                    model.HoursFrom = catShift.InTime;
                                                    model.HoursTo = catShift.InTime.AddHours(catShift.CoBreakOut);
                                                    break;
                                                }
                                                else
                                                {
                                                    model.HoursFrom = catShift.InTime.AddHours(catShift.CoBreakIn);
                                                    model.HoursTo = catShift.InTime.AddHours(catShift.CoOut);
                                                    break;
                                                }
                                            }
                                        }

                                    }
                                }
                            }
                        }
                    }
                }
            }
            model.ActionStatus = status;
            return model;

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

示例3: GetById

        public Eva_PerformanceModel GetById(Guid id)
        {
            string status = string.Empty;
            var performanceService = new Eva_PerformanceServices();
                       
            var model = new Eva_PerformanceModel();
            var service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Eva_PerformanceEntity>(id, ConstantSql.hrm_eva_sp_get_PerformanceById, ref status);
            if (entity != null)
            {
                model = entity.CopyData<Eva_PerformanceModel>();
                // model.AttachFileLast = model.AttachFile;

                #region Đọc Xml từ db và chuyển sang string

                if (model != null)
                {
                    var doc = performanceService.ReadXml(model.AttachFile, AttachFileEntity.FieldNames.FullName);
                    model.AttachFileLast = string.Join(",", doc.ToArray());
                    model.AttachFile = model.AttachFileLast;
                    model.AttachFiles = doc;
                }
                #endregion
            }

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

示例4: GetById

        public Cat_RateInsuranceModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new Cat_RateInsuranceModel();
            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Cat_RateInsuranceEntity>(id, ConstantSql.hrm_cat_sp_get_RateInsuranceById, ref status);
            if (entity!=null)
            {
                model = entity.CopyData<Cat_RateInsuranceModel>();

                #region nhân 100 cho các tỉ lệ (để hiển thị %)
                if (model != null)
                {
                    model.SocialInsCompRate = model.SocialInsCompRate*100 ;
                    model.SocialInsEmpRate = model.SocialInsEmpRate * 100;
                    model.HealthInsCompRate = model.HealthInsCompRate * 100;
                    model.HealthInsEmpRate = model.HealthInsEmpRate * 100;
                    model.UnemployInsCompRate = model.UnemployInsCompRate * 100;
                    model.UnemployInsEmpRate = model.UnemployInsEmpRate * 100;
                }
                #endregion

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

示例5: Post

 public Cat_HDTJobGroupModel Post([Bind]Cat_HDTJobGroupModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_HDTJobGroupModel>(model, "Cat_HDTJobGroup", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     ActionService action = new ActionService(UserLogin);
     string status = string.Empty;
     if(model.ID!= null)
     {
         var resut = action.GetByIdUseStore<Cat_HDTJobGroupEntity>(model.ID, ConstantSql.hrm_cat_sp_get_HDTJobGroupById, ref status);
         if (resut != null && resut.Status == EnumDropDown.Status.E_APPROVED.ToString())
         {
             model.ActionStatus = ConstantDisplay.StatusApproveCannotEdit.TranslateString();
             return model;
         }
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Cat_HDTJobGroupEntity, Cat_HDTJobGroupModel>(model);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Cat_HDTJobGroupController.cs

示例6: 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

示例7: Get

        // GET api/<controller>/5
        public Cat_UnusualAllowanceCfgModel Get(Guid id)
        {
            var profileName = string.Empty;
            var service = new Cat_UnusualAllowanceCfgServices();
          
            ActionService actionService = new ActionService(UserLogin);
            var result = actionService.GetByIdUseStore<Cat_UnusualAllowanceCfgEntity>(id, ConstantSql.hrm_cat_sp_get_UnusualAllowanceCfgId, ref status);
            
            if (result == null)
            {
                return new Cat_UnusualAllowanceCfgModel();
            }
            
            var cat_UnsualAllowanceCfgEntity = new Cat_UnusualAllowanceCfgModel
            {
                ID = result.ID,
                Code = result.Code,
                Comment = result.Comment,
                UnusualAllowanceCfgName = result.UnusualAllowanceCfgName,
                IsAddToHourlyRate = result.IsAddToHourlyRate,
                IsChargePIT = result.IsChargePIT,
                IsExcludePayslip = result.IsExcludePayslip,
                MethodCalculation = result.MethodCalculation,
                Formula = result.Formula,
                EDType = result.EDType,
                Amount = result.Amount,
                Type = result.Type
            };
            return cat_UnsualAllowanceCfgEntity;

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

示例8: GetById

 /// <summary>
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Tra_ClassModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Tra_ClassModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Tra_ClassEntity>(id, ConstantSql.hrm_tra_sp_get_ClassById, ref status);
     if (entity!=null)
     {
         if (entity.TrainerOtherList != null)
             entity.TrainerOtherList = entity.TrainerOtherList.Replace(" ", "");
         model = entity.CopyData<Tra_ClassModel>();
         if(model.IsTrainingOut == false)
         {
             model.IsTrainingInside = true;
         }
             if (entity.Teacher != null)
             {
                 //Guid profileid = Guid.Parse(entity.Teacher);
                 var lstEntityprofile = service.GetData<Tra_RequirementTrainEntity>(entity.Teacher, ConstantSql.hrm_hr_sp_get_ProfileById, ref status);
                 if (lstEntityprofile!=null && lstEntityprofile.Count > 0)
                 {
                     var entityprofile = lstEntityprofile[0];
                     if (entityprofile != null && entityprofile.ProfileID != null && entityprofile.ProfileName != null)
                     {
                         model.ProfileID = entityprofile.ID;
                         model.ProfileName = entityprofile.ProfileName;
                         model.CodeEmp = entityprofile.CodeEmp;
                     }
                 }
                 
             }
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:39,代码来源:Tra_ClassController.cs

示例9: GetById

        /// <summary>
        /// [Chuc.Nguyen] - Lấy dữ liệu bảng Tai Nạn(Hre_Accident) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FIN_ClaimModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new FIN_ClaimModel();
            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<FIN_ClaimEntity>(id, ConstantSql.hrm_hr_sp_get_ClaimById, ref status);
            if (entity != null)
            {
                model = entity.CopyData<FIN_ClaimModel>();
                if (!string.IsNullOrEmpty(model.Other))
                {
                    model.IsManufactureName = true;
                }
                else {
                    model.IsProfile = true;
                }

                if(model.IsCashAdvance != null && model.IsCashAdvance == false)
                {
                    model.IsNoneCashAdvance = true;
                }
                if (model.IsCashAdvance != null  && model.IsCashAdvance == true)
                {
                    model.IsNoneCashAdvance = false;
                }
                
                
                
            }
            model.ActionStatus = status;
            return model;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:37,代码来源:FIN_ClaimController.cs

示例10: GetById

        /// <summary>
        /// [Son.Vo] - Lấy dữ liệu OrgStructure(Cat_OrgStructure) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public CatOrgStructureModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new CatOrgStructureModel();

            var orgServices = new Cat_OrgMoreInforServices();
            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Cat_OrgStructureEntity>(id,ConstantSql.hrm_cat_sp_get_OrgStructureById ,ref status);
            var objs = new List<object>();
            objs.Add(Common.DotNetToOracle(id.ToString()));
            var orgInfoEntity = orgServices.GetData<Cat_OrgMoreInforEntity>(objs, ConstantSql.hrm_hr_sp_get_OrgMoreInfoByOrgID, UserLogin, ref status).FirstOrDefault();
            if (entity != null)
            {

                model = entity.CopyData<CatOrgStructureModel>();
                if (orgInfoEntity != null)
                {
                    model.ServicesType = orgInfoEntity.ServicesType;
                    model.BillingAddress = orgInfoEntity.BillingAddress;
                    model.ContractFrom = orgInfoEntity.ContractFrom;
                    model.ContractTo = orgInfoEntity.ContractTo;
                    model.BillingCompanyName = orgInfoEntity.BillingCompanyName;
                    model.TaxCode = orgInfoEntity.TaxCode;
                    model.DescriptionInfo = orgInfoEntity.Description;
                    model.DurationPay = orgInfoEntity.DurationPay;
                    model.RecipientInvoice = orgInfoEntity.RecipientInvoice;
                    model.TelePhone = orgInfoEntity.TelePhone;
                    model.CellPhone = orgInfoEntity.CellPhone;
                    model.EmailInfo = orgInfoEntity.Email;
                    model.OrgMoreInforID = (Guid?)orgInfoEntity.ID;
                }
            }
            model.ActionStatus = status;
            return model;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:40,代码来源:CatOrgStructureController.cs

示例11: GetCan_SumryMealRecord

        public ActionResult GetCan_SumryMealRecord([DataSourceRequest] DataSourceRequest request, Can_SumryMealRecordSearchModel model)
        {
            ActionService action = new ActionService(UserLogin);
            string status = string.Empty;
            var Cutoffduration = action.GetByIdUseStore<Att_CutOffDurationEntity>((Guid)model.CutoffdurationID, ConstantSql.hrm_att_sp_get_CutOffDurationById, ref status);

            model.DateFrom = Cutoffduration.DateStart;
            model.DateTo = Cutoffduration.DateEnd;

            return GetListDataAndReturn<Can_SumryMealRecordModel, Can_SumryMealRecordEntity, Can_SumryMealRecordSearchModel>(request, model, ConstantSql.hrm_can_sp_get_SumMealRecord);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:11,代码来源:Canteen_GetDataController.cs

示例12: GetById

 public Pur_MCAMModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Pur_MCAMModel();
     var service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Pur_MCAMEntity>(id, ConstantSql.Hrm_CAT_SP_GET_PURMCAMBYID, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Pur_MCAMModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:13,代码来源:Pur_MCAMController.cs

示例13: GetById

 //
 // GET: /Sal_UnusualED/
 public Sal_UnusualAllowanceModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sal_UnusualAllowanceModel();
     var service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sal_UnusualAllowanceEntity>(id, ConstantSql.hrm_sal_sp_get_UnusualEDById, ref status);
     if (entity != null)
     {
         model = entity.Copy<Sal_UnusualAllowanceModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:15,代码来源:Sal_UnusualEDController.cs

示例14: GetById

 /// <summary>
 /// [Chuc.Nguyen] - Lấy dữ liệu bảng Tai Nạn(Hre_Accident) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public FIN_CashAdvanceItemModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new FIN_CashAdvanceItemModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Fin_CashAdvanceItemEntity>(id, ConstantSql.hrm_hr_sp_get_CashAdvanceItemById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<FIN_CashAdvanceItemModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:18,代码来源:FIN_CashAdvanceItemController.cs

示例15: GetById

 /// <summary>
 /// [Chuc.Nguyen] - Lấy dữ liệu Ngân Hàng(Cat_Bank) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_MPModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_MPModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Hre_MPEntity>(id, ConstantSql.hrm_hr_sp_get_MPById, ref status);
     if (entity!=null)
     {
         model = entity.CopyData<Hre_MPModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:18,代码来源:Hre_MPController.cs


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