private void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         string  paramProductID  = this.txtBoxProductCode.Text.Trim();
         string  paramSupplierID = this.txtBoxSupplierID.Text.Trim();
         DataSet ds = new DataSet();
         BUProductSupplierInfo myBUProductSupplierInfo = new BUProductSupplierInfo();
         ds = myBUProductSupplierInfo.GetAll_ProSupInfo(paramProductID, paramSupplierID);
         gdcInfo.DataSource = ds.Tables[0];
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #2
0
        public void SetSupplier(string paramProductID)
        {
            DataTable             mySupplierDt            = new DataTable();
            BUProductSupplierInfo myBUProductSupplierInfo = new BUProductSupplierInfo();

            mySupplierDt                           = myBUProductSupplierInfo.GetAll_ProSupInfo(paramProductID, string.Empty).Tables[0];
            combSpplier.DataSource                 = mySupplierDt;
            combSpplier.DisplayMember              = "name";
            combSpplier.ValueMember                = "supplier_id";
            this.combSpplier.SelectedValueChanged += new System.EventHandler(this.combSpplier_SelectedValueChanged);

            if (mySupplierDt.Rows.Count > 0)
            {
                string paramSupplierID = combSpplier.SelectedValue.ToString();
                GetPrice(paramProductID, paramSupplierID);
            }
        }