public async Task <ActionResult> Index() { if (Session["User"] != null) { string username = Session["User"].ToString(); if (username == "*****@*****.**") { ViewModel mymodel = new ViewModel(); List <ListItemModel> ordersList = Helper.Helper.OrdersList(); List <ListItemModel> skuList = Helper.Helper.SKUList(); mymodel.AccessoriesStock = await AccessoriesStockService.AvailableAccessoriesStock(); mymodel.ListItemModel = new List <SelectListItem>(); foreach (ListItemModel item in skuList) { mymodel.ListItemModel.Add(new SelectListItem { Text = item.Value }); } mymodel.OrdersListItemModel = new List <SelectListItem>(); foreach (ListItemModel item in ordersList) { mymodel.OrdersListItemModel.Add(new SelectListItem { Text = item.Value }); } return(View(mymodel)); } } return(RedirectToAction("Index", "Home")); }
public ActionResult ManageAccessories(int AccessoryId, int AddAccessoriesCount, int RemoveAccessoriesCount) { var result = AccessoriesStockService.UpdateAccessoriesCount(AccessoryId, AddAccessoriesCount, RemoveAccessoriesCount).Result; return(View("Index", "ManageOrders")); }