ChannelManage.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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;

public partial class ChannelManage : System.Web.UI.Page
{
    private string[] keys ={ "id" };
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["userName"] != null && Request.QueryString["userPassword"] != null&&!IsPostBack)
        {
            WebHL.BLL.TBUserInformation validate = new WebHL.BLL.TBUserInformation();
            int selfId = 0;
            string result = validate.ValidateLoginNameAndPsw(Server.HtmlEncode(Request.QueryString["userName"]), Request.QueryString["userPassword"], ref selfId);
            if (result == "验证通过")
            {
                this.TBSelfId.Value = selfId.ToString().Trim();
                BindGV();
            }
            else
            {
                WebHL.MessageBox.Show(this.Page, result);
            }
        }
    }
    protected void BTAdd_Click(object sender, EventArgs e)
    {
        WebHL.Model.TBUserChannel model = new WebHL.Model.TBUserChannel();
        WebHL.BLL.TBUserChannel channel = new WebHL.BLL.TBUserChannel();
        model.BackGroudColor = this.colorhex.InnerText;
        model.BelongUserId = Convert.ToInt32(this.TBSelfId.Value.Trim());
        model.ChannelFrm = this.DDLChannelFrm.Value;
        model.ChannelName = this.TBChannelName.Value.Trim();
        model.CreateTime = DateTime.Now;
        model.Type = "UserDefine";
        channel.Add(model);
        BindGV();
    }
    private void BindGV()
    {
        WebHL.BLL.TBUserChannel channel = new WebHL.BLL.TBUserChannel();
        string strWhere = "BelongUserId="+this.TBSelfId.Value.Trim()+" and Type='UserDefine'";
        GVUserChannel.DataSource = channel.GetList(100, 1, strWhere);
        GVUserChannel.DataKeyNames = keys;
        GVUserChannel.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

    }
    protected void GVUserChannel_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int id =Convert.ToInt32(this.GVUserChannel.DataKeys[e.RowIndex].Value);
后面还有 19 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。