protected void GetVendorList()
        {
            VendorBLL vendor = new VendorBLL();

            try
            {
                DataTable dt = vendor.GetVendorList();
                vendorListGridView.DataSource = dt;
                vendorListGridView.DataBind();

                if (dt.Rows.Count < 1)
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Vendor List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                vendor = null;
            }
        }
        protected void GetVendorList()
        {
            VendorBLL vendor = new VendorBLL();

            try
            {
                DataTable dt = vendor.GetVendorList();

                if (dt.Rows.Count > 0)
                {
                    vendorListListBox.Items.Clear();

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        vendorListListBox.Items.Add(new ListItem(dt.Rows[i]["VendorName"].ToString(), dt.Rows[i]["VendorId"].ToString()));
                    }
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Vendor Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                vendor = null;
                countVendorLabel.Text = "Total: " + vendorListListBox.Items.Count.ToString();
            }
        }
        protected void selectDropDownList_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            if (selectDropDownList.SelectedValue == "CST")
            {
                CustomerBLL customerBll = new CustomerBLL();
                DataTable dt = new DataTable();
                dt = customerBll.GetActiveCustomerList();
                customerListGridView.Visible = true;
                vendorGridView.Visible = false;
                companyGridView.Visible = false;
                NumberDiv.Visible = false;
                customerListGridView.DataSource = dt;
                customerListGridView.DataBind();
                if (customerListGridView.Rows.Count > 0)
                {
                    customerListGridView.UseAccessibleHeader = true;
                    customerListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }

            }
            else if (selectDropDownList.SelectedValue == "VND")
            {
                VendorBLL vendorBll = new VendorBLL();
                DataTable dt = new DataTable();
                dt = vendorBll.GetVendorList();
                vendorGridView.Visible = true;
                customerListGridView.Visible = false;
                companyGridView.Visible = false;
                NumberDiv.Visible = false;
                vendorGridView.DataSource = dt;
                vendorGridView.DataBind();

                if (vendorGridView.Rows.Count > 0)
                {
                    vendorGridView.UseAccessibleHeader = true;
                    vendorGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }

            }
            else if (selectDropDownList.SelectedValue == "COM")
            {
                CompanyBLL companyBll = new CompanyBLL();
                DataTable dt = new DataTable();
                dt = companyBll.GetActiveCompany();
                companyGridView.Visible = true;
                customerListGridView.Visible = false;
                vendorGridView.Visible = false;
                NumberDiv.Visible = false;
                companyGridView.DataSource = dt;
                companyGridView.DataBind();

                if (companyGridView.Rows.Count > 0)
                {
                    companyGridView.UseAccessibleHeader = true;
                    companyGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }

            }
            else
            {
                customerListGridView.Visible = false;
                vendorGridView.Visible = false;
                companyGridView.Visible = false;
                NumberDiv.Visible = true;
            }
        }