Posted on: 5/22/2013 4:35:13 PM | Views : 225

Hi,
I have a class where I get all the information of the user based on their username. I pass the usernmae to the store procedure and load all the objects from stored procedure. I use the id for that user in different pages of the report.
public override MembershipUser GetUser(string username, bool userIsOnline) { SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["test"].ConnectionString); SqlCommand cmd = new SqlCommand("getuser", conn); cmd.Parameters.AddWithValue("@Email", username); cmd.CommandType = CommandType.StoredProcedure; DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); if (dt == null || dt.Rows.Count == 0) return null; DataRow dr = dt.Rows[0]; int Id = int.Parse(dr["AddressBookId"].ToString( ...

Go to the complete details ...