1 Star 3 Fork 0

Admin/MyWebSms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
useredit.aspx.cs 3.52 KB
一键复制 编辑 原始数据 按行查看 历史
Ai鹿子 提交于 2022-04-24 10:09 . 01
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();
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/huanghe_1_0/my-web-sms.git
git@gitee.com:huanghe_1_0/my-web-sms.git
huanghe_1_0
my-web-sms
MyWebSms
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385