protected void Page_Load(object sender, EventArgs e) { int maNguoiDung1 = Convert.ToInt32(Request.QueryString["p1"]); int maNguoiDung2 = Convert.ToInt32(Request.QueryString["p2"]); if (!Page.IsPostBack) { try { user.Text = Session["MaNguoiDung"].ToString(); p1.Text = maNguoiDung1.ToString(); p2.Text = maNguoiDung2.ToString(); NguoiDung nd = new NguoiDung(); DataRow r = nd.ChiTietNguoiDung(maNguoiDung1); lblTenNguoiChat1.Text = (string)r["TaiKhoanNguoiDung"]; r = nd.ChiTietNguoiDung(maNguoiDung2); lblTenNguoiChat2.Text = (string)r["TaiKhoanNguoiDung"]; } catch (Exception) { } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["MaNguoiDung"] == null) { Response.Redirect("Default.aspx"); } if (!Page.IsPostBack) { NguoiDung tv = new NguoiDung(); tv.MaNguoiDung = Convert.ToInt32(Session["MaNguoiDung"]); DataRow dr = tv.ChiTietNguoiDung(); txtTen.Text = dr["TaiKhoanNguoiDung"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Quyen"] == null) { Response.Redirect("Default.aspx"); } else { if (Session["Quyen"].ToString() != "1") { Response.Redirect("Default.aspx"); } } string Id = Request.QueryString["Id"]; if (!Page.IsPostBack) { NguoiDung tv = new NguoiDung(); tv.MaNguoiDung = Convert.ToInt32(Id); DataRow dr = tv.ChiTietNguoiDung(); txtEmail.Text = dr["Email"].ToString(); txtTen.Text = dr["TaiKhoanNguoiDung"].ToString(); //if (dr["gioitinh"].ToString() == "1") //{ // radnam.checked = true; //} //else //{ // radnu.checked = false; //} foreach (ListItem lt in ddlQuyen.Items) { if (lt.Value == dr["Quyen"].ToString()) { lt.Selected = true; } } } }