本文整理汇总了C#中RestServiceClient.Get方法的典型用法代码示例。如果您正苦于以下问题:C# RestServiceClient.Get方法的具体用法?C# RestServiceClient.Get怎么用?C# RestServiceClient.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RestServiceClient
的用法示例。
在下文中一共展示了RestServiceClient.Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
/// <summary>
/// Tạo mời một CatCountry
/// </summary>
/// <param name="request"></param>
/// <param name="model"></param>
/// <returns></returns>
public ActionResult Create([DataSourceRequest] DataSourceRequest request, [Bind] CatOvertimeTypeModel model)
{
var serviceGet = new RestServiceClient<IEnumerable<CatOvertimeTypeModel>>(UserLogin);
var list = serviceGet.Get(_hrm_Hr_Service, "api/CatOvertimeType/");
var l = serviceGet.Get(_hrm_Hr_Service, "api/CatOvertimeType/", model.ID);
foreach (var item in list)
{
if (model.Code == item.Code && model.TypeTemp == item.TypeTemp)
{
ModelState.AddModelError("PaymentType", "Đã tồn tại phương thức chi trả với mã này!");
}
}
var result = new CatOvertimeTypeModel();
if (ModelState.IsValid)
{
var service = new RestServiceClient<CatOvertimeTypeModel>(UserLogin);
service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
result = service.Put(_hrm_Hr_Service, "api/CatOvertimeType/", model);
return Json(result);
}
return Json(new[] { result }.ToDataSourceResult(request, ModelState));
}
示例2: 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);
}
示例3: CreateOrUpdate
public ActionResult CreateOrUpdate(string id)
{
//bool isAccess;
//if (!string.IsNullOrEmpty(id))
//{
// isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Cat_OrgStructure);
//}
//else
//{
// isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Cat_OrgStructure);
//}
//if (!isAccess)
//{
// return PartialView("AccessDenied");
//}
if (!string.IsNullOrEmpty(id))
{
var idModel = Common.ConvertToGuid(id);
var service = new RestServiceClient<CatOrgStructureModel>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hr_Service);
var result = service.Get(_hrm_Hr_Service, "api/CatOrgStructure/", idModel);
return View(result);
}
else
{
return View();
}
}
示例4: 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);
}
示例5: ExpiryContractInfo
public ActionResult ExpiryContractInfo(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();
}
}
示例6: 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);
}
示例7: GetAllCatProvince
/// <summary>
/// Lấy tất cả dữ liệu trong table CatDistrict
/// </summary>
/// <returns></returns>
public IEnumerable<CatProvinceModel> GetAllCatProvince()
{
var service = new RestServiceClient<IEnumerable<CatProvinceModel>>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hre_Service);
var result = service.Get(_hrm_Hre_Service, "api/CatProvince/");
return result;
}
示例8: 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();
}
}
示例9: GetById
public Hre_ProfileModel GetById(Guid? id)
{
var service = new RestServiceClient<Hre_ProfileModel>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hr_Service);
var result = service.Get(_hrm_Hr_Service, "api/Hre_Profile/", (Guid)id);
return result;
}
示例10: 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<Sys_DynamicColumnModel>>();
service.SetCookies(Request.Cookies, _hrm_Sys_Service);
var result = service.Get(_hrm_Sys_Service, "api/Sys_DynamicColumn/");
return Json(result, JsonRequestBehavior.AllowGet);
}
示例11: GetAll
/// <summary>
/// Lấy tất cả dữ liệu trong table AttInOut
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
{
var service = new RestServiceClient<IEnumerable<Hre_CardHistoryModel>>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hr_Service);
var result = service.Get(_hrm_Hr_Service, "api/Hre_CardHistory/");
return Json(result.ToDataSourceResult(request));
}
示例12: GetAll
/// <summary>
/// Lấy tất cả dữ liệu phân tích ngày nghỉ và trễ sớm
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
{
var service = new RestServiceClient<List<Att_AnalysysLeaveAndLateEarlyModel>>(UserLogin);
service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
var result = service.Get(_Hrm_Hre_Service, "api/Att_AnalysysLeaveAndLateEarly/");
return Json(result.ToDataSourceResult(request));
}
示例13: Index
public ActionResult Index()
{
var service = new RestServiceClient<Att_OvertimePermitModel>(UserLogin);
service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
var result = service.Get(_Hrm_Hre_Service, "api/Att_OvertimePermitConfig/", UserId);
return View(result);
}
示例14: Get
/// <summary>
/// Lấy tất cả dữ liệu trong table Rec_Candidate
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public ActionResult Get([DataSourceRequest] DataSourceRequest request)
{
var service = new RestServiceClient<IEnumerable<Rec_CandidateModel>>(UserLogin);
service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
var result = service.Get(_Hrm_Hre_Service, "api/Rec_Candidate/");
return Json(result.ToDataSourceResult(request));
}
示例15: GetAll
public JsonResult GetAll()
{
var service = new RestServiceClient<IEnumerable<CatProvinceModel>>(UserLogin);
service.SetCookies(Request.Cookies, _hrm_Hr_Service);
var result = service.Get(_hrm_Hr_Service, "api/CatProvince/");
return Json(result, JsonRequestBehavior.AllowGet);
}