示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminGroupBll.Power_Judge(6);
        if(!IsPostBack)
        {
            SkipPageUrl = Request.ServerVariables["HTTP_REFERER"].ToString();

            ModelBind();  //绑定模型列表
            lblInfo.Text = "创建标签";
            BindStyleCategory();
            if (Request.QueryString["labelCategoryId"]!=null)
            {
                lblInfo.Text = "修改标签";
                btnSave.Text = "修改标签";
                btnReset.Visible = false;
                M_LabelContent model = new M_LabelContent();
                B_LabelContent bll = new B_LabelContent();
                model = bll.GetLabelContentId(int.Parse(Request.QueryString["labelCategoryId"]));
                txtLabelName.Text = model.Name.Replace("{Ky_", "").Replace("}", "");
                lblContent.Value = model.Content;
                for (int i = 0; i < dllLbCategory.Items.Count;i++ )
                {
                    if (dllLbCategory.Items[i].Value==model.LbCategoryId.ToString())
                    {
                        dllLbCategory.Items[i].Selected = true;
                    }
                }
            }

        }
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminGroupBll.Power_Judge(10);
        AjaxPro.Utility.RegisterTypeForAjax(typeof(system_label_AnomalyContent));
        if(!IsPostBack)
        {
            SkipPageUrl = Request.ServerVariables["HTTP_REFERER"].ToString();

            ChannelBind();
            RepChannelBind(Chid);
            if (Request.QueryString["labelCategoryId"] != null)
            {
                btnSave.Text = "修改标签";
                btnReset.Visible = false;
                M_LabelContent model = new M_LabelContent();
                B_LabelContent bll = new B_LabelContent();
                model = bll.GetLabelContentId(int.Parse(Request.QueryString["labelCategoryId"]));
                txtName.Text = model.Name.Replace("{Ky_", "").Replace("}", "");
                txtContent.Value = model.AnomalyStyle;
            }
        }
    }