void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Account_edit = ((Sales.Account.AccountEdit)(target));
                return;

            case 2:
                this.txtcustomer = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.ComProduct = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.ComBranch = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.ComEm = ((System.Windows.Controls.ComboBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
 private void ShowEditForm(CUSTOMER pv)
 {
     if (pv != null)
     {
         AccountEdit pro = new AccountEdit();
         pro.Show();
     }
 }
Exemple #3
0
 private void ShowEditForm(AccountView pv)
 {
     if (pv != null)
     {
         AccountEdit ac = new AccountEdit();
         ac.Show();
         AccountEditVM avm = new AccountEditVM();
         ac.DataContext            = avm;
         avm.vm                    = this;
         avm.AccountViewObj        = AccountViewObj;
         avm.Account_tranObj       = Account_tranObj;
         avm.CustId                = AccountViewObj.customer.CUST_ID;
         avm.cv                    = "update";
         ac.ComBranch.ItemsSource  = BranchDao.Instance().getAll();
         ac.ComProduct.ItemsSource = listpro;
         avm.listem                = listem;
         ac.ComEm.ItemsSource      = listem;
     }
 }
Exemple #4
0
 private void NewEditForm()
 {
     if (AccountViewObj != null)
     {
         AccountEdit ac = new AccountEdit();
         ac.Show();
         AccountEditVM avm = new AccountEditVM();
         ac.DataContext             = avm;
         avm.vm                     = this;
         avm.CustId                 = AccountViewObj.customer.CUST_ID;
         avm.AccountViewObj.NameCus = AccountViewObj.NameCus;
         avm.cv                     = "insert";
         avm.listem                 = listem;
         ac.ComBranch.ItemsSource   = BranchDao.Instance().getAll();
         ac.ComProduct.ItemsSource  = listpro;
         ac.ComEm.ItemsSource       = listem;
     }
     else
     {
         MessageBox.Show("Chưa có tên khách hàng");
     }
 }