private void AddUserDateLog(int days, IList <UserInfo> userList, string reason, string memo) { foreach (UserInfo info in userList) { UserValidLogInfo userValidLogInfo = new UserValidLogInfo(); userValidLogInfo.Inputer = string.IsNullOrEmpty(this.m_FromUser) ? "System" : this.m_FromUser; userValidLogInfo.IP = this.m_FromUserIp; userValidLogInfo.UserName = info.UserName; userValidLogInfo.LogTime = DateTime.Now; userValidLogInfo.Memo = memo; userValidLogInfo.Remark = reason; if (days > 0) { userValidLogInfo.IncomePayout = 1; } else { userValidLogInfo.IncomePayout = 2; } if (days == -9999) { days = 0; } userValidLogInfo.ValidNum = days; UserValidLog.Add(userValidLogInfo); } }
private void SaveUserValid(decimal balance, int validNum, UserInfo userInfo) { UserValidLogInfo userValidLogInfo = new UserValidLogInfo(); userValidLogInfo.Inputer = PEContext.Current.Admin.AdminName; userValidLogInfo.IP = PEContext.Current.UserHostAddress; userValidLogInfo.UserName = userInfo.UserName; userValidLogInfo.LogTime = DateTime.Now; userValidLogInfo.Remark = string.Concat(new object[] { "消费", balance, "资金,有效期截至日期为", userInfo.EndTime.Value.ToString() }); userValidLogInfo.IncomePayout = 1; userValidLogInfo.ValidNum = validNum; UserValidLog.Add(userValidLogInfo); }
protected void Page_Load(object sender, EventArgs e) { int logId = BasePage.RequestInt32("LogID"); if (!this.Page.IsPostBack) { UserValidLogInfo validLogByIdAndUserName = UserValidLog.GetValidLogByIdAndUserName(logId); if (!validLogByIdAndUserName.IsNull) { this.LblLogTime.Text = validLogByIdAndUserName.LogTime.ToString(); this.LblIP.Text = validLogByIdAndUserName.IP; this.LblIncomePayOut.Text = validLogByIdAndUserName.ValidNum.ToString() + " 天"; this.LblRemark.Text = validLogByIdAndUserName.Remark; } else { DynamicPage.WriteErrMsg("<li>找不到对应记录!</li>"); } } }
protected void EgvUserValid_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { UserValidLogInfo dataItem = (UserValidLogInfo)e.Row.DataItem; if (dataItem != null) { HyperLink link = (HyperLink)e.Row.FindControl("HypUserName"); if (string.IsNullOrEmpty(this.m_AdminName)) { link.NavigateUrl = "~/User/Default.aspx?UserName="******"~/Admin/User/UserShow.aspx?UserName=" + dataItem.UserName; } link.Text = dataItem.UserName; } } }
public static bool Add(UserValidLogInfo userValidLogInfo) { return(dal.Add(userValidLogInfo)); }