Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(Request.QueryString["SysCatID"]))
        {
            Common.MessageBox.Show(this, "缺少参数", Common.MessageBox.InfoType.warning, "history.back");
            return;
        }
        int sid = 0;

        if (!int.TryParse(Request.QueryString["SysCatID"], out sid))
        {
            Common.MessageBox.Show(this, "参数无效", Common.MessageBox.InfoType.warning, "history.back");
            return;
        }
        ToolBar1.AddBtn("返回", new EventHandler(Back));
        ToolBar1.AddBtn("刷新", new EventHandler(Reflesh));
        ToolBar1.AddBtn("删除", new EventHandler(Delete), "onclick", "return confirm('确认删除所选记录吗?');");
        ToolBar1.AddBtn("属性选项", new EventHandler(ProValue));
        ToolBar1.AddBtn("修改", new EventHandler(Edit));
        ToolBar1.AddBtn("添加", new EventHandler(Add));
        ToolBar1.AspNetPager.PageChanged += new EventHandler(AspNetPager_PageChanged);

        Button1.Click += new EventHandler(Button1_Click);
        if (IsPostBack)
        {
            return;
        }
        BindDate("SysCatID=" + Request.QueryString["SysCatID"]);
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ToolBar1.AddBtn("刷新", new EventHandler(Reflesh));
     ToolBar1.AddBtn("删除", new EventHandler(Delete), "onclick", "return confirm('确认删除所选记录吗?');");
     ToolBar1.AddBtn("属性", new EventHandler(Property));
     ToolBar1.AddBtn("修改", new EventHandler(Edit));
     ToolBar1.AddBtn("添加", new EventHandler(Add));
     ToolBar1.AspNetPager.PageChanged += new EventHandler(AspNetPager_PageChanged);
     ProCat1.BindEvent(new EventHandler(DropDownList1_SelectedIndexChanged), 1);
     ProCat1.BindEvent(new EventHandler(DropDownList2_SelectedIndexChanged), 2);
     Button1.Click += new EventHandler(Button1_Click);
     if (IsPostBack)
     {
         return;
     }
     BindDate("parentid=0");
     ProCat1.ShowLevel = 2;
 }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ToolBar1.AddBtn("刷新", new EventHandler(Reflesh));
        ToolBar1.AddBtn("删除", new EventHandler(Delete), "onclick", "return confirm('确认删除所选记录吗?');");


        ToolBar1.AddBtn("添加", new EventHandler(Add));

        if (IsPostBack)
        {
            return;
        }
        int pid = 0;

        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            pid = int.Parse(Request.QueryString["id"]);
        }
        ViewState["pid"] = pid;
        BindDate("parentid=@0", pid);
    }