コード例 #1
0
        public JsonResult GetVendorsForDropdownJSON()
        {
            List <SelectListItem> vendors = Vendors.GetVendorList();

            var rows = vendors.ToArray();

            return(new JsonResult {
                Data = new { success = true, rows = rows }
            });
        }
コード例 #2
0
        public ActionResult Add()
        {
            ProductTransactions_Add viewProductTransactions_Add = new ProductTransactions_Add();

            viewProductTransactions_Add.TransactionDate   = DateTime.Now;
            viewProductTransactions_Add.selectListClients = Clients.GetClientListForDropdown();
            //viewProductTransactions_Add.selectListProducts = Products.GetProductList();
            viewProductTransactions_Add.selectListVendors = Vendors.GetVendorList();

            return(View("AddPartial", viewProductTransactions_Add));
        }