コード例 #1
0
        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"));
        }
コード例 #2
0
        public async Task <ActionResult> Create(trxDocMandatoryFile Emp)
        {
            HttpResponseMessage responseMessage = await client.PostAsJsonAsync(url, Emp);

            if (responseMessage.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Error"));
        }
コード例 #3
0
        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"));
        }
コード例 #4
0
 public IHttpActionResult Put(int id, trxDocMandatoryFile myData)
 {
     _repository.Put(id, myData);
     return(StatusCode(HttpStatusCode.NoContent));
 }
コード例 #5
0
 public IHttpActionResult Post(trxDocMandatoryFile myData)
 {
     _repository.Post(myData);
     return(Ok(myData));
 }