private void LoadGrid()
        {
            DataSet suppliers = Dal.LoadManufacturer();

            GridView1.DataSource = suppliers.Tables[0];
            GridView1.DataBind();
        }
Example #2
0
        private void LoadBrand()
        {
            clsManufacturer Dal       = new clsManufacturer();
            DataSet         dsBrand   = Dal.LoadManufacturer();
            string          htmlBrand = string.Empty;

            if (dsBrand != null && dsBrand.Tables.Count > 0 && dsBrand.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in dsBrand.Tables[0].Rows)
                {
                    htmlBrand += "<li><a href='SearchMedicine.aspx?BrandId=" + int.Parse("0" + dr["ManufacturerID"]) + "'>" + Convert.ToString(dr["ManufacturerName"]) + "</a></li>";
                }
                ltrlBrand.Text = htmlBrand;
            }
            else
            {
                htmlBrand      = "<li><a href='#'>No Brand Found</a></li>";
                ltrlBrand.Text = htmlBrand;
            }
        }