/// <summary> /// 重写虚方法,此方法在Init事件执行 /// </summary> protected override void InitPage() { action = MXRequest.GetQueryString("action"); //获得最后登录日志 DataTable dt = new BLL.user_login_log().GetList(2, "user_name='" + userModel.user_name + "'", "id desc").Tables[0]; if (dt.Rows.Count == 2) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); pre_login_ip = dt.Rows[1]["login_ip"].ToString(); pre_login_time = dt.Rows[1]["login_time"].ToString(); } else if (dt.Rows.Count == 1) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); } //未完成订单 total_order = new BLL.orders().GetCount("user_name='" + userModel.user_name + "' and status<3"); //未读短信息 total_msg = new BLL.user_message().GetCount("accept_user_name='" + userModel.user_name + "' and is_read=0"); //退出登录========================================================== if (action == "exit") { //清险Session HttpContext.Current.Session[MXKeys.SESSION_USER_INFO] = null; //清除Cookies Utils.WriteCookie(MXKeys.COOKIE_USER_NAME_REMEMBER, "MxWeiXinPF", -43200); Utils.WriteCookie(MXKeys.COOKIE_USER_PWD_REMEMBER, "MxWeiXinPF", -43200); Utils.WriteCookie("UserName", "MxWeiXinPF", -1); Utils.WriteCookie("Password", "MxWeiXinPF", -1); //自动登录,跳转URL HttpContext.Current.Response.Redirect(linkurl("login")); } }
/// <summary> /// 重写虚方法,此方法在Init事件执行 /// </summary> protected override void InitPage() { action = DTRequest.GetQueryString("action"); //获得最后登录日志 DataTable dt = new BLL.user_login_log().GetList(2, "user_name='" + userModel.user_name + "'", "id desc").Tables[0]; if (dt.Rows.Count == 2) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); pre_login_ip = dt.Rows[1]["login_ip"].ToString(); pre_login_time = dt.Rows[1]["login_time"].ToString(); } else if (dt.Rows.Count == 1) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); } //未完成订单 total_order = new BLL.orders().GetCount("user_name='" + userModel.user_name + "' and status<3"); //未读短信息 total_msg = new BLL.user_message().GetCount("accept_user_name='" + userModel.user_name + "' and is_read=0"); //退出登录========================================================== if (action == "exit") { //通过Cookies获得SessionID string sessionID = Utils.GetCookie(DTKeys.COOKIE_USER_INFO_REMEMBER); //清空对应的缓存内容 CacheHelperRedis.Remove(sessionID); //清除Cookies Utils.WriteCookie(DTKeys.COOKIE_USER_INFO_REMEMBER, "", -43200); //自动登录,跳转URL HttpContext.Current.Response.Redirect(linkurl("login")); } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); txtPwd.Value = model.password; lblPwd.InnerText = "如果不修改密碼,請留空!"; chkVip.Checked = false; if (model.isVip == 1) { chkVip.Checked = true; } llbInTroduce.Text = model.dianming; #region 处理点数 20140924 txtSell.Value = model.isDonePoints.ToString(); txtHire.Value = model.isHirePoints.ToString(); txtAd.Value = model.isAd.ToString(); txtMac.Value = model.isMac.ToString(); txtSellHoursePoint.Text = model.isDonePoints.ToString(); txtHireHoursePoint.Text = model.isHirePoints.ToString(); txtHireAdPoint.Text = model.isAd.ToString(); txtHireMacPoint.Text = model.isMac.ToString(); ddlGroupId.SelectedValue = model.group_id.ToString(); rblIsLock.SelectedValue = model.is_lock.ToString(); #endregion txtUserName.Enabled = false; txtUserName.Text = model.user_name; hidUserName.Value = model.user_name; // txtPassword.Attributes["value"] = model.password; txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip; //查找最近登錄資訊 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); txtLinkUrl.Text = model.gongsi; txtNote.Text = model.note; txtContent.Value = model.jingli; txtSortId.Text = model.exp.ToString(); //txtPwd.Value = model.password; //lblPwd.InnerText = "如果不修改密碼,請留空!"; //chkVip.Checked = false; //if (model.isVip == 1) //{ // chkVip.Checked = true; //} //txtpoints.Value = model.exp.ToString(); ddlGroupId.SelectedValue = model.group_id.ToString(); //rblIsLock.SelectedValue = model.is_lock.ToString(); txtUserName.Text = model.user_name; hidUserName.Value = model.user_name; // txtPassword.Attributes["value"] = model.password; //txtEmail.Text = model.email; txtLogSpec.Text = model.nick_name; txtAvatar.Text = model.avatar; //rblSex.SelectedValue = model.sex; //if (model.birthday != null) //{ // txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); //} txtTelphone.Text = model.telphone; //txtMobile.Text = model.mobile; //txtQQ.Text = model.qq; txtAddress.Text = model.address; //txtAmount.Text = model.amount.ToString(); //txtPoint.Text = model.point.ToString(); //if (model.exp == 1) //{ // chkPoint.Checked = true; //} //else //{ // chkPoint.Checked = false; //} lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip; //查找最近登錄資訊 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); user_name = model.user_name; ddlGroupId.SelectedValue = model.group_id.ToString(); rblStatus.SelectedValue = model.status.ToString(); txtUserName.Text = model.user_name; txtUserName.ReadOnly = true; txtUserName.Attributes.Remove("ajaxurl"); if (!string.IsNullOrEmpty(model.password)) { txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword; } txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); txtCompany.Text = model.company.ToString(); txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip.ToString(); if (model.exp == 1) { cbExp.Checked = true; } try { guo = model.area.Split(',')[0].ToString(); area = model.area.Split(',')[1].ToString(); city = model.area.Split(',')[2].ToString(); zip = model.qq; } catch (Exception eee) {} //查找最近登錄資訊 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
/// <summary> /// 重写虚方法,此方法在Init事件执行 /// </summary> protected override void InitPage() { action = DTRequest.GetQueryString("action"); //获得最后登录日志 DataTable dt = new BLL.user_login_log().GetList(2, "user_name='" + userModel.user_name + "'", "id desc").Tables[0]; if (dt.Rows.Count == 2) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); pre_login_ip = dt.Rows[1]["login_ip"].ToString(); pre_login_time = dt.Rows[1]["login_time"].ToString(); } else if (dt.Rows.Count == 1) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); } //未完成订单 total_order = new BLL.orders().GetCount("user_name='" + userModel.user_name + "' and status<3"); //未读短信息 total_msg = new BLL.user_message().GetCount("accept_user_name='" + userModel.user_name + "' and is_read=0"); //退出登录========================================================== if (action == "exit") { //清险Session HttpContext.Current.Session[DTKeys.SESSION_USER_INFO] = null; //清除Cookies Utils.WriteCookie(DTKeys.COOKIE_USER_NAME_REMEMBER, "DTcms", -43200); Utils.WriteCookie(DTKeys.COOKIE_USER_PWD_REMEMBER, "DTcms", -43200); Utils.WriteCookie("UserName", "DTcms", -1); Utils.WriteCookie("Password", "DTcms", -1); //自动登录,跳转URL HttpContext.Current.Response.Redirect(linkurl("login")); } DTcms.Model.UserPay userPay = new DTcms.Model.UserPay(); if (!string.IsNullOrEmpty(DTcms.Common.Utils.GetCookie("inviter"))) { Model.users user = new BLL.users().GetModel(int.Parse(DTcms.Common.Utils.GetCookie("inviter"))); if (user != null) { userPay.inviter_id = user.id; InviterName = user.nick_name; } } userPay.add_time = DateTime.Now; userPay.amount = 988M; userPay.id = DateTime.Now.ToString("yyyyMMddHHmmssfff"); userPay.openid = ""; userPay.status = 0; new DTcms.BLL.UserPay().Add(userPay); }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); ddlGroupId.SelectedValue = model.group_id.ToString(); rblStatus.SelectedValue = model.status.ToString(); txtUserName.Text = model.user_name; txtUserName.ReadOnly = true; txtUserName.Attributes.Remove("ajaxurl"); if (!string.IsNullOrEmpty(model.password)) { txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword; } txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; if (!string.IsNullOrEmpty(model.avatar)) { ImgDiv.Visible = true; ImgUrl.ImageUrl = model.avatar; } rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtMsn.Text = model.msn; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip.ToString(); //查找最近登录信息 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
/// <summary> /// 重写虚方法,此方法在Init事件执行 /// </summary> protected override void InitPage() { action = DTRequest.GetQueryString("action"); page = DTRequest.GetQueryInt("page", 1); id = DTRequest.GetQueryInt("id"); ids = DTRequest.GetQueryInt("ids"); //获得最后登录日志 DataTable dt = new BLL.user_login_log().GetList(2, "user_name='" + userModel.user_name + "'", "id desc").Tables[0]; if (dt.Rows.Count == 2) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); pre_login_ip = dt.Rows[1]["login_ip"].ToString(); pre_login_time = dt.Rows[1]["login_time"].ToString(); } else if (dt.Rows.Count == 1) { curr_login_ip = dt.Rows[0]["login_ip"].ToString(); } //未完成订单 total_order = new BLL.orders().GetCount("user_name='" + userModel.user_name + "' and status<3"); //未读短信息 total_msg = new BLL.user_message().GetCount("accept_user_name='" + userModel.user_name + "' and is_read=0"); //退出登录========================================================== if (action == "exit") { //清险Session HttpContext.Current.Session[DTKeys.SESSION_USER_INFO] = null; //清除Cookies Utils.WriteCookie(DTKeys.COOKIE_USER_NAME_REMEMBER, "DTcms", -43200); Utils.WriteCookie(DTKeys.COOKIE_USER_PWD_REMEMBER, "DTcms", -43200); Utils.WriteCookie("UserName", "DTcms", -1); Utils.WriteCookie("Password", "DTcms", -1); //自动登录,跳转URL HttpContext.Current.Response.Redirect(linkurl("login")); } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); ddlGroupId.SelectedValue = model.group_id.ToString(); rblIsLock.SelectedValue = model.is_lock.ToString(); txtUserName.Enabled = false; txtUserName.Text = model.user_name; hidUserName.Value = model.user_name; txtPassword.Attributes["value"] = model.password; txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip.ToString(); //查找最近登录信息 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); ddlGroupId.SelectedValue = model.group_id.ToString(); rblStatus.SelectedValue = model.status.ToString(); txtUserName.Text = model.user_name; txtUserName.ReadOnly = true; txtUserName.Attributes.Remove("ajaxurl"); if (!string.IsNullOrEmpty(model.password)) { txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword; } txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } rb_user_type.SelectedValue = model.user_type.ToString(); txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip.ToString(); //查找最近登录信息 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } ddl_province.SelectedValue = model.province.ToString(); ddl_city.Items.Add(new ListItem("请选择市...", "0")); if (Convert.ToInt32(ddl_province.SelectedValue) > 0) { BLL.city bll_city = new BLL.city(); DataTable dt = bll_city.GetList("ProvinceID=" + ddl_province.SelectedValue).Tables[0]; foreach (DataRow dr in dt.Rows) { ddl_city.Items.Add(new ListItem(dr["CityName"].ToString(), dr["CityID"].ToString())); } ddl_city.SelectedValue = model.city.ToString(); } ddl_district.Items.Add(new ListItem("请选择区/县...", "0")); if (Convert.ToInt32(ddl_city.SelectedValue) > 0) { BLL.district bll_district = new BLL.district(); ddl_district.Items.Clear(); DataTable dt = bll_district.GetList("CityID=" + ddl_province.SelectedValue).Tables[0]; foreach (DataRow dr in dt.Rows) { ddl_district.Items.Add(new ListItem(dr["DistrictName"].ToString(), dr["DistrictID"].ToString())); } ddl_district.SelectedValue = model.district.ToString(); } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); ddlGroupId.SelectedValue = model.group_id.ToString(); rblStatus.SelectedValue = model.status.ToString(); txtUserName.Text = model.user_name; txtUserName.ReadOnly = true; txtUserName.Attributes.Remove("ajaxurl"); if (!string.IsNullOrEmpty(model.password)) { txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword; } txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtAddress.Text = model.address; txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip.ToString(); //查找最近登录信息 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } }
private void ShowInfo(int _id) { BLL.users bll = new BLL.users(); Model.users model = bll.GetModel(_id); ddlGroupId.SelectedValue = model.group_id.ToString(); rblStatus.SelectedValue = model.status.ToString(); txtUserName.Text = model.user_name; txtUserName.ReadOnly = true; txtUserName.Attributes.Remove("ajaxurl"); if (!string.IsNullOrEmpty(model.password)) { txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword; } txtEmail.Text = model.email; txtNickName.Text = model.nick_name; txtAvatar.Text = model.avatar; rblSex.SelectedValue = model.sex; if (model.birthday != null) { txtBirthday.Text = model.birthday.GetValueOrDefault().ToString("yyyy-M-d"); } txtTelphone.Text = model.telphone; txtMobile.Text = model.mobile; txtQQ.Text = model.qq; txtAddress.Text = model.area.Replace(",", "") + model.address; //txtAmount.Text = model.amount.ToString(); txtPoint.Text = model.point.ToString(); //txtExp.Text = model.exp.ToString(); lblRegTime.Text = model.reg_time.ToString(); lblRegIP.Text = model.reg_ip; txtIdCard.Text = model.id_card_number; txtRealName.Text = model.real_name; //查找最近登录信息 Model.user_login_log logModel = new BLL.user_login_log().GetLastModel(model.user_name); if (logModel != null) { lblLastTime.Text = logModel.login_time.ToString(); lblLastIP.Text = logModel.login_ip; } var wallet = context.li_wallets.FirstOrDefault(w => w.user_id == _id); if (wallet != null) { lblIdleMoney.Text = wallet.idle_money.ToString("c"); lblInvestingMoney.Text = wallet.investing_money.ToString("c"); lblLockedMoney.Text = wallet.locked_money.ToString("c"); lblProfitingMoney.Text = wallet.profiting_money.ToString("c"); lblTotalProfit.Text = wallet.total_profit.ToString("c"); lblTotalInvestment.Text = wallet.total_investment.ToString("c"); } // 加载会员部功能,被推荐人自动归组 var groupServer = context.li_user_group_servers.FirstOrDefault(s => s.serving_user == _id); ddlServingGroup.SelectedValue = groupServer == null ? "" : groupServer.group_id.ToString(); // 查询推荐人数 //lblTotalInvitee.Text = context.dt_users.Single(u => u.id == _id).li_invitations1.Count.ToString(); // 加载相册 rptIdCardPic.DataSource = context.li_albums.Where(a => a.the_user == model.id && a.type == (int)Agp2pEnums.AlbumTypeEnum.IdCard); rptIdCardPic.DataBind(); //会员组信息 IQueryable <dt_users> query = context.dt_users; query = query.Where(u => u.li_invitations.inviter == model.id); rptList.DataSource = query .OrderByDescending(u => u.reg_time) .ThenByDescending(u => u.id) .Skip(pageSize * (page - 1)) .Take(pageSize) .ToList(); rptList.DataBind(); // 读出借款人信息 var loanerInfo = context.li_loaners.SingleOrDefault(l => l.user_id == model.id); chkIsLoaner.Checked = loanerInfo != null; if (loanerInfo != null) { txtAge.Text = loanerInfo.age.ToString(); txtJob.Text = loanerInfo.job; txtWorkingAt.Text = loanerInfo.working_at; txtEducationalBackground.Text = loanerInfo.educational_background; rblMaritalStatus.SelectedValue = loanerInfo.marital_status.ToString(); txtIncome.Text = loanerInfo.income; txtCencus.Text = loanerInfo.native_place; txtWorkingUnit.Text = loanerInfo.working_company; var loanerCompany = loanerInfo.li_loaner_companies; chkBindCompany.Checked = loanerCompany != null; if (loanerCompany != null) { txtCompanyName.Text = loanerCompany.name; txtSetupTime.Text = loanerCompany.setup_time.ToString("yyyy-MM-dd"); txtRegisteredCapital.Text = loanerCompany.registered_capital; txtBusinessScope.Text = loanerCompany.business_scope; txtBusinessStatus.Text = loanerCompany.business_status; txtBusinessLawsuit.Text = loanerCompany.business_lawsuit; txtCompanyRemark.Text = loanerCompany.remark; txtManager.Text = loanerCompany.manager; txtBusinessBelong.Text = loanerCompany.business_belong; txtCaddress.Text = loanerCompany.address; txtBusinessLicenseNo.Text = loanerCompany.business_license_no; txtOrganizationNo.Text = loanerCompany.organization_no; } } //绑定页码 this.totalCount = query.Count(); txtPageNum.Text = pageSize.ToString(); var pageUrl = Utils.CombUrlTxt("user_edit.aspx", "page={0}&action={1}&id={2}", "__id__", "Pageinviter", _id.ToString()); PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8); }