Example #1
0
        protected void lnkLogout_Click(object sender, EventArgs e)
        {
            Cs_User cs_User = new Cs_User();

            cs_User.UserID = (int)Session["UserID"];
            cs_User.SetUserStatus(0);
            ChatME.BusinessLayer.Cs_CommonFunction.CleanUserSession();
            Response.Redirect("~/Default.aspx");
        }
Example #2
0
 protected void Session_End(object sender, EventArgs e)
 {
     if (Session["UserID"] != null)
     {
         Cs_User cs_User = new Cs_User();
         cs_User.UserID = (int)Session["UserID"];
         cs_User.SetUserStatus(0);
         ChatME.BusinessLayer.Cs_CommonFunction.CleanUserSession();
     }
 }
Example #3
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            Cs_User ObjCs_User = new Cs_User()
            {
                UserName = txtUser.Text.Trim(),
                Password = txtPassword.Text.Trim()
            };
            DataTable dt = ObjCs_User.LoginUser();

            if (dt.Rows.Count > 0)
            {
                ObjCs_User.FirstName = dt.Rows[0]["FirstName"].ToString();
                ObjCs_User.LastName  = dt.Rows[0]["LastName"].ToString();
                ObjCs_User.UserID    = Convert.ToInt32(dt.Rows[0]["UserID"]);
                ObjCs_User.Image     = Convert.ToString(dt.Rows[0]["Image"]);
                Cs_CommonFunction.SetUserSession(ObjCs_User);
                ObjCs_User.SetUserStatus(1);
                Response.Redirect("~/Index.aspx");
            }
            else
            {
            }
        }