Fetch the repository succeeded.
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);
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。