Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var context = new UserDbDataContext())
            {
                if (Utils.LocalHost == null)
                {
                    Utils.LocalHost = "http://" + Request.Url.Host + ":" + Request.Url.Port;
                }

                //divMessageError.Visible = false;
                string text = Request.QueryString["Action"];
                if (text != null)
                {
                    switch (text.ToLower())
                    {
                    case "logout":
                        FormsAuthentication.SignOut();
                        return;

                    default:
                        break;
                    }
                }

                var username = HttpContext.Current.User.Identity.Name;
                DataAccess.Db.User.UserDb.tbUser user = UserInfo._GetByID(context, username);
                if (user != null)
                {
                    Response.Redirect("~/Default.aspx");
                }
            }
        }
 partial void DeletetbUser(tbUser instance);
 partial void UpdatetbUser(tbUser instance);
 partial void InserttbUser(tbUser instance);