• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# RestServiceClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Remove

 public ActionResult Remove(string id)
 {
     var service = new RestServiceClient<CatElementModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Delete(_hrm_Hr_Service, "api/CatElement/", id);
     return Json(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Cat_InsuranceElementController.cs


示例2: Get

 /// <summary>
 /// Lấy tất cả dữ liệu trong table Sys_DelegateApprove
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult Get([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Sys_DelegateApproveModel>>();
     service.SetCookies(Request.Cookies, _hrm_Sys_Service);
     var result = service.Get(_hrm_Sys_Service, "api/Sys_DelegateApprove/");
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Sys_DelegateApproveController.cs


示例3: Edit

 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Att_WorkdayModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_WorkDay/",id);
     return View(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Att_WorkdayController.cs


示例4: SalCostCentreInfo

 public ActionResult SalCostCentreInfo(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sal_CostCentre);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Sal_CostCentre);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<SalCostCentreModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var modelResult = service.Get(_hrm_Hr_Service, "api/Sal_CostCentre/", id1);
         return View(modelResult);
     }
     else
     {
         return View();
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:28,代码来源:Sal_CostCentreController.cs


示例5: EvaluationContractInfo

 public ActionResult EvaluationContractInfo(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_Qualification);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_Qualification);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient<Hre_ContractModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_Contract/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:27,代码来源:Hre_ExpiryContractController.cs


示例6: Add

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


示例7: GetAll

 /// <summary>
 /// Lấy tất cả dữ liệu trong table 
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Cat_TAMScanReasonMissModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_TAMScanReasonMissForAtt/");
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Cat_TAMScanReasonMissForAttController.cs


示例8: Edit

 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Rep_MasterModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Get(_hrm_Sys_Service, "api/Rep_Master/", id);
     return View(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Sys_CustomReportController.cs


示例9: Edit

 public ActionResult Edit(string id)
 {
     var service = new RestServiceClient<Rec_RecruitmentHistoryModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Rec_RecruitmentHistory/", id);
     return View(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Rec_RecruitmentHistoryController.cs


示例10: PerformanceExtendInfo

 public ActionResult PerformanceExtendInfo(string id, Guid? PerformanceID)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Eva_PerformanceExtend);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Eva_PerformanceExtend);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     ViewData["PerformanceID"] = PerformanceID;
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient<Eva_PerformanceExtendModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Hr_Service);
         var result = service.Get(_Hrm_Hr_Service, "api/Eva_PerformanceExtend/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:28,代码来源:Eva_PerformanceExtendController.cs


示例11: Export

        public void Export(Att_ReportDetailForgetCardModel model)
        {

            var service = new RestServiceClient<List<Att_ReportDetailForgetCardModel>>(UserLogin);
            service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
            var result = service.PostAll(_Hrm_Hre_Service, "api/Att_ReportDetailForgetCard/", model);
        }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Att_ReportDetailForgetCardController.cs


示例12: GetAll

 /// <summary>
 /// Lấy tất cả dữ liệu Ca Làm Việc
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<List<Att_ReportDetailForgetCardModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_ReportDetailForgetCard/");
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Att_ReportDetailForgetCardController.cs


示例13: HreHDTJobInfo

 public ActionResult HreHDTJobInfo(Guid id)
 {
     //bool isAccess;
     //if (id != null && id != Guid.Empty)
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_HDTJob);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_HDTJob);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (id != null && id != Guid.Empty)
     {
        // var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<Hre_HDTJobModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_HDTJob/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:28,代码来源:Hre_HDTJobController.cs


示例14: Remove

 /// <summary>
 /// Chuyển trạng thái IsDelete = true
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult Remove(Guid id)
 {
     var service = new RestServiceClient<Lau_MarkerModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hre_Service);
     var result = service.Remove(_hrm_Hre_Service, "api/Lau_Marker/", id);
     return Json(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Lau_MarkerController.cs


示例15: Add

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


示例16: GetMultiselect

 /// <summary>
 /// Lấy tất cả dữ liệu cho control multiselect
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JsonResult GetMultiselect()
 {
     var service = new RestServiceClient<IEnumerable<CatDistrictModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hre_Service);
     var result = service.Get(_hrm_Hre_Service, "api/CatDistrict/");
     return Json(result, JsonRequestBehavior.AllowGet);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Cat_DistrictController.cs


示例17: Remove

 public ActionResult Remove(Guid id)
 {
     var service = new RestServiceClient<Can_CanteenModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Can_Service);
     var result = service.Delete(_hrm_Can_Service, "api/Can_Canteen/", id);
     return Json(result);
 }
开发者ID:dtafe,项目名称:vnr,代码行数:7,代码来源:Can_CanteenController.cs


示例18: Get

 /// <summary>
 /// Lấy tất cả dữ liệu trong table Cat_Brand
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult Get([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Cat_SupplierModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_Brand/");
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Cat_SupplierController.cs


示例19: ReportTotalAnnualTaxableInComeConfigElementIfno

 public ActionResult ReportTotalAnnualTaxableInComeConfigElementIfno(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sal_ItemForShop);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Sal_ItemForShop);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<Sys_AllSettingModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Sys_Service);
         var modelResult = service.Get(_Hrm_Sys_Service, "api/Sal_ItemForShop/", id1);
         return View(modelResult);
     }
     else
     {
         return View();
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:28,代码来源:Sal_ReportTotalAnnualTaxableIncomeController.cs


示例20: GetAll

 /// <summary>
 /// Lấy tất cả dữ liệu trong table AttWorkDay
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Att_WorkdayModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_WorkDay/");
     return Json(result.ToDataSourceResult(request));
 }
开发者ID:dtafe,项目名称:vnr,代码行数:12,代码来源:Att_WorkdayController.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RestSharp类代码示例发布时间:2022-05-24
下一篇:
C# RestResponse类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap