//Delete Collector Name public ActionResult DeleteCollectorName(FM_Barangay_BarangayName model, int BarangayCollectorID) { Barangay_CollectorName tblBarangayName = (from e in TOSSDB.Barangay_CollectorName where e.BarangayCollectorID == BarangayCollectorID select e).FirstOrDefault(); TOSSDB.Barangay_CollectorName.Remove(tblBarangayName); TOSSDB.SaveChanges(); return(RedirectToAction("Index")); }
//Get Collector Name public ActionResult Get_UpdateCollectorName(FM_Barangay_BarangayName model, int BarangayCollectorID) { Barangay_CollectorName tblBarangayName = (from e in TOSSDB.Barangay_CollectorName where e.BarangayCollectorID == BarangayCollectorID select e).FirstOrDefault(); model.getBarangayCollectorcolumns.BarangayCollectorID = tblBarangayName.BarangayCollectorID; model.getBarangayCollectorcolumns.FirstName = tblBarangayName.FirstName; model.getBarangayCollectorcolumns.MiddleName = tblBarangayName.MiddleName; model.getBarangayCollectorcolumns.LastName = tblBarangayName.LastName; return(PartialView("BarangayCollector/_UpdateBarangayCollector", model)); }
public ActionResult UpdateCollectorName(FM_Barangay_BarangayName model) { Barangay_CollectorName tblBarangayName = (from e in TOSSDB.Barangay_CollectorName where e.BarangayCollectorID == model.getBarangayCollectorcolumns.BarangayCollectorID select e).FirstOrDefault(); tblBarangayName.FirstName = model.getBarangayCollectorcolumns.FirstName; tblBarangayName.MiddleName = model.getBarangayCollectorcolumns.MiddleName; tblBarangayName.LastName = model.getBarangayCollectorcolumns.LastName; TOSSDB.Entry(tblBarangayName); TOSSDB.SaveChanges(); return(PartialView("BarangayCollector/_UpdateBarangayCollector", model)); }
//Add Collector Name public JsonResult AddBarangayCollectorName(FM_Barangay_BarangayName model) { Barangay_CollectorName tblBarangayName = new Barangay_CollectorName(); tblBarangayName.FirstName = model.getBarangayCollectorcolumns.FirstName; tblBarangayName.MiddleName = model.getBarangayCollectorcolumns.MiddleName; tblBarangayName.LastName = model.getBarangayCollectorcolumns.LastName; TOSSDB.Barangay_CollectorName.Add(tblBarangayName); TOSSDB.SaveChanges(); return(Json(tblBarangayName)); }
public FM_Barangay_BarangayName() { getBarangayName = new List <Barangay_BarangayName>(); getBarangayNamecolumns = new Barangay_BarangayName(); getBarangayNameList = new List <BarangayNameList>(); getBarangayCollector = new List <Barangay_CollectorName>(); getBarangayCollectorcolumns = new Barangay_CollectorName(); getBarangayCollectorList = new List <BarangayCollectorList>(); getBarangayBankAccount = new List <Barangay_BarangayBankAccount>(); getBarangayBankAccountcolumns = new Barangay_BarangayBankAccount(); getBarangayBankAccountList = new List <BarangayBankAccountList>(); }