示例#1
0
        protected void BtnOk_Click(object sender, EventArgs e)
        {
            Business.menulevel2     menulevel2     = new Business.menulevel2();
            Business.menulevel2Data menulevel2data = new Business.menulevel2Data();

            menulevel2data.level1id = level1id.Text;
            menulevel2data.menutype = menutype.Text;
            menulevel2data.menuname = menuname.Text;
            menulevel2data.menuurl  = menuurl.Text;
            menulevel2data.nums     = nums.Text;


            if (Request.QueryString["id"] != null)
            {
                menulevel2data.Id = Request.QueryString["id"];
                menulevel2.Modify(menulevel2data);
            }
            else
            {
                menulevel2.Insert(menulevel2data);
            }

            Response.Redirect("menulevel2tb.aspx");

            menulevel2     = null;
            menulevel2data = null;
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["level1id"] != null)
                {
                    level1id.Text = Request.QueryString["level1id"];
                }
                if (Request.QueryString["id"] != null)
                {
                    Business.menulevel2       menulevel2     = new Business.menulevel2();
                    Business.menulevel2Data[] menulevel2data = menulevel2.Select(Request.QueryString["id"]);

                    level1id.Text = menulevel2data[0].level1id;
                    menutype.Text = menulevel2data[0].menutype;
                    menuname.Text = menulevel2data[0].menuname;
                    menuurl.Text  = menulevel2data[0].menuurl;
                    nums.Text     = menulevel2data[0].nums;


                    menulevel2     = null;
                    menulevel2data = null;
                }
            }
        }
示例#3
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string Id = e.CommandName;

            Business.menulevel2 menulevel2 = new Business.menulevel2();
            menulevel2.Delete(Id);
            Repeater1.DataSource = menulevel2.Get("");
            Repeater1.DataBind();
            menulevel2 = null;
        }
示例#4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Business.menulevel2 menulevel2 = new Business.menulevel2();
         Repeater1.DataSource = menulevel2.Get("");
         Repeater1.DataBind();
         menulevel2 = null;
     }
 }