// GET: Edit Street public ActionResult Edit(string id) { ViewBag.barangays = BarangayData.ListAll(); Street model = StreetData.GetById(id); return(View(model)); }
// GET: Barangay public ActionResult Index() { ViewBag.Districts = DistrictData.ListAll(); List <Barangay> model = new List <Barangay>(); model = BarangayData.ListAll(); return(View(model)); }
// GET: Street public ActionResult Index() { ViewBag.barangays = BarangayData.ListAll(); List <Street> model = new List <Street>(); model = StreetData.ListAll(); return(View(model)); }
public ActionResult Edit(Barangay model) { bool result = BarangayData.Edit(model); if (result) { return(RedirectToAction("Index")); } return(View()); }
public ActionResult Delete(Barangay model) { bool result = BarangayData.Delete(model.UniqueId.ToString()); if (result) { return(RedirectToAction("Index")); } return(View()); }
// GET: Edit Barangay public ActionResult Edit(string id) { if (String.IsNullOrEmpty(id)) { return(RedirectToAction("Index")); } ViewBag.Districts = DistrictData.ListAll(); Barangay model = BarangayData.GetById(id); return(View(model)); }
// GET: Add Business Record public ActionResult Add() { ViewBag.businessowners = BusinessOwnerData.ListAll(); ViewBag.businessdetails = BusinessDetailData.ListAll(); ViewBag.provinces = ProvincesData.ListAll(); ViewBag.cities = CitiesData.ListAll(); ViewBag.districts = DistrictData.ListAll(); ViewBag.barangays = BarangayData.ListAll(); ViewBag.streets = StreetData.ListAll(); ViewBag.businesstype = BusinessTypeData.ListAll(); ViewBag.Requirements = RequirementData.GetNew(); return(View()); }
// GET: Delete Business Record public ActionResult Delete(string id) { ViewBag.businessowners = BusinessOwnerData.ListAll(); ViewBag.businessdetails = BusinessDetailData.ListAll(); ViewBag.provinces = ProvincesData.ListAll(); ViewBag.cities = CitiesData.ListAll(); ViewBag.districts = DistrictData.ListAll(); ViewBag.barangays = BarangayData.ListAll(); ViewBag.streets = StreetData.ListAll(); ViewBag.businesstype = BusinessTypeData.ListAll(); BusinessRecord model = BusinessRecordData.GetById(id); return(View(model)); }
// GET: Edit Business Record public ActionResult Edit(string id) { ViewBag.businessowners = BusinessOwnerData.ListAll(); ViewBag.businessdetails = BusinessDetailData.ListAll(); ViewBag.provinces = ProvincesData.ListAll(); ViewBag.cities = CitiesData.ListAll(); ViewBag.districts = DistrictData.ListAll(); ViewBag.barangays = BarangayData.ListAll(); ViewBag.streets = StreetData.ListAll(); ViewBag.businesstype = BusinessTypeData.ListAll(); BusinessRecord model = BusinessRecordData.GetById(id); ViewBag.businessRecords = new HashSet <int>(model.Requirements.Select(i => i.Id)); if (model.BusinessDetail.isNew) { ViewBag.Requirements = RequirementData.GetNew(); } else { ViewBag.Requirements = RequirementData.GetRenew(); } return(View(model)); }
// GET: Barangays public ActionResult Barangays() { List <Barangay> bars = BarangayData.ListAll(); return(Json(new { bars, isSuccess = true }, JsonRequestBehavior.AllowGet)); }
// GET: Add Street public ActionResult Add() { ViewBag.barangays = BarangayData.ListAll(); return(View()); }