Exemple #1
0
        public static UserControl GetCtrlAddToGoOrder()
        {
            var ctrlOrder     = new CtrlAddToGoOrder();
            var addOrderModel = new Models.AddToGoOrderModel();
            var addOrderVM    = new Models.AddToGoOrderViewModel(addOrderModel)
            {
                Header = "Добавление заказа ToGo"
            };

            ctrlOrder.DataContext = addOrderVM;
            return(ctrlOrder);
        }
Exemple #2
0
        public static UserControl GetCtrlAddToGoOrder(OrderToGo curentOrder)
        {
            var ctrlOrder = new CtrlAddToGoOrder();
            //var flightOrder  = new  Order
            var addOrderModel = new Models.AddToGoOrderModel(curentOrder);
            var addOrderVM    = new Models.AddToGoOrderViewModel(addOrderModel)
            {
                Header = $"Изменение заказа {curentOrder.Id}"
            };

            ctrlOrder.DataContext = addOrderVM;
            //  addOrderVM.CloseAction = new Action(() => { MainClass.HideUC(ctrlOrder); });
            ctrlOrder.Tag = $"Изменение заказа {curentOrder.Id}";
            return(ctrlOrder);
        }