Пример #1
0
 private void displayResult(string pSearchString)
 {
     try
     {
         dgvList.DataSource = null;
         dgvList.DataSource = loPriceQuotation.getPriceQuotationByCustomer(lCustomerId, pSearchString);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void cboCustomer_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                txtContactPerson.Clear();
                try
                {
                    cboPriceQuotation.DataSource = null;
                }
                catch
                {
                    cboPriceQuotation.Items.Clear();
                }


                foreach (DataRow _dr in loCustomer.getAllData("", cboCustomer.SelectedValue.ToString(), "").Rows)
                {
                    txtContactPerson.Text = _dr["Contact Person"].ToString();
                }
            }
            catch
            {
                txtContactPerson.Clear();
            }

            try
            {
                cboPriceQuotation.DataSource    = loPriceQuotation.getPriceQuotationByCustomer(cboCustomer.SelectedValue.ToString(), "");
                cboPriceQuotation.DisplayMember = "Id";
                cboPriceQuotation.ValueMember   = "Id";
                cboPriceQuotation.SelectedIndex = -1;
            }
            catch
            {
                cboPriceQuotation.DataSource = null;
            }
        }