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


C# ActionService类代码示例

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


ActionService类属于命名空间,在下文中一共展示了ActionService类的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: Post

 public Can_MealAllowanceTypeSettingModel Post([Bind]Can_MealAllowanceTypeSettingModel model)
 {
     
     ActionService service = new ActionService(UserLogin);
     model.Standard = true;
     return service.UpdateOrCreate<Can_MealAllowanceTypeSettingEntity, Can_MealAllowanceTypeSettingModel>(model);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Can_MealPriceTypeSettingController.cs

示例3: Post

        public FIN_ApproveCashAdvanceModel Post([Bind]FIN_ApproveCashAdvanceModel model)
        {

            #region Validate

            string message = string.Empty;
            var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<FIN_ApproveCashAdvanceModel>(model, "FIN_ApproveCashAdvance", ref message);
            if (!checkValidate)
            {
                model.ActionStatus = message;
                return model;
            }

            #endregion
            ActionService service = new ActionService(UserLogin);
            if(!string.IsNullOrEmpty(model.Other))
            {
                model.IsEntertaiment = null;
                model.TravelRequestID = null;
            }
            if(model.IsEntertaiment == true)
            {
                model.TravelRequestID = null;
            }

            return service.UpdateOrCreate<Fin_ApproveCashAdvanceEntity, FIN_ApproveCashAdvanceModel>(model);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:27,代码来源:FIN_ApproveCashAdvanceController.cs

示例4: Post

 public Sys_LockObjectItemModel Post(Sys_LockObjectItemModel model)
 {
     ActionService service = new ActionService(UserLogin);
     var lockItemServices = new Sys_LockObjectItemServices();
     string message = string.Empty;
     if(model.ObjectName.IndexOf(',') > 1)
     {
        string[] objName = model.ObjectName.Split(',');
        if (objName.Length > 0)
        {
            foreach (var item in objName)
            {
                Sys_LockObjectItemEntity entity = new Sys_LockObjectItemEntity();
                entity = model.CopyData<Sys_LockObjectItemEntity>();
                entity.ObjectName = item;
               // model = service.UpdateOrCreate<Sys_LockObjectItemEntity, Sys_LockObjectItemModel>(model);
               model.ActionStatus =  lockItemServices.Add(entity);
            }
        
        }
       
        return model;
     }
     return service.UpdateOrCreate<Sys_LockObjectItemEntity, Sys_LockObjectItemModel>(model);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Sys_LockObjectItemController.cs

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

示例6: DeleteOrRemove

 public FIN_ApproveTravelCostModel DeleteOrRemove(string id)
 {
     ActionService service = new ActionService(UserLogin);
     var result1 = service.DeleteOrRemove<FIN_TravelRequestEntity, FIN_TravelRequestModel>(id);
     var result=  result1.CopyData<FIN_ApproveTravelCostModel>();
     return result;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:FIN_ApproveTravelCostController.cs

示例7: DeleteOrRemove

        /// <summary>
        /// [Chuc.Nguyen] - Xóa hoặc chuyển đổi trạng thái của Ngân Hàng(Tra_Certificate) sang IsDelete
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Tra_TraineeCertificateModel DeleteOrRemove(string id)
        {
            ActionService service = new ActionService(UserLogin);
            var traineeCertificateServices = new Tra_TraineeCertificateServices();
            string status = string.Empty;
            var result = new Tra_TraineeCertificateModel();
            Guid[] _TraineeIds = null;
            var Ids = id.Substring(7);
            if(Ids != null)
            {
                _TraineeIds = Ids.Split(',').Select(s => Guid.Parse(s)).ToArray();
            }
            var objTraineeCertificate = new List<object>();
            objTraineeCertificate.Add(1);
            objTraineeCertificate.Add(int.MaxValue -1);
            var lstTraineeCertificate = traineeCertificateServices.GetData<Tra_TraineeCertificateEntity>(objTraineeCertificate, ConstantSql.hrm_tra_sp_get_TraineeCertificate,UserLogin, ref status).ToList();
            if (lstTraineeCertificate != null)
            {
                lstTraineeCertificate = lstTraineeCertificate.Where(s => _TraineeIds.Contains(s.TraineeID.Value)).ToList();
            }
            var lstTraineeCertificateIds = lstTraineeCertificate.Select(s => s.ID).ToList();
            var strIds = string.Join(",", lstTraineeCertificateIds.ToArray());
            if (!string.IsNullOrEmpty(strIds))
            {
                var  strRemoveIds = DeleteType.Remove.ToString() + "," + strIds;
                result = service.DeleteOrRemove<Tra_TraineeCertificateEntity, Tra_TraineeCertificateModel>(strRemoveIds);
                return result;
            }

            return result;
            
        }
开发者ID:dtafe,项目名称:vnr,代码行数:37,代码来源:Tra_TraineeCertificateController.cs

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

示例9: Post

 public Rec_InterviewCampaignDetailModel Post([Bind]Rec_InterviewCampaignDetailModel model)
 {
     ActionService service = new ActionService(UserLogin);
     string status = string.Empty;
     if (model.InterviewCampaignID != null)
     {
         var interviewcampaign = service.GetData<Rec_InterviewCampaignEntity>(Common.DotNetToOracle(model.InterviewCampaignID.ToString()), ConstantSql.hrm_rec_sp_get_InterviewCampaignById, ref status).FirstOrDefault();
         if (interviewcampaign != null)
         {
             model.DateFrom = interviewcampaign.DateInterviewFrom;
             model.DateTo = interviewcampaign.DateInterviewTo;
             model.LevelInterview = interviewcampaign.LevelInterview;
         }
     }
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Rec_InterviewCampaignDetailModel>(model, "Rec_InterviewCampaignDetail", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
    
     return service.UpdateOrCreate<Rec_InterviewCampaignDetailEntity, Rec_InterviewCampaignDetailModel>(model);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:26,代码来源:Rec_InterviewCampaignDetailController.cs

示例10: DeleteOrRemove

        public Rec_RecruitmentHistoryModel DeleteOrRemove(string id)
        {

            ActionService service = new ActionService(UserLogin);
            var result = service.DeleteOrRemove<Rec_RecruitmentHistoryEntity, Rec_RecruitmentHistoryModel>(id);
            return result;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Rec_RecruitmentHistoryController.cs

示例11: DeleteOrRemove

 public FIN_ClaimCostPaymentApproveModel DeleteOrRemove(string id)
 {
     ActionService service = new ActionService(UserLogin);
     var result1 = service.DeleteOrRemove<FIN_ClaimEntity, FIN_ClaimModel>(id);
     var result = result1.CopyData<FIN_ClaimCostPaymentApproveModel>();
     return result;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:FIN_ClaimCostPaymentApproveController.cs

示例12: Post

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

            #region chia 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

            return service.UpdateOrCreate<Cat_RateInsuranceEntity, Cat_RateInsuranceModel>(model);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:27,代码来源:Cat_RateInsuranceController.cs

示例13: DeleteOrRemove

 /// <summary>
 /// [Chuc.Nguyen] - Xóa hoặc chuyển đổi trạng thái của Ngân Hàng(Tra_Certificate) sang IsDelete
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Tra_ClassModel DeleteOrRemove(string id)
 {
     var model = new Tra_ClassModel();
     ActionService service = new ActionService(UserLogin);
     var baseServices = new Tra_ClassServices();
     //var baseService = new BaseService();
     bool isDelete = true;
     string status = "";
     var idItem = id.Split(',');
     foreach (var item in idItem)
     {
         var idInt = Guid.Empty;
         Guid.TryParse(item, out idInt);
         if (idInt != Guid.Empty)
         {
             var objs = new List<object>();
             objs.Add(Guid.Parse(item));
             var result = baseServices.GetData<Tra_TraineeEntity>(objs, ConstantSql.hrm_cat_sp_get_TraineeByClassID, UserLogin, ref status);
             if (result != null && result.Count > 0)
             {
                 isDelete = false;
                 break;
             }
         }
     }
     if (isDelete)
         model = service.DeleteOrRemove<Tra_ClassEntity, Tra_ClassModel>(id);
     else
     {
         status = ConstantMessages.YouMustDeleteDetailRecord.TranslateString();
         model.SetPropertyValue(Constant.ActionStatus, status);
     }
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:39,代码来源:Tra_ClassController.cs

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

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


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