當前位置: 首頁>>代碼示例>>C#>>正文


C# ActionService.UpdateOrCreate方法代碼示例

本文整理匯總了C#中ActionService.UpdateOrCreate方法的典型用法代碼示例。如果您正苦於以下問題:C# ActionService.UpdateOrCreate方法的具體用法?C# ActionService.UpdateOrCreate怎麽用?C# ActionService.UpdateOrCreate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ActionService的用法示例。


在下文中一共展示了ActionService.UpdateOrCreate方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

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

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

示例4: Post

 public Cat_GradeAttendanceModel Post([Bind]Cat_GradeAttendanceModel model)
 {
     model.RosterType = GradeRosterType.E_ISROSTER.ToString();
     ActionService service = new ActionService(UserLogin);
     if (model.FormulaAnnualLeave != null)
     {
         model.FormulaAnnualLeave = model.FormulaAnnualLeave.Replace("[+]", "+");
     }
     return service.UpdateOrCreate<Cat_GradeAttendanceEntity, Cat_GradeAttendanceModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:10,代碼來源:Cat_GradeAttendanceController.cs

示例5: Post

 public Sys_ConditionApprovedModel Post([Bind]Sys_ConditionApprovedModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Sys_ConditionApprovedModel>(model, "Sys_ConditionApproved", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Sys_ConditionApprovedEntity, Sys_ConditionApprovedModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Sys_ConditionApprovedController.cs

示例6: Post

 public Cat_PivotModel Post([Bind]Cat_PivotModel model)
 {
     //#region Validate
     //string message = NotificationType.Success.ToString();
     //var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_PivotModel>(model, "Cat_Pivot", ref message);
     //if (!checkValidate)
     //{
     //    model.ActionStatus = message;
     //    return model;
     //}
     //#endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Cat_PivotEntity, Cat_PivotModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Cat_PivotController.cs

示例7: Post

 public Cat_SyncModel Post([Bind]Cat_SyncModel model)
 {
     #region Validate
     string message = NotificationType.Success.ToString();
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_SyncModel>(model, "Cat_Sync", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Cat_SyncEntity, Cat_SyncModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Cat_SyncController.cs

示例8: Post

 public Hre_VisaInfoModel Post([Bind]Hre_VisaInfoModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Hre_VisaInfoModel>(model, "Hre_VisaInfo", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Hre_VisaInfoEntity, Hre_VisaInfoModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Hre_VisaInfoController.cs

示例9: Post

 public Rec_CandidateComputingLevelModel Post([Bind]Rec_CandidateComputingLevelModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Rec_CandidateComputingLevelModel>(model, "Rec_CandidateComputingLevel", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Rec_CandidateComputingLevelEntity, Rec_CandidateComputingLevelModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Rec_CandidateComputingLevelController.cs

示例10: Post

 public Pur_MCAMModel Post([Bind]Pur_MCAMModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Pur_MCAMModel>(model, "Pur_MCAM_CreateOrUpdate", "Pur_MCAM", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Pur_MCAMEntity, Pur_MCAMModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Pur_MCAMController.cs

示例11: Post

 public Tra_TraineeScoreModel Post([Bind]Tra_TraineeScoreModel model)
 {
     #region Validate
     ActionService service = new ActionService(UserLogin);
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Tra_TraineeScoreModel>(model, "Tra_TraineeScore", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     return service.UpdateOrCreate<Tra_TraineeScoreEntity, Tra_TraineeScoreModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Tra_TraineeScoreController.cs

示例12: Post

 public Cat_UsualAllowanceLevelModel Post([Bind]Cat_UsualAllowanceLevelModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_UsualAllowanceLevelModel>(model, "Cat_UsualAllowanceLevel", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Cat_UsualAllowanceLevelEntity, Cat_UsualAllowanceLevelModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:14,代碼來源:Cat_UsualAllowanceLevelController.cs

示例13: Post

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

            ActionService service = new ActionService(UserLogin);
            return service.UpdateOrCreate<Kai_RankMarkEntity, Kai_RankMarkModel>(model);
        }
開發者ID:dtafe,項目名稱:vnr,代碼行數:15,代碼來源:Kai_RankMarkController.cs

示例14: Post

 public Cat_NameEntityModel Post([Bind]Cat_NameEntityModel model)
 {
     #region Validate
     string message = string.Empty;
     var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData<Cat_NameEntityModel>(model, "Cat_NameEntity", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return model;
     }
     #endregion
     model.NameEntityType = "E_Graduated_LEVEL";
     ActionService service = new ActionService(UserLogin);
     return service.UpdateOrCreate<Cat_NameEntityEntity, Cat_NameEntityModel>(model);
 }
開發者ID:dtafe,項目名稱:vnr,代碼行數:15,代碼來源:Cat_GraduatedLevelController.cs

示例15: Post

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

            ActionService service = new ActionService(UserLogin);
            return service.UpdateOrCreate<Sal_RevenueForProfileEntity, Sal_RevenueForProfileModel>(model);
        }
開發者ID:dtafe,項目名稱:vnr,代碼行數:15,代碼來源:Sal_RevenueForProfileController.cs


注:本文中的ActionService.UpdateOrCreate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。