public void invalid(int id_topup, int admin) { trtopup trtopup = _DB.trtopup.Single <trtopup>(s => s.id_topup == id_topup); trtopup.status = 0; trtopup.validate = 0; trtopup.id_admin = admin; trtopup.tgl_validasi = DateTime.Now; _DB.SaveChanges(); }
public void valid(int id_topup, int admin) { trtopup trtopup = _DB.trtopup.Single <trtopup>(s => s.id_topup == id_topup); trtopup.status = 0; trtopup.validate = 1; trtopup.id_admin = admin; trtopup.tgl_validasi = DateTime.Now; _DB.SaveChanges(); if (trtopup.id_penyewa != null) { this.mspenyewa.topup(trtopup.jml_topup, trtopup.id_penyewa); } if (trtopup.id_rental != null) { this.msrental.topup(trtopup.jml_topup, trtopup.id_rental); } }
public void addData(trtopup topup) { _DB.trtopup.Add(topup); _DB.SaveChanges(); }