Example #1
0
        protected void LoadInfo()
        {
            int         id = WS.RequestInt("id");
            TemplateVar tl = TemplateVarView.GetModelByID(id.ToS());

            txt_VarName.Text = tl.VarName;
            txt_Content.Text = tl.Content;
        }
Example #2
0
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            int         id = WS.RequestInt("id");
            TemplateVar tl = TemplateVarView.GetModelByID(id.ToS());

            tl.VarName = txt_VarName.Text;
            tl.Content = txt_Content.Text.Replace("'", "''");

            if (tl.ID > 0)
            {
                TemplateVarView.Update(tl);
            }
            else
            {
                tl.GroupID = 1;
                TemplateVarView.Insert(tl);
            }
            Js.AlertAndGoback("保存成功!");
        }
Example #3
0
        protected void btn_Del_Click(object sender, EventArgs e)
        {
            string ids = WS.RequestString("id");

            TemplateVarView.Del(string.Format("id in ({0})", ids));
        }
Example #4
0
 protected void BindList()
 {
     rp_list.DataSource = TemplateVarView.GetModelList();
     rp_list.DataBind();
 }