Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["p1"] == null)
        {
            string          id = Request.QueryString["Id"];
            ThanhVien_ChuDe tv = new ThanhVien_ChuDe();
            tv.MaChuDe = Convert.ToInt32(id);

            rptList.DataSource = tv.DanhSach();
            rptList.DataBind();
        }
        else
        {
            try
            {
                int        maNguoiDung1 = Convert.ToInt32(Request.QueryString["p1"]);
                int        maNguoiDung2 = Convert.ToInt32(Request.QueryString["p2"]);
                ChatCaNhan chatCaNhan   = new ChatCaNhan(maNguoiDung1, maNguoiDung2);
                DataTable  listChat     = chatCaNhan.GetData();
                rptList.DataSource = listChat;
                rptList.DataBind();
            }
            catch (Exception)
            {
            }
        }
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string p1      = Request.QueryString["p1"];
        string p2      = Request.QueryString["p2"];
        string user    = Request.QueryString["user"];
        string message = Request.QueryString["message"];

        if (message.Trim() != "")
        {
            ChatCaNhan chatCaNhan = new ChatCaNhan();
            chatCaNhan.InsertData(p1, p2, message, user);
        }
    }