private void contact() { SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]); SqlCommand CMD = new SqlCommand("select * from add_contact", con); DataTable dt1 = new DataTable(); SqlDataAdapter da1 = new SqlDataAdapter(CMD); da1.Fill(dt1); GridView41.DataSource = dt1; GridView41.DataBind(); }
private void contact() { SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]); SqlCommand CMD = new SqlCommand("select * from Customer_Entry where com_id='" + company_id + "'", con); DataTable dt1 = new DataTable(); SqlDataAdapter da1 = new SqlDataAdapter(CMD); da1.Fill(dt1); GridView41.DataSource = dt1; GridView41.DataBind(); }
private void contact() { company_id = Convert.ToInt32(Session["company_id"].ToString()); SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]); SqlCommand CMD = new SqlCommand("select * from add_contact where com_id='" + company_id + "'", con); DataTable dt1 = new DataTable(); SqlDataAdapter da1 = new SqlDataAdapter(CMD); da1.Fill(dt1); GridView41.DataSource = dt1; GridView41.DataBind(); }