Exemplo n.º 1
0
 internal void UpdateIsMainProductAccount(ProductAccountRelation pa)
 {
     try
     {
         SetService();
         SerClient.UpdateIsMainProductAccount(pa);
     }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
             SerClient.Abort();
     }
 }
Exemplo n.º 2
0
 public void UpdateProductAccountRelation(ProductAccountRelation data)
 {
     try {
     SetService();  SerClient.UpdateProductAccountRelation(data); }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
         SerClient.Abort(); 
     }
 }
Exemplo n.º 3
0
        private void btnAddCust_Click(object sender, RoutedEventArgs e)
        {
            if (this.txtCust.Account == null)
                return;

            if (string.IsNullOrEmpty(txtCustItem.Text))
                return;

            ProductAccountRelation pa = new ProductAccountRelation
            {
                CreatedBy = App.curUser.UserName,
                CreationDate = DateTime.Now,
                Account = this.txtCust.Account,
                AccountType = new AccountType { AccountTypeID = AccType.Customer },
                IsFromErp = false,
                ItemNumber = this.txtCustItem.Text,
                Product = this.Model.Record,
                Code1 = this.txtCustCode1.Text,
                Code2 = this.txtCustCode2.Text
            };

            AddProductAccount(sender, new DataEventArgs<ProductAccountRelation>(pa));
        }
Exemplo n.º 4
0
 public IList<ProductAccountRelation> GetProductAccountRelation(ProductAccountRelation data)
 {
     try {
     SetService();  return SerClient.GetProductAccountRelation(data); }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
         SerClient.Abort(); 
     }
 }
Exemplo n.º 5
0
        private void btnAddVendor_Click(object sender, RoutedEventArgs e)
        {
            //if (this.txtVendor.Account == null)
                //return;

            //if (string.IsNullOrEmpty(txtVendorItem.Text))
                //return;

            ProductAccountRelation pa = new ProductAccountRelation
            {
                CreatedBy = App.curUser.UserName,
                CreationDate = DateTime.Now,
                Account = this.txtVendor.Account,
                AccountType = new AccountType { AccountTypeID = AccType.Vendor },
                IsFromErp = false,
                ItemNumber = this.txtVendorItem.Text,
                Product = this.Model.Record,
                Code1 = this.txtVendorCode1.Text,
                Code2 = this.txtVendorCode2.Text,
                IsDefault = this.chkMain.IsChecked
            };


            AddProductAccount(sender, new DataEventArgs<ProductAccountRelation>(pa));
        }