Exemplo n.º 1
0
 /**
  * 顧客一覧で依頼主顧客を選択したときのイベント
  */
 internal void AddSendCustomer(object sender, CustomerListEventArgs e)
 {
     this.SendCustomerViewModel = e.CustomerViewModel;
     this.ShowOrderHistoryBySendCustomer();
     //履歴から追加ボタンを有効に
     this.UpdateCommands();
 }
Exemplo n.º 2
0
        private void EditSelectedCustomer()
        {
            var e = new CustomerListEventArgs()
            {
                CustomerViewModel = new CustomerViewModel(this.OrderHistories.First(x => x.IsSelected).OrderHistory.CustomerMasterReceive)
            };

            OnEditCustomerButtonClick(this, e);
        }
Exemplo n.º 3
0
        private void AddResceiveCustomer()
        {
            var arg = new CustomerListEventArgs()
            {
                CustomerViewModel = this.SelectedCustomer
            };

            this.OnResceiveCustomerAdded(this, arg);
        }
Exemplo n.º 4
0
        private void AddSendCustomer()
        {
            var arg = new CustomerListEventArgs()
            {
                CustomerViewModel = this.SelectedCustomer
            };

            this.CanAddSendCustomer = false;
            this.OnSendCustomerAdded(this, arg);
        }
Exemplo n.º 5
0
 private void RemoveOrder()
 {
     this.Orders.Remove(this.selectedOrder);
     if (!this.Orders.Any())
     {
         this.SendCustomerViewModel = null;
         var arg = new CustomerListEventArgs()
         {
             CustomerViewModel = null
         };
         this.OnSendCustomerChanged(this, arg);
         this.OrderHistories.Clear();
         this.UpdateCommands();
     }
 }
Exemplo n.º 6
0
        private void UpdateOrderHistory()
        {
            long orderID = 0;

            if (this.entityService.OrderHistories.Any())
            {
                orderID = this.entityService.OrderHistories.Max(x => x.OrderID);
            }
            //OrderからOrderHistoryへレコードをmove
            foreach (var order in this.Orders)
            {
                orderID++;
                this.OrderHistories.Add(new OrderHistoryViewModel(OrderHistory.CreateOrderHistory(orderID,
                                                                                                  order.Order.OrderDate,
                                                                                                  order.Order.ReceiveCustID,
                                                                                                  order.Order.SendCustID,
                                                                                                  order.Order.ProductID)));
            }
            //ほんとはここでorderhistoryを並べ替えたい

            //最終発送を更新
            this.SendCustomerViewModel.Customer.LatestSend = DateTime.Now;

            //最終宛先を更新
            foreach (var order in this.Orders)
            {
                this.entityService.Customers.First(x => x.CustNo == order.Order.CustomerMasterReceive.CustNo)
                .LatestResceive = DateTime.Now;
            }

            // ClearだとCollectionChangedが起きないので一個一個消す
            for (var i = this.Orders.Count - 1; i >= 0; i--)
            {
                this.Orders.RemoveAt(i);
            }

            var arg = new CustomerListEventArgs()
            {
                CustomerViewModel = null
            };

            this.RaisePropertyChanged(() => this.SendCustomerViewModel);
            this.RaisePropertyChanged(() => this.OrderHistories);
            this.RaisePropertyChanged(() => this.Orders);
            this.OnSendCustomerChanged(this, arg);
            this.SaveChanges();
            this.UpdateCommands();
        }
Exemplo n.º 7
0
 /**
  * 顧客一覧で受け取り先顧客を選択した時のイベント
  */
 internal void AddResceiveCustomer(object sender, CustomerListEventArgs e)
 {
     this.AddNewOrderCore(e.CustomerViewModel.Customer.CustNo);
     //印刷ボタンを有効に
     this.UpdateCommands();
 }
Exemplo n.º 8
0
        private void addNewCustomer()
        {
            var e = new CustomerListEventArgs();

            OnAddNewCustomerButtonClick(this, e);
        }
Exemplo n.º 9
0
 internal void AddNewCustomer(object sender, CustomerListEventArgs e)
 {
     this.AddNewCustomer();
 }
Exemplo n.º 10
0
 internal void AddNewCustomer(object sender, CustomerListEventArgs e)
 {
     this.AddNewCustomer();
 }
Exemplo n.º 11
0
 internal void ChangeCanAddSendCustomer(Object o, CustomerListEventArgs arg)
 {
     //CustomerViewModelが無い場合は送信者を追加できる。
     this.CanAddSendCustomer = arg.CustomerViewModel == null;
 }
Exemplo n.º 12
0
 private void AddSendCustomer()
 {
     var arg = new CustomerListEventArgs() {CustomerViewModel = this.SelectedCustomer };
     this.CanAddSendCustomer = false;
     this.OnSendCustomerAdded(this, arg);
 }
Exemplo n.º 13
0
        private void AddResceiveCustomer()
        {
            var arg = new CustomerListEventArgs() {CustomerViewModel = this.SelectedCustomer };

            this.OnResceiveCustomerAdded(this, arg);
        }
Exemplo n.º 14
0
 internal void SetSelectedCustomer(object sender, CustomerListEventArgs e)
 {
     this.SelectedCustomer = e.CustomerViewModel;
 }
Exemplo n.º 15
0
 internal void ChangeCanAddSendCustomer(Object o, CustomerListEventArgs arg)
 {
     //CustomerViewModelが無い場合は送信者を追加できる。
     this.CanAddSendCustomer = arg.CustomerViewModel == null;
 }
Exemplo n.º 16
0
 internal void SetSelectedCustomer(object sender, CustomerListEventArgs e)
 {
     this.SelectedCustomer = e.CustomerViewModel;
 }
Exemplo n.º 17
0
 private void ChangeToCustomerList(object sender, CustomerListEventArgs e)
 {
     this.SelectedTabIndex = 1;
 }
Exemplo n.º 18
0
 private void ChangeToCustomerList(object sender, CustomerListEventArgs e)
 {
     this.SelectedTabIndex = 1;
 }