public async Task <ActionResult> GetList() { PDAMRepository Repository = new PDAMRepository(); ViewData["ListPDAM"] = await Repository.GetPDAM(); return(PartialView("_SimpleGrid")); }
public async Task <ActionResult> Delete(MasterPDAM model) { try { PDAMRepository Repository = new PDAMRepository(); var result = await Repository.DeletePDAM(model.PDAMId, User.Identity.Name); if (result == true) { return(await GetList()); } else { return(View(result)); } } catch { return(View(false)); } }
public async Task <ActionResult> Create(MasterPDAM model) { try { PDAMRepository Repository = new PDAMRepository(); var result = await Repository.CreatePDAM(model.PDAMId, model.Deskripsi, User.Identity.Name); if (result == true) { return(await GetList()); } else { return(View(result)); } } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); return(View(false)); } }