Beispiel #1
0
        public async Task <ActionResult> Edit(int id, mstReference Emp)
        {
            HttpResponseMessage responseMessage = await client.PutAsJsonAsync(url + "/" + id, Emp);

            if (responseMessage.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Error"));
        }
Beispiel #2
0
        public async Task <ActionResult> RptAsuransi01UpdatePartial(mstReference myData)
        {
            HttpResponseMessage responseMessage1 = await client.PutAsJsonAsync(url + "/" + myData.IdRef, myData);

            if (responseMessage1.IsSuccessStatusCode)
            {
                HttpResponseMessage responseMessage2 = await client.GetAsync(string.Format("{0}/GetByType/RptAsuransi01", url));

                if (responseMessage2.IsSuccessStatusCode)
                {
                    var responseData = responseMessage2.Content.ReadAsStringAsync().Result;
                    var myDataColls  = JsonConvert.DeserializeObject <List <mstReference> >(responseData);

                    return(PartialView("_GetReport01Config", myDataColls));
                }
            }
            return(RedirectToAction("Error"));
        }
Beispiel #3
0
 public IHttpActionResult Put(int id, mstReference myData)
 {
     _repository.Put(id, myData);
     return(StatusCode(HttpStatusCode.NoContent));
 }
Beispiel #4
0
 public IHttpActionResult Post(mstReference myData)
 {
     _repository.Post(myData);
     return(Ok(myData));
 }