コード例 #1
0
        public static UserControl GetCtrlAddOrder()
        {
            var ctrlOrder     = new CtrlAddOrder();
            var addOrderModel = new Models.AddOrderModel();
            var addOrderVM    = new Models.AddOrderViewModel(addOrderModel)
            {
                Header = "Добавление заказа ToFly"
            };

            //addOrderVM.CloseAction = new Action(() => { MainClass.HideUC(ctrlOrder); });
            ctrlOrder.DataContext = addOrderVM;
            //ctrlOrder.Tag = "Добавление заказа ToFly";
            return(ctrlOrder);
        }
コード例 #2
0
        public static UserControl GetCtrlAddOrder(OrderFlight curentOrder)
        {
            var ctrlOrder = new CtrlAddOrder();
            //var flightOrder  = new  Order
            var addOrderModel = new Models.AddOrderModel(curentOrder);
            var addOrderVM    = new Models.AddOrderViewModel(addOrderModel)
            {
                Header = $"Изменение заказа {curentOrder.Id}"
            };

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