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; }
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); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["UserSession"] != null) { _user = (Webuser)Session["UserSession"]; } } }
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; } } } } }
public ActionMsg Modify(Webuser info) { // ArgumentHelper.AssertNotNullOrEmpty(info.infoName); var r = new ActionMsg(); r.ActionResult = webuserDal.Modify(info); return r; }