public DataSet UserDetailGrid(BEL.BEL objBELUserDetailGrid) { con.Open(); SqlCommand cmd = new SqlCommand("Usp_GridUserDetails", con); cmd.CommandType = CommandType.StoredProcedure; try { DataSet ds = new DataSet(); cmd.Parameters.AddWithValue("@UserName", objBELUserDetailGrid.UserNam); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); return ds; } catch (Exception ex) { throw ex; return null; } finally { cmd.Dispose(); con.Close(); con.Dispose(); } }
public DataSet UserGridDetail(BEL.BEL objUserDetails) { DAL.DAL UDGrid = new DAL.DAL(); DataSet ds = UDGrid.UserDetailGrid(objUserDetails); return ds; }
protected void BtnDetails_Submit_Click(object sender, EventArgs e) { Grd_Details.Visible = true; BL.BLL objgridviewdetail = new BL.BLL(); BEL.BEL objGUDBEL = new BEL.BEL(); objGUDBEL.UserNam = TxtDetails_UserName.Text; DataSet ds = objgridviewdetail.UserGridDetail(objGUDBEL); Grd_Details.DataSource = ds; Grd_Details.DataBind(); }
Grd_Details.DataSource = ds;
Grd_Details.DataSource = ds.Tables[0];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)