Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            id = 0;
            gnum(ref id, "id");
            if (!IsPostBack&&id>0)
            {
                Auto_pageDal au = new Auto_pageDal();
                Auto_pageInfo info = au.view(id);
                page_name.Text = info.page_name;
                setting.Value = info.setting;
                content.Value = info.content;
            }
            string app = gform("app");
            if (app == "add" && IsPostBack)
            {
                Auto_pageDal au = new Auto_pageDal();
                Auto_pageInfo info = new Auto_pageInfo();
                info.page_name = page_name.Text;
                info.setting = setting.Value;
                info.content = content.Value;

                au.add(info);
                showMessage("保存成功");
            }
        }
Esempio n. 2
0
        protected void btn_Click(object sender, EventArgs e)
        {
            Auto_pageDal au = new Auto_pageDal();
            Auto_pageInfo info = new Auto_pageInfo();
            info.page_name = page_name.Text;
            info.setting = setting.Value;
            info.content = content.Value;

            au.edit(info, id.ToString());
            showMessage("保存成功");
        }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string app = gform("app");
     Auto_pageDal au = new Auto_pageDal();
     if (app == "drop")
     {
         int id = 0;
         gnum(ref id,"id");
         au.drop(id);
         showMessage("删除成功");
     }
     
     list.DataSource = au.read();
     list.DataBind();
 }
Esempio n. 4
0
 public Auto_pageBll(int id,string type)
 {
     Auto_pageDal ap = new Auto_pageDal();
     j_info = ap.view(id);
     j_type = type;
 }