public ActionResult AdminInventoryData(Models.LocationModel loc)
        {
            ViewData["adminlocation"] = HttpContext.Session.GetString("adminlocation");
            var x = PC.getInventorybyloc(loc.Location);

            PizzaWebsite.Models.LocationModel y = PizzaWebsite.Models.ModelMapper.Map(x);
            return(View(y));
        }
Exemple #2
0
        public static LocationModel FromBusinessEntity(Business.Entities.Location businessEntity)
        {
            LocationModel model = new Models.LocationModel();

            model.Id          = businessEntity.ID;
            model.Code        = businessEntity.Code;
            model.Description = businessEntity.Description;
            model.Order       = businessEntity.Order;

            return(model);
        }
        public ActionResult AdminOrderData(Models.LocationModel loc)
        {
            List <Pizzaboxdomain.PizzaOrder>      x = PC.searchbyLocation(loc.Location);
            List <PizzaWebsite.Models.OrderModel> y = new List <PizzaWebsite.Models.OrderModel>();

            foreach (var item in x)
            {
                y.Add(PizzaWebsite.Models.ModelMapper.Map(item));
            }
            ViewData["adminlocation"] = HttpContext.Session.GetString("adminlocation");

            return(View(y));
        }
Exemple #4
0
        public ActionResult GetLocationByID(int?locationID)
        {
            var location = Location.GetAllLocations(Session["SelectedCustomerID"].ToString(), Session["UserID"].ToString()).
                           Where(x => x.LocationID == locationID);

            if (location != null)
            {
                LocationModel model = new Models.LocationModel();

                foreach (var item in location)
                {
                    model.LocationName       = item.LocationName;
                    model.FullAddress        = item.FullAddress;
                    model.ParentLocationName = item.ParentLocationName;
                }

                return(View(model));
            }

            return(View()); //Should never reach this
        }
        public ActionResult AdminUserData(Models.LocationModel loc)
        {
            ViewData["adminlocation"] = HttpContext.Session.GetString("adminlocation");
            var x = PC.getUserbyloc(loc.Location);
            List <PizzaWebsite.Models.OrderModel> y = new List <PizzaWebsite.Models.OrderModel>();

            foreach (var item in x)
            {
                y.Add(PizzaWebsite.Models.ModelMapper.Map(item));
            }

            List <string> userlist = new List <string>();

            for (int i = 0; i < y.Count(); i++)
            {
                userlist.Add(y[i].Username);
            }
            userlist.Distinct();

            return(View(userlist));
        }
 public ActionResult AdminLocation(Models.LocationModel loc)
 {
     Pizzaboxdomain.PizzaLocations pizLoc = new Pizzaboxdomain.PizzaLocations();
     HttpContext.Session.SetString("adminlocation", loc.Location);
     return(RedirectToAction("AdminSelection", "Order", loc));
 }
        public ActionResult UserLocation(Models.LocationModel loc)
        {
            HttpContext.Session.SetString("location", loc.Location);

            return(RedirectToAction("CustomOrPreset", "Order", loc));
        }
 //lets admin pick which thing they wanna see
 public ActionResult AdminSelection(Models.LocationModel loc)
 {
     ViewData["adminlocation"] = HttpContext.Session.GetString("adminlocation");
     return(View(loc));
 }