private void BindGetStyle() { using (SqlConnection conn = new SqlConnection(DbSpecFo.x)) { SqlCommand cmd = new SqlCommand("select nStyleID,cStyleNo from SpecFo.dbo.Smt_StyleMaster ", conn); GetStyle.AppendDataBoundItems = true; conn.Open(); SqlDataReader rdr = cmd.ExecuteReader(); GetStyle.DataTextField = "cStyleNo"; GetStyle.DataValueField = "nStyleID"; GetStyle.DataSource = rdr; GetStyle.DataBind(); } }
private void BindGetStyle() { using (SqlConnection conn = new SqlConnection(DbConnect.x)) { SqlCommand cmd = new SqlCommand("select ord_id,ord_no from Order_Master ", conn); GetStyle.AppendDataBoundItems = true; conn.Open(); SqlDataReader rdr = cmd.ExecuteReader(); GetStyle.DataTextField = "ord_no"; GetStyle.DataValueField = "ord_id"; GetStyle.DataSource = rdr; GetStyle.DataBind(); } }