Esempio n. 1
0
        // GET: Edit Street
        public ActionResult Edit(string id)
        {
            ViewBag.barangays = BarangayData.ListAll();
            Street model = StreetData.GetById(id);

            return(View(model));
        }
Esempio n. 2
0
        // GET: Barangay
        public ActionResult Index()
        {
            ViewBag.Districts = DistrictData.ListAll();
            List <Barangay> model = new List <Barangay>();

            model = BarangayData.ListAll();
            return(View(model));
        }
Esempio n. 3
0
        // GET: Street
        public ActionResult Index()
        {
            ViewBag.barangays = BarangayData.ListAll();
            List <Street> model = new List <Street>();

            model = StreetData.ListAll();
            return(View(model));
        }
Esempio n. 4
0
        public ActionResult Edit(Barangay model)
        {
            bool result = BarangayData.Edit(model);

            if (result)
            {
                return(RedirectToAction("Index"));
            }

            return(View());
        }
Esempio n. 5
0
        public ActionResult Delete(Barangay model)
        {
            bool result = BarangayData.Delete(model.UniqueId.ToString());

            if (result)
            {
                return(RedirectToAction("Index"));
            }

            return(View());
        }
Esempio n. 6
0
        // 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));
        }
Esempio n. 10
0
        // GET: Barangays
        public ActionResult Barangays()
        {
            List <Barangay> bars = BarangayData.ListAll();

            return(Json(new { bars, isSuccess = true }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 11
0
 // GET: Add Street
 public ActionResult Add()
 {
     ViewBag.barangays = BarangayData.ListAll();
     return(View());
 }