代码拉取完成,页面将自动刷新
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using dal.tooldal;
public partial class useredit : WebPage
{
Users us = new Users();
protected void Page_Load(object sender, EventArgs e)
{
this.VerifyPage();
int userinterid = CurrentUser.interid;
int userpid = CurrentUser.UserPID;
string t = "";
try
{
t = Request.QueryString.Get("u");
security m = new security();
t = m.decryptquerystring(t);
this.hiddenid.Value = t;
this.tmp.Value = Request.QueryString.Get("u");
}
catch
{
Response.Redirect("Error.aspx?msg=参数错误");
}
if (!Page.IsPostBack)
{
inters inter = new inters();
DataTable ds = new DataTable();
if (userpid == -1)
{
ds = inter.SelectAll();
interid.DataSource = ds;
interid.DataTextField = "inter_name";
interid.DataValueField = "inter_id";
interid.DataBind();
}
else
{
this.tmdinter.Visible = false;
}
}
string CurUserType = CurrentUser.UserType.ToString();
string CurUserPID = CurrentUser.UserPID.ToString();
string CurUserID = CurrentUser.UserID.ToString();
string t_UserPID = us.Select(int.Parse(t)).UserPID.ToString();
if (CurUserType == "0")
{
if (CurUserID != t)
{
Response.Redirect("myinfo.aspx");
}
else
{
BandData(t);
}
}
else
{
if (t_UserPID == CurUserID)
{
BandData(t);
}
else if (CurUserPID == "-1")
{
BandData(t);
}
else
{
Response.Redirect("myinfo.aspx");
}
}
}
private void BandData(string _uid)
{
Users myus = new Users();
myus = myus.Select(int.Parse(_uid));
this.UserName.Value = myus.UserName;
this.UserPwd.Value = HBS.Common.Encryption.Decrypt(myus.UserPwd);
this.TrueName.Value = myus.TrueName;
this.SubName.Value = myus.SubName;
this.Mobile.Value = myus.Mobile;
this.UserQQ.Value = myus.UserQQ;
this.Email.Value = myus.Email;
this.Address.Value = myus.Address;
this.PerPrice.Value = myus.PerPrice;
this.CountPrice.Value = myus.CountPrice;
this.PayType.Items.FindByValue(myus.PayType).Selected = true;
this.UserType.Items.FindByValue(myus.UserType.ToString()).Selected = true;
this.UserCall.Items.FindByValue(myus.UserCall.ToString()).Selected = true;
this.UserReport.Items.FindByValue(myus.UserReport.ToString()).Selected = true;
this.UserDownload.Items.FindByValue(myus.UserDownload.ToString()).Selected = true;
this.UserPower.Items.FindByValue(myus.UserPower.ToString()).Selected = true;
int userpid = CurrentUser.UserPID;
if (userpid == -1)
{
this.interid.Items.FindByValue(myus.interid.ToString()).Selected = true;
}
this.inters.Value = myus.interid.ToString();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。