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


C# RestServiceClient.Post方法代码示例

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


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

示例1: Create

 /// <summary>
 /// Tạo mời một Cat_SyncItem
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult Create([Bind] Cat_SyncItemModel model)
 {
     var service = new RestServiceClient<Cat_SyncItemModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Post(_hrm_Hr_Service, "api/Cat_SyncItem/", model);
     return Json(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Cat_SyncItemController.cs

示例2: Create

 public ActionResult Create(Can_MealRecordModel model)
 {
     var service = new RestServiceClient<Can_MealRecordModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Can_Service);
     var result = service.Post(_hrm_Can_Service, "api/Can_MealRecord/", model);
     return View();
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Can_MealRecordController.cs

示例3: Create

 public ActionResult Create(Cat_SyncModel model)
 {
     var service = new RestServiceClient<Cat_SyncModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Post(_hrm_Hr_Service, "api/Cat_Sync/", model);
     return Json(result, JsonRequestBehavior.AllowGet);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Cat_SyncController.cs

示例4: GetGridBuilderInfo

        //1. Get database
        public GridBuilderModel GetGridBuilderInfo(string parameter)
        {
            if (!string.IsNullOrEmpty(parameter))
            {
                var splitPara = parameter.Split(',');
                if (splitPara.Length > 1)
                {
                    Guid userId;
                    Guid.TryParse(splitPara[0], out userId);
                    if (userId != Guid.Empty)
                    {
                        if (!string.IsNullOrEmpty(splitPara[1]))
                        {
                            var paraModel = new GridBuilderModel() { UserID = userId, GridControlName = splitPara[1], IsGet = true};
                            var service = new RestServiceClient<GridBuilderModel>(UserLogin);
                            var model = service.Post(_hrm_Hre_Service, "api/Sys_ColumnMode", paraModel);
                            if (model != null && !string.IsNullOrEmpty(model.StringXml))
                            {
                                model.StringXml = model.StringXml;
                                model.ID = model.ID;
                                model = GridBuilder(model, false);
                                return model;
                            }
                        }
                    }
                }
            }

            return null;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:31,代码来源:Sys_ColumnModeController.cs

示例5: ComputeAttendance

 public ActionResult ComputeAttendance(Att_AttendanceTableModel model)
 {
     var service = new RestServiceClient<Att_AttendanceTableModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Post(_hrm_Hr_Service, "api/Att_ComputeAttendance/", model);
     return View(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Hre_ProfileAttendanceController.cs

示例6: GetByAttTableId

 public ActionResult GetByAttTableId([DataSourceRequest] DataSourceRequest request, int id)
 {
     var service = new RestServiceClient<IEnumerable<Att_AttendanceTableItemModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
     var result = service.Post(_Hrm_Hre_Service, "api/Att_AttendanceTableItem/",id);
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Att_AttendanceTableItemController.cs

示例7: ChangeLanguage

        public ActionResult ChangeLanguage(Sys_UserSettingModel model)
        {
            LanguageHelper.LanguageCode = model.LanguageValue;
            Session[SessionObjects.LanguageCode + (Session[SessionObjects.UserInfoName] == null ? string.Empty : Session[SessionObjects.UserInfoName].ToString())] = model.LanguageValue;
            //TranslateService.LanguageCode = model.LanguageValue;

            Sys_AllSettingModel modelLang = new Sys_AllSettingModel()
            {
                Name = AppConfig.HRM_SYS_USERSETTING_LANGUAGE.ToString(),
                Value1 = model.LanguageValue,
                Value2 = null,
                UserID = model.UserCreateID,
                ModuleName = ""
            };


            //Sys_AllSettingModel modelTheme = new Sys_AllSettingModel()
            //{
            //    Name = AppConfig.HRM_SYS_USERSETTING_THEME.ToString(),
            //    Value1 = string.IsNullOrEmpty(model.ThemeName) ? EnumDropDown.ETheme.VnResourceDefault.ToString() : model.ThemeName,
            //    Value2 = null,
            //    UserID = model.UserCreateID,
            //    ModuleName = ""
            //};

            List<Sys_AllSettingModel> listModel = new List<Sys_AllSettingModel>();
            listModel.Add(modelLang);
            //listModel.Add(modelTheme);

            var service = new RestServiceClient<List<Sys_AllSettingModel>>(UserLogin);
            service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
            var result = service.Post(_hrm_Sys_Service, "api/Sys_UserSetting/", listModel);

            return RedirectToAction("Index");
        }
开发者ID:dtafe,项目名称:vnr,代码行数:35,代码来源:Sys_UserSettingController.cs

示例8: ComputeWorkDay

        public ActionResult ComputeWorkDay([DataSourceRequest] DataSourceRequest request, Att_ComputeWorkDayModel model)
        {
            var service = new RestServiceClient<IEnumerable<Att_WorkdayModel>>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Att_ComputeWorkDay/", model);

            return Json(result.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Att_ComputeWorkDayController.cs

示例9: Search

        public ActionResult Search([DataSourceRequest] DataSourceRequest request, Att_AnalyzeAnnualModel model)
        {
            var service = new RestServiceClient<IEnumerable<Att_AnnualLeaveDetailModel>>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Att_AnalyzeAnnual/", model);

            return Json(result.ToDataSourceResult(request));
        }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Att_AnalyzeAnnualController.cs

示例10: CreateInLine

        /// <summary>
        /// Tạo mời một CatExportItem
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult CreateInLine([Bind] Rec_InterviewCampaignDetailModel model)
        {

            var service = new RestServiceClient<Rec_InterviewCampaignDetailModel>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Rec_InterviewCampaignDetail/", model);
            return Json(result);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:13,代码来源:Rec_InterviewCampaignController.cs

示例11: ReportLeaveday

        public ActionResult ReportLeaveday([DataSourceRequest] DataSourceRequest request, Att_ReportDetailLeaveSickModel model)
        {
            var service = new RestServiceClient<IEnumerable<Att_WorkdayModel>>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Att_ReportDetailLeaveSick/", model);

            return Json(result.ToDataSourceResult(request));
        }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Att_ReportDetailLeaveSickController.cs

示例12: ConfigDBLau

 public ActionResult ConfigDBLau(Sys_ConfigDBLauModel model)
 {
   
     var service = new RestServiceClient<Sys_ConfigDBLauModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Post(_hrm_Sys_Service, "api/Sys_ConfigDBLau/", model);
     return RedirectToAction("Index");
 }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Sys_ConfigGeneralController.cs

示例13: Create

 public ActionResult Create(Eva_EvaluatorModel model)
 {
     var service = new RestServiceClient<Eva_EvaluatorModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hr_Service);
     var result = service.Post(_Hrm_Hr_Service, "api/Eva_Evaluator/", model);
     ViewBag.MsgInsert = "Insert success";
     return Json(result, JsonRequestBehavior.AllowGet);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Eva_EvaluatorController.cs

示例14: Create

 public ActionResult Create([Bind] Sys_AutoBackupModel model)
 {
     
     var service = new RestServiceClient<Sys_AutoBackupModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Post(_hrm_Sys_Service, "api/Sys_AutoBackup/", model);
     return Json(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Sys_AutoBackupController.cs

示例15: ReportMonthlyRoster

        public ActionResult ReportMonthlyRoster([DataSourceRequest] DataSourceRequest request, Att_ReportMonthlyRosterModel model)
        {
            var service = new RestServiceClient<IEnumerable<Att_ReportMonthlyRosterModel>>(UserLogin);
            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Post(_Hrm_Hre_Service, "api/Att_ReportMonthlyRoster/", model);

            return Json(result.ToDataSourceResult(request));
        }
开发者ID:dtafe,项目名称:vnr,代码行数:8,代码来源:Att_ReportMonthlyRosterController.cs


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