本文整理汇总了C#中RestServiceClient.SetCookies方法的典型用法代码示例。如果您正苦于以下问题:C# RestServiceClient.SetCookies方法的具体用法?C# RestServiceClient.SetCookies怎么用?C# RestServiceClient.SetCookies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RestServiceClient
的用法示例。
在下文中一共展示了RestServiceClient.SetCookies方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: Add
public ActionResult Add([Bind] Sys_GroupUserModel model)
{
var service = new RestServiceClient<Sys_GroupUserModel>();
service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model);
return Json(result);
}
示例3: Remove
public ActionResult Remove(Guid id)
{
var service = new RestServiceClient<Att_WorkdayModel>(UserLogin);
service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
var result = service.Delete(_Hrm_Hre_Service, "api/Att_WorkDay/", id);
return Json(result);
}
示例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();
}
}
示例5: 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));
}
示例6: 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));
}
示例7: 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);
}
示例8: 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);
}
示例9: 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));
}
示例10: 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);
}
示例11: 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();
}
}
示例12: 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);
}
示例13: CreateOrUpdate
public ActionResult CreateOrUpdate(string id)
{
if (!string.IsNullOrEmpty(id))
{
var service = new RestServiceClient<Hre_ProfilePartyUnionModel>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hr_Service);
var result = service.Get(_hrm_Hr_Service, "api/Hre_ProfilePartyUnion/", id);
return View(result);
}
else
{
if (Request["profileID"] != null)
{
string aaa = Request["profileID"].ToString();
if (!string.IsNullOrEmpty(aaa))
{
ViewBag.profileID = aaa;
}
}
return View();
}
}
示例14: SysTemplateSendMailInfo
public ActionResult SysTemplateSendMailInfo(string id)
{
bool isAccess;
if (!string.IsNullOrEmpty(id))
{
isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sys_TemplateSendMail);
}
else
{
isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Sys_TemplateSendMail);
}
if (!isAccess)
{
return PartialView("AccessDenied");
}
if (!string.IsNullOrEmpty(id))
{
var id1 = Common.ConvertToGuid(id);
var service = new RestServiceClient<Sys_TemplateSendMailModel>();
service.SetCookies(Request.Cookies, _hrm_Sys_Service);
var modelResult = service.Get(_hrm_Sys_Service, "api/Sys_TemplateSendMail/", id1);
return View(modelResult);
}
else
{
return View();
}
}
示例15: 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();
}
}