1 Star 3 Fork 0

Admin/MyWebSms

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
sendset.aspx.cs 2.08 KB
Copy Edit Raw Blame History
Ai鹿子 authored 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 sendset : WebPage
{
Users us = new Users();
public string t = "";
protected void Page_Load(object sender, EventArgs e)
{
this.VerifyPage();
try
{
t = Request.QueryString.Get("c");
security m = new security();
t = m.decryptquerystring(t);
}
catch
{
Response.Redirect("Error.aspx?msg=参数错误。");
}
if (CurrentUser.UserPID != -1)
{
Response.Redirect("Error.aspx?msg=无权限查看此页。");
Response.End();
}
if (!Page.IsPostBack)
{
us = us.Select(int.Parse(t));
this.txtUser.Value = us.UserName;
this.txtPet.Value = us.SendPet.ToString();
this.txtEndDate.Value = Convert.ToDateTime(us.EndDate).ToShortDateString();
this.txtinterface.SelectedValue = us.Interfaced.ToString();
}
}
protected void btnok_Click(object sender, EventArgs e)
{
string getValue = this.txtPet.Value.Trim();
string getInterface = this.txtinterface.SelectedValue;
string getEndDate = this.txtEndDate.Value.Trim();
if (getValue == "")
{
WebPage.ShowMsg("比例数不能为空!", this.Page);
}
else
{
Users us = new Users();
us.UserID = int.Parse(t);
us.SendPet = int.Parse(getValue);
us.EndDate = getEndDate;
us.Interfaced = int.Parse(getInterface);
if (us.UpdateSendPet(us))
{
WebPage.ShowMsgAndCloseSelf("属性设置成功!", this.Page);
}
else
{
WebPage.ShowMsg("属性设置失败!", this.Page);
}
}
}
}
马建仓 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

Search