public ActionResult Create(Penghasilan tmbh) { if (Session["username"] == null) { if (User.Identity.IsAuthenticated) { Session["username"] = User.Identity.Name; } else { var tempUser = Guid.NewGuid().ToString(); Session["username"] = tempUser; } } using (PenghasilanDAL data = new PenghasilanDAL()) { try { data.Tambah(tmbh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Penghasilan " + tmbh.Nama_penghasilan + " berhasil ditambah"); return(RedirectToAction("Index")); } catch { return(View()); } } }
public ActionResult EditRealisasi(Realisasi ubh) { using (RealisasiDAL data = new RealisasiDAL()) { try { data.UbahRealisasi(ubh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Komponen " + ubh.Nama_realisasi + " berhasil dirubah"); } catch { return(View()); } } return(RedirectToAction("TampilRealisasi")); }
public ActionResult Edit(Penghasilan ubh) { using (PenghasilanDAL data = new PenghasilanDAL()) { try { data.Ubah(ubh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Komponen " + ubh.Nama_penghasilan + " berhasil dirubah"); } catch { return(View()); } } return(RedirectToAction("Index")); }
public ActionResult TambahRealisasi(Realisasi tmbh) { using (RealisasiDAL data = new RealisasiDAL()) { try { data.TambahRealisasi(tmbh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Pengeluaran " + tmbh.Nama_realisasi + " berhasil ditambah"); return(RedirectToAction("TampilRealisasi")); } catch { return(View()); } } }
public ActionResult Create(Komp_Pengeluaran tmbh) { using (PengeluaranAllDAL data = new PengeluaranAllDAL()) { try { data.TambahKomp(tmbh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Komponen " + tmbh.Nama_komponen + " berhasil ditambah"); return(RedirectToAction("Index")); } catch { return(View()); } } }
public ActionResult EditCicilan(Cicilan ubh) { using (PengeluaranAllDAL data = new PengeluaranAllDAL()) { try { data.UbahCicilan(ubh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Komponen " + ubh.Nama_cicilan + " berhasil dirubah"); } catch { return(View()); } } return(RedirectToAction("TampilCicilan")); }
public ActionResult TambahCicilan(Cicilan tmbh) { using (PengeluaranAllDAL data = new PengeluaranAllDAL()) { try { data.TambahCicilan(tmbh); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Pengeluaran " + tmbh.Nama_cicilan + " berhasil ditambah"); return(RedirectToAction("TampilCicilan")); } catch { return(View()); } } }
public ActionResult Delete(int?id) { if (id != null) { using (PenghasilanDAL data = new PenghasilanDAL()) { try { data.HapusData(id.Value); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Komponen berhasil dihapus"); } catch { return(View()); } } } return(RedirectToAction("Index")); }
public ActionResult DeleteRealisasi(int?id) { if (id != null) { using (RealisasiDAL data = new RealisasiDAL()) { try { data.HapusRealisasi(id.Value); TempData["Pesan"] = Pesan.GetPesan("Sukses !", "success", "Data Realisasi berhasil dihapus"); } catch { return(View()); } } } return(RedirectToAction("TampilRealisasi")); }