public ActionResult UpdateChainImageLogo()
        {
            log.InfoFormat("[UpdateChainImageLogo].");
            MenuCopyModel menuCopy = new MenuCopyModel();
            menuCopy.StringRestaurantsList = m_serviceLayer.GetAllRestaurantsInStringList();

            return View(menuCopy);
        }
 public ActionResult UpdateChainImageLogoConfirmed(MenuCopyModel menuCopy)
 {
     log.InfoFormat("[UpdateChainImageLogoConfirmed.]");
     if (menuCopy.RestaurantsSelectedListCopyFrom.Count > 0)
     {
         RestaurantBasicData selectedRestaurant = m_serviceLayer.GetRestaurantBasicById(menuCopy.RestaurantsSelectedListCopyFrom[0]);
         List<RestaurantBasicData> restList = m_serviceLayer.GetChainRestaurantsBasicByName(selectedRestaurant.Name);
         foreach (var rest in restList)
         {
             rest.LogoUrl = menuCopy.CopyFromUrl; // menuCopy.CopyFromId = New LogoURL
             m_imageService.UploadImageToRestaurant(rest, rest.LogoUrl);
         }
     }
     return RedirectToAction("Index");
 }
 public ActionResult NewMenusCopy(string CopyFromId, string CopyToId)
 {
     MenuCopyModel menuCopy = new MenuCopyModel();
     menuCopy.RestaurantsList = m_serviceLayer.GetAllRestaurants();
     return View(menuCopy);
 }
        public ActionResult MenusCopyConfirmed(MenuCopyModel MenuCopy)
        {
            log.InfoFormat("[RestaurantsController.MenusCopyConfirmed] CopyFromId={0}, CopyToId={1}.", MenuCopy.CopyFromId, MenuCopy.CopyToId);

            RestaurantModel RestCopyFrom = m_serviceLayer.GetRestaurantById(MenuCopy.CopyFromId);
            RestaurantModel RestCopyTo = m_serviceLayer.GetRestaurantById(MenuCopy.CopyToId);
            RestCopyTo.Menu = RestCopyFrom.Menu;
            RestCopyTo.Menu.RestaurantId = RestCopyTo.Id;         //Change RestaurantId To new restaurant
            foreach (var MenuPart in RestCopyTo.Menu.MenuParts)
            {
                foreach (var Dish in MenuPart.Dishes)
                {
                    Dish.ItemLocation = RestCopyTo.Location;   //Change Location To new restaurant Location
                }
            }
            m_serviceLayer.UpdateRestaurant(RestCopyTo);       //Update DB
            return RedirectToAction("Index");
        }
 public ActionResult MenuCloneConfirmed(MenuCopyModel menuCopy)
 {
     log.InfoFormat("[MenuCloneConfirmed.] menuCopyModel={0}.", menuCopy.ToString());
     m_serviceLayer.MenuClone(menuCopy);
     return RedirectToAction("Index");
 }
        //=========================================================================================================================
        public ActionResult MenuClone()
        {
            log.InfoFormat("[MenuClone].");
            MenuCopyModel menuCopy = new MenuCopyModel();
            menuCopy.StringRestaurantsList = m_serviceLayer.GetAllRestaurantsInStringList();

            return View(menuCopy);
        }
        public ActionResult MenusCopyConfirmed(MenuCopyModel MenuCopy)
        {
            log.InfoFormat("[RestaurantsController.MenusCopyConfirmed] CopyFromId={0}, CopyToId={1}.", MenuCopy.CopyFromId, MenuCopy.CopyToId);

            m_serviceLayer.MenuCloneFromRestaurant(MenuCopy.CopyFromId, MenuCopy.CopyToId);
            return RedirectToAction("PagedRestaurants");
        }