Exemple #1
0
    protected void BtnSentMessage_Click(object sender, EventArgs e)
    {
        Establishment es = (Establishment)Session["establishment"];
        Chat          c  = new Chat(tbxMessage.Text, es.ID, System.DateTime.Now, "allow");

        ChatDB.insertChat(c);
        tbxMessage.Text = "";
        Server.Transfer("EstForum.aspx");
    }
    protected void BtnSentMessage_Click(object sender, EventArgs e)
    {
        Users s = UsersDB.getUserbyEmail(Session["email"].ToString());
        Chat  c = new Chat(tbxMessage.Text, s.UserId, System.DateTime.Now, "allow");

        ChatDB.insertChat(c);
        tbxMessage.Text = "";
        Server.Transfer("Dashboard.aspx");
    }