Пример #1
0
 public void UpdateClasseStatus(DTO.LABURNUM.COM.ClassModel model)
 {
     try
     {
         model.ApiClientModel = new LABURNUM.COM.Component.Common().GetApiClientModel();
         HttpClient          client   = new LABURNUM.COM.Component.Common().GetHTTPClient("application/json");
         HttpResponseMessage response = client.PostAsJsonAsync("Class/UpdateStatus", model).Result;
         if (response.IsSuccessStatusCode)
         {
         }
         else
         {
         }
     }
     catch (Exception)
     {
         throw new Exception("Error While Updating Class Status");
     }
 }
Пример #2
0
 public ActionResult StatusUpdate(DTO.LABURNUM.COM.AdmissionTypeModel model)
 {
     try
     {
         model.ApiClientModel = new LABURNUM.COM.Component.Common().GetApiClientModel();
         HttpClient          client   = new LABURNUM.COM.Component.Common().GetHTTPClient("application/json");
         HttpResponseMessage response = client.PostAsJsonAsync("AdmissionType/UpdateStatus", model).Result;
         if (response.IsSuccessStatusCode)
         {
             return(Json(new { code = 0, message = "success" }));
         }
         else
         {
             return(Json(new { code = -1, message = "failed" }));
         }
     }
     catch (Exception)
     {
         return(Json(new { code = -2, message = "failed" }));
     }
 }
Пример #3
0
 public List <DTO.LABURNUM.COM.ClassModel> GetClassesByAdvanceSearch(DTO.LABURNUM.COM.ClassModel model)
 {
     try
     {
         model.ApiClientModel = new LABURNUM.COM.Component.Common().GetApiClientModel();
         HttpClient          client   = new LABURNUM.COM.Component.Common().GetHTTPClient("application/json");
         HttpResponseMessage response = client.PostAsJsonAsync("Class/SearchClassByAdvanceSearch", model).Result;
         if (response.IsSuccessStatusCode)
         {
             var data = response.Content.ReadAsStringAsync().Result;
             return(JsonConvert.DeserializeObject <List <DTO.LABURNUM.COM.ClassModel> >(data));
         }
         else
         {
             return(null);
         }
     }
     catch (Exception)
     {
         throw new Exception("Error While Getting Class List");
     }
 }