コード例 #1
0
    private void delPage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1 && ManageId != 26 && ManageId != 9)
        {
            Utils.Error("只有系统管理员1号、9号、26号才可以进行此操作", "");
        }
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info == "")
        {
            int ID = int.Parse(Utils.GetRequest("ID", "all", 2, @"^[1-9]\d*$", "ID错误"));
            if (new BCW.BLL.User().Exists(ID))
            {
                DataSet ds = new BCW.BLL.User().GetList("IsSpier", "ID=" + ID + "");
                if (int.Parse(ds.Tables[0].Rows[0]["IsSpier"].ToString()) == 0)
                {
                    Utils.Error("该ID已不是系统号,不用重复操作.", "");
                }
                else
                {
                    Master.Title = "删除该ID为系统号吗";
                    builder.Append(Out.Tab("<div class=\"title\">", ""));
                    builder.Append("删除该ID为系统号吗");
                    builder.Append(Out.Tab("</div>", "<br />"));
                    builder.Append(Out.Tab("<div>", ""));
                    builder.Append("<a href=\"" + Utils.getUrl("robotset.aspx?info=ok&amp;act=del&amp;id=" + ID + "") + "\">确定删除</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("robotset.aspx?act=select&amp;id=" + ID + "") + "\">先留着吧..</a>");
                    builder.Append(Out.Tab("</div>", "<br />"));
                }
            }
            else
            {
                Utils.Error("不存在的会员.操作失败.", "");
            }
        }
        else
        {
            int ID = int.Parse(Utils.GetRequest("ID", "get", 2, @"^[1-9]\d*$", "ID错误"));
            new BCW.BLL.User().update_ziduan("IsSpier=0", "ID=" + ID + "");
            BCW.Model.xitonghao aa = new BCW.Model.xitonghao();
            aa.UsID    = ManageId;
            aa.caoID   = ID;
            aa.AddTime = DateTime.Now;
            aa.IP      = Utils.GetUsIP();
            aa.type    = 1;
            new BCW.BLL.xitonghao().Add(aa);
            Utils.Success("删除", "删除系统号成功..", Utils.getPage("robotset.aspx?act=select&amp;ID=" + ID + ""), "1");
        }
    }
コード例 #2
0
    private void addPage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1 && ManageId != 26 && ManageId != 9)
        {
            Utils.Error("只有系统管理员1号、9号、26号才可以进行此操作", "");
        }

        int ID = Utils.ParseInt(Utils.GetRequest("ID", "all", 2, @"^[1-9]\d*$", "输入用户ID无效"));

        if (new BCW.BLL.User().Exists(ID))
        {
            DataSet ds = new BCW.BLL.User().GetList("IsSpier", "ID=" + ID + "");
            if (int.Parse(ds.Tables[0].Rows[0]["IsSpier"].ToString()) == 0)
            {
                new BCW.BLL.User().update_ziduan("IsSpier=1", "ID=" + ID + "");
                BCW.Model.xitonghao aa = new BCW.Model.xitonghao();
                aa.UsID    = ManageId;
                aa.caoID   = ID;
                aa.AddTime = DateTime.Now;
                aa.IP      = Utils.GetUsIP();
                aa.type    = 0;
                new BCW.BLL.xitonghao().Add(aa);
                Utils.Success("设置", "设置成功,正在返回.....", Utils.getUrl("robotset.aspx"), "1");
            }
            else
            {
                Utils.Success("设置", "该ID已为系统号,不用重复设置,正在返回.....", Utils.getUrl("robotset.aspx"), "2");
            }
        }
        else
        {
            Utils.Error("不存在的会员.添加失败.", "");
        }
    }
コード例 #3
0
ファイル: xitonghao.cs プロジェクト: radtek/GitKB288
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(BCW.Model.xitonghao model)
 {
     dal.Update(model);
 }
コード例 #4
0
ファイル: xitonghao.cs プロジェクト: radtek/GitKB288
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(BCW.Model.xitonghao model)
 {
     return(dal.Add(model));
 }