public ActionResult ManufacturerList()
        {
            var manufacturers = Manufacturer.GetManufacturers();

            if (HttpContext.Request.IsAjaxRequest())
            {
                return(Json(new SelectList(manufacturers.ToArray(), "ManCode", "ManName"), JsonRequestBehavior.AllowGet));
            }

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        private void ResetManufacturerDropDown()
        {
            cbxManufacturer.Items.Clear();

            manufacturers = Manufacturer.GetManufacturers(null);

            foreach (Manufacturer manufacturer in manufacturers)
            {
                cbxManufacturer.Items.Add(manufacturer.Name);
            }
        }