Exemplo n.º 1
0
        public ActionResult Create(CountriesViewModel CountryVM)
        {
            CountriesBLL Country = new CountriesBLL();

            Country.CountryName = CountryVM.CountryName;
            Result result = Country.Add();

            if ((System.Type)result.EnumType == typeof(LookupsValidationEnum))
            {
                CountriesBLL CountryEntity = (CountriesBLL)result.Entity;
                if (result.EnumMember == LookupsValidationEnum.Done.ToString())
                {
                    Session["CountryID"] = ((CountriesBLL)result.Entity).CountryID;
                }
            }

            return(View(CountryVM));
        }
Exemplo n.º 2
0
 public ActionResult Delete(CountriesViewModel CountryVM)
 {
     CountriesBLL.Remove(CountryVM.CountryID);
     return(RedirectToAction("Index"));
 }
Exemplo n.º 3
0
        public JsonResult GetCountries()
        {
            CountriesBLL CountriesBLL = new CountriesBLL();

            return(Json(new { data = CountriesBLL.GetCountries() }, JsonRequestBehavior.AllowGet));
        }