public async Task <ActionResult> Edit(int IdDocMandatoryFile, trxDocMandatoryFile Emp) { HttpResponseMessage responseMessage = await client.PutAsJsonAsync(url + "/" + IdDocMandatoryFile, Emp); if (responseMessage.IsSuccessStatusCode) { return(RedirectToAction("GetByRekanan", "TrxRekananDocument")); } return(RedirectToAction("Error")); }
public async Task <ActionResult> Create(trxDocMandatoryFile Emp) { HttpResponseMessage responseMessage = await client.PostAsJsonAsync(url, Emp); if (responseMessage.IsSuccessStatusCode) { return(RedirectToAction("Index")); } return(RedirectToAction("Error")); }
public async Task <ActionResult> Delete(int IdDocMandatoryFile, trxDocMandatoryFile Emp) { HttpResponseMessage responseMessage = await client.DeleteAsync(url + "/" + IdDocMandatoryFile); if (responseMessage.IsSuccessStatusCode) { return(RedirectToAction("Index")); } return(RedirectToAction("Error")); }
public IHttpActionResult Put(int id, trxDocMandatoryFile myData) { _repository.Put(id, myData); return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult Post(trxDocMandatoryFile myData) { _repository.Post(myData); return(Ok(myData)); }