Пример #1
0
        // GET: Provinces
        public ActionResult Index()
        {
            List <Province> model = new List <Province>();

            model = ProvincesData.ListAll();
            return(View(model));
        }
Пример #2
0
        public ActionResult Delete(string id)
        {
            ViewBag.Provinces = ProvincesData.ListAll();
            City city = CitiesData.GetById(id);

            return(View(city));
        }
Пример #3
0
        // GET: City
        public ActionResult Index()
        {
            ViewBag.Provinces = ProvincesData.ListAll();
            List <City> model = new List <City>();

            model = CitiesData.ListAll();
            return(View(model));
        }
Пример #4
0
 // 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());
 }
Пример #5
0
        public ActionResult Delete(Province prov)
        {
            bool result = ProvincesData.Delete(prov.UniqueId.ToString());

            if (result)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Пример #6
0
        public ActionResult Edit(Province prov)
        {
            bool result = ProvincesData.Edit(prov);

            if (result)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Пример #7
0
        // 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));
        }
Пример #8
0
        // 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));
        }
Пример #9
0
 public ActionResult Add()
 {
     ViewBag.Provinces = ProvincesData.ListAll();
     return(View());
 }
Пример #10
0
        public ActionResult Delete(string id)
        {
            Province prov = ProvincesData.GetById(id);

            return(View(prov));
        }