コード例 #1
0
        public TransportView(IMessageSender messageSender, IRepository repository, WayBillView billView)
        {
            this.messageSender = messageSender;
            this.repository    = repository;
            container          = new UnityContainer();
            this.billView      = billView;

            GetTransports();
            if (billView.IsGuide)
            {
                Content = "Выбрать";
                IsGuide = false;
            }
            else
            {
                Content = "Изменить";
                IsGuide = true;
            }

            GetFuelMarkCommand          = new DelegateCommand(() => GetFuelMark());
            GetCurrentRowIdCommand      = new DelegateCommand(() => GetCurrentRowId());
            SaveTransportDatasCommand   = new DelegateCommand(() => SaveTransportDatas());
            ChangeTransportDatasCommand = new DelegateCommand(() => ChangeTransportDatas());
            DeleteTransportCommand      = new DelegateCommand(() => DeleteTransport());
        }
コード例 #2
0
        public DriverBillHelperView(IMessageSender messageSender, IRepository repository, WayBillView billView)
        {
            this.messageSender = messageSender;
            this.repository    = repository;
            container          = new UnityContainer();
            this.billView      = billView;

            GetDatas();
            GetHelperRowIdCommand = new DelegateCommand(() => GetHelperRowId());
            DriverDemoCommand     = new DelegateCommand <string>((s) => DriverDemo(s));
        }
コード例 #3
0
ファイル: DriverView.cs プロジェクト: kotdenis/WpfFuelStation
        public DriverView(IMessageSender messageSender, IRepository repository, WayBillView billView)
        {
            this.messageSender = messageSender;
            this.repository    = repository;
            container          = new UnityContainer();
            this.billView      = billView;


            if (billView.IsGuide)
            {
                Content = "Выбрать";
                IsGuide = false;
            }
            else
            {
                Content = "Изменить";
                IsGuide = true;
            }
            GetDrivers();
            GetCurrentRowIdCommand = new DelegateCommand(() => GetCurrentRowId());
            SaveDriverDatasCommand = new DelegateCommand(() => SaveDriverDatas());
            DeleteDriverCommand    = new DelegateCommand(() => DeleteDriver());
            ChangeDriverCommand    = new DelegateCommand(() => ChangeDriver());
        }