Exemplo n.º 1
0
 public OperationResult<int> Create(Webuser info)
 {
     // ArgumentHelper.AssertNotNullOrEmpty(info.webuserName);
     var r = new OperationResult<int>();
     r.Data = webuserDal.Create(info);
     r.ActionResult = (r.Data > 0) ? true : false;
     return r;
 }
Exemplo n.º 2
0
 public static void SetCookie(Webuser Webuser)
 {
     HttpCookie cookie = new HttpCookie(DefineTable.LoginCookieName);
     cookie.Expires = DateTime.Now.AddDays(1);
     cookie.HttpOnly = true;
     cookie.Value = HttpUtility.UrlEncode(Webuser.UserId.ToString() + "&" + System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Webuser.UserId.ToString(), "MD5"));
     HttpContext.Current.Response.SetCookie(cookie);
 }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["UserSession"] != null)
                {
                    _user = (Webuser)Session["UserSession"];

                }
            }
        }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserSession"] != null)
         {
             _user = (Webuser)Session["UserSession"];
             if (_user != null)
             {
                 var ruser = WebUserProvider.Instance.GetDetail(_user.UserId);
                 if (ruser.ActionResult)
                 {
                     _user = ruser.Data;
                 }
             }
         }
     }
 }
Exemplo n.º 5
0
 public ActionMsg Modify(Webuser info)
 {
     // ArgumentHelper.AssertNotNullOrEmpty(info.infoName);
     var r = new ActionMsg();
     r.ActionResult = webuserDal.Modify(info);
     return r;
 }