/// <summary> /// 获取用户积分 /// </summary> /// <returns>用户积分</returns> public static int GetUserIntegral() { WebSite.BLL.Bll_User BUser = new WebSite.BLL.Bll_User(); WebSite.Model.Mod_User MUser = BUser.GetModel(UserRoot.GetUserID); if (MUser != null) { return(MUser.Integral); } else { return(0); } }
private void Bind() { WebSite.Model.Mod_User dto = new WebSite.Model.Mod_User(); if (id != 0) { dto = BUser.GetModel(id); if (dto != null && dto.WebSiteID == AdminManage.WebSiteID) { //基本资料 txtUserName.Text = dto.UserName; rblState.SelectedValue = dto.State.ToString(); txtPassword.Attributes.Add("value", "0|0|0|0"); txtRePassword.Attributes.Add("value", "0|0|0|0"); txtRealName.Text = dto.RealName; rblSex.SelectedValue = dto.Sex.ToString(); txtBirthDate.Value = dto.BirthDate; txtMobile.Text = dto.Mobile; txtEmail.Text = dto.Email; //账户信息 txtConsumptionMoney.Text = dto.ConsumptionMoney.ToString(); txtIntegral.Text = dto.Integral.ToString(); txtRegisterDate.Text = dto.RegisterDate.ToString(); txtRegisterIP.Text = dto.RegisterIP; if (dto.NewLoginDate > DateTime.Parse("2000-01-01 01:01:01")) { txtNewLoginDate.Text = dto.NewLoginDate.ToString(); } txtNewLoginIP.Text = dto.NewLoginIP; txtUserName.ReadOnly = true; txtUserName.Enabled = true; return; } } //MessageBox.ShowRedirect(this, "信息已删除或不存在!", "Column/User/List.aspx?" + StringHelper.DelUrlParameter("ID")); }
public static void SetLoginLog(int uid, int websiteid) { WebSite.BLL.Bll_User BUser = new WebSite.BLL.Bll_User(); WebSite.Model.Mod_User MUser = BUser.GetModel(uid); if (MUser != null) { //操作最近登录 MUser.LoginIP = MUser.NewLoginIP; MUser.LoginDate = MUser.NewLoginDate; MUser.NewLoginIP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; MUser.NewLoginDate = DateTime.Now; BUser.Update(MUser); //记录用户日志 } }