Example #1
0
    private void DoAddNew(Control button)
    {
        Control _temp        = button.NamingContainer;
        string  config_id    = (_temp.FindControl("textbox_config_id") as TextBox).Text.Trim();
        string  config_value = (_temp.FindControl("textbox_config_value") as TextBox).Text.Trim();

        if (string.IsNullOrEmpty(config_id))
        {
            this.AjaxAlert(this.UpdatePanel1, "please input config id.");
            return;
        }

        if (string.IsNullOrEmpty(config_value))
        {
            ScriptHelper.AjaxAlert(this.UpdatePanel1, "please input config value");
            return;
        }


        SysConfig entity = new SysConfig();

        entity.ConfigId    = config_id;
        entity.ConfigValue = config_value;


        SysConfigBiz.Insert(entity);

        this.LoadData();
    }
Example #2
0
    private void DoUpdate(Control button)
    {
        Control _temp        = button.NamingContainer;
        string  config_id    = (_temp.FindControl("hidden_config_id") as HtmlInputHidden).Value;
        string  config_value = (_temp.FindControl("textbox_config_value") as TextBox).Text;

        if (string.IsNullOrEmpty(config_value))
        {
            ScriptHelper.AjaxAlert(this.UpdatePanel1, "please input config value");
            return;
        }

        SysConfig entity = new SysConfig();

        entity.ConfigId    = config_id;
        entity.ConfigValue = config_value;


        SysConfigBiz.Update(entity);

        this.LoadData();

        this.GridView1.EditIndex = -1;
        this.GridView1.DataBind();
    }
Example #3
0
    private void DoDelete(Control button)
    {
        Control _temp = button.NamingContainer;

        string config_id = (_temp.FindControl("hidden_config_id") as HtmlInputHidden).Value;

        // this.Response.Write("<p>" + config_id + "</p>");

        SysConfig entity = new SysConfig(config_id);

        SysConfigBiz.Delete(entity);

        this.LoadData();
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string colid = Parameters["ColId"];
        //读取网站参数
        SysConfigBiz biz = new SysConfigBiz();
        gssitename = biz.GetKeyValue("SiteName", "SITE");
        string stylename = biz.GetKeyValue("SiteStyle", "SITE");
        gssitestyle = "css/" + stylename + "/style.css";
        gsheadertemplatepath = "template/" + stylename + "/header.ascx";

        //读取当前页站点描述和关键词
        if (!string.IsNullOrEmpty(colid))
        {

        }
        if (string.IsNullOrEmpty(gssitedesc))
        {
            gssitedesc = "\"" + biz.GetKeyValue("SiteDesc", "SITE") + "\"";
        }
        if (string.IsNullOrEmpty(gssitekey))
        {
            gssitekey = "\"" + biz.GetKeyValue("SiteKey", "SITE") + "\"";
        }
    }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     gsmenu = GetMenu();
     SysConfigBiz biz = new SysConfigBiz();
     gslogourl = biz.GetKeyValue("WebLogo", "SITE");
 }
Example #6
0
 private void LoadData()
 {
     this.GridView1.DataSource = SysConfigBiz.GetAllConfig();
     this.GridView1.DataBind();
 }