private void LoadCustInfo()
        {
            DataTable       custDateTable   = new DataTable();
            CustomerInfoBAL customerInfoBAL = new CustomerInfoBAL();

            if (ddlSearchCustomer.SelectedItem.Equals("BO Id"))
            {
                _boID         = txtSearchCustomer.Text;
                custDateTable = customerInfoBAL.GetCustInfoByBOID(_boID);
                if (custDateTable.Rows.Count > 0)
                {
                    int _custCode = Convert.ToInt32(custDateTable.Rows[0][0].ToString());
                    txtCustCode.Text          = custDateTable.Rows[0][0].ToString();
                    txtAccountHolderName.Text = custDateTable.Rows[0][1].ToString();
                    txtAccountHolderBOId.Text = custDateTable.Rows[0][2].ToString();
                }
                else
                {
                    MessageBox.Show("No customer found.");
                }
            }
            else
            {
                _custCode     = txtSearchCustomer.Text;
                custDateTable = customerInfoBAL.GetCustInfoByCustCode(_custCode);
                if (custDateTable.Rows.Count > 0)
                {
                    txtCustCode.Text          = custDateTable.Rows[0][0].ToString();
                    txtAccountHolderName.Text = custDateTable.Rows[0][1].ToString();
                    txtAccountHolderBOId.Text = custDateTable.Rows[0][2].ToString();
                }
                else
                {
                    MessageBox.Show("No customer found.");
                }
            }
        }
        private void LoadCustInfo()
        {
            DataTable       custDateTable    = new DataTable();
            DataTable       NewcustDateTable = new DataTable();
            CustomerInfoBAL customerInfoBAL  = new CustomerInfoBAL();
            string          newCust          = string.Empty;

            if (tempMenuPurpose != newCustomerMoneyBalance)
            {
                if (ddlSearchCustomer.SelectedItem.Equals("BO Id"))
                {
                    _boID         = txtSearchCustomer.Text;
                    custDateTable = customerInfoBAL.GetCustInfoByBOID(_boID);
                    if (custDateTable.Rows.Count > 0)
                    {
                        int _custCode = Convert.ToInt32(custDateTable.Rows[0][0].ToString());
                        txtCustCode.Text          = custDateTable.Rows[0][0].ToString();
                        txtAccountHolderName.Text = custDateTable.Rows[0][1].ToString();
                        txtAccountHolderBOId.Text = custDateTable.Rows[0][2].ToString();
                    }
                    else
                    {
                        MessageBox.Show("No customer found.");
                    }
                }
                else
                {
                    _custCode     = txtSearchCustomer.Text;
                    custDateTable = customerInfoBAL.GetCustInfoByCustCode(_custCode);
                    if (custDateTable.Rows.Count > 0)
                    {
                        txtCustCode.Text          = custDateTable.Rows[0][0].ToString();
                        txtAccountHolderName.Text = custDateTable.Rows[0][1].ToString();
                        txtAccountHolderBOId.Text = custDateTable.Rows[0][2].ToString();
                    }
                    else
                    {
                        MessageBox.Show("No customer found.");
                    }
                }
            }
            else
            {
                NewcustDateTable = customerInfoBAL.IsExistNewCustomerCode(txtSearchCustomer.Text);
                if (NewcustDateTable.Rows.Count > 0)
                {
                    if (NewcustDateTable.Rows[0][1].ToString() != "") //Check BO_ID
                    {
                        MessageBox.Show("The Customer Already exist, The report Can't Shown here",
                                        "Existing Customer Check", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    else if (NewcustDateTable.Rows[0][0].ToString() != "")
                    {
                        newCust          = NewcustDateTable.Rows[0][0].ToString();
                        txtCustCode.Text = newCust;
                    }
                }
                else
                {
                    MessageBox.Show("Customer not exist",
                                    "Customer Check", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }