public void UpdateAsync(EvidencijaDugovanjaDto value) { HttpClient httpClient = GetHttpClient(); UrlBuilder urlBuilder = new UrlBuilder(this.ApiSettings); HttpContent content = new StringContent(JsonConvert.SerializeObject(value), Encoding.UTF8, "application/json"); HttpResponseMessage httpResponseMessage = httpClient.PostAsync(ControllerName + "/update", content).Result; }
public ActionResult Edit(int id) { List<NaslovDto> naslovi = new List<NaslovDto>(_evidencijaDugovanjaClient.GetNaslove()); List<ClanDto> clanovi = new List<ClanDto>(_evidencijaDugovanjaClient.GetClanove()); EvidencijaDugovanjaDto evidencijaDugovanjaDto = _evidencijaDugovanjaClient.GetById(id); ViewBag.Naslovi = naslovi; ViewBag.Clanovi = clanovi; return View(evidencijaDugovanjaDto); }
public ActionResult Edit(EvidencijaDugovanjaDto value) { try { if (ModelState.IsValid) { _evidencijaDugovanjaClient.UpdateAsync(value); return RedirectToAction(nameof(Index)); } } catch (Exception ex) { //Log the error (uncomment ex variable name and write a log. ModelState.AddModelError("", "Nije moguce sacuvati promene. " + "Pokusaj ponovo, ako se problem nastavi " + "kontaktiraj administratora."); } return View(value); }
public ActionResult Delete(int id) { EvidencijaDugovanjaDto evidencijaDugovanjaDto = _evidencijaDugovanjaClient.GetById(id); return View(evidencijaDugovanjaDto); }
public void Update(EvidencijaDugovanjaDto value) { EvidencijaDugovanja evidencijaDugovanja = _evidencijaDugovanjaMapper.Map<EvidencijaDugovanja>(value); _evidencijaDugovanjaRepository.Update(evidencijaDugovanja); }
public void Add(EvidencijaDugovanjaDto value) { EvidencijaDugovanja evidencijaDugovanja = _evidencijaDugovanjaMapper.Map<EvidencijaDugovanja>(value); _evidencijaDugovanjaRepository.Save(evidencijaDugovanja); }
public ActionResult Delete(EvidencijaDugovanjaDto value) { _evidencijaDugovanjaService.Delete(value); return Ok(); }
public ActionResult Add(EvidencijaDugovanjaDto value) { _evidencijaDugovanjaService.Add(value); return Ok(); }