public async Task <ActionResult> Edit(MasterTypeBPJS model) { try { TypeBPJSRepository Repository = new TypeBPJSRepository(); var result = await Repository.EditBPJSType(model.BPJSId, model.Deskripsi, User.Identity.Name); if (result == true) { return(await GetList()); } else { return(View(result)); } } catch { return(View(false)); } }
public async Task <ActionResult> Delete(MasterTypeBPJS model) { try { TypeBPJSRepository Repository = new TypeBPJSRepository(); var result = await Repository.DeleteTypeBPJS(model.BPJSId); if (result == true) { return(await GetList()); } else { return(View(result)); } } catch { return(View(false)); } }
public async Task <ActionResult> Create(MasterTypeBPJS model) { try { TypeBPJSRepository Repository = new TypeBPJSRepository(); var result = await Repository.CreateTypeBPJS(model.BPJSId, 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)); } }