Пример #1
0
        private bool DoEdit(string _urlName)
        {
            BLL.url_rewrite   bll   = new BLL.url_rewrite();
            Model.url_rewrite model = bll.GetInfo(_urlName);

            model.type    = ddlType.SelectedValue;
            model.channel = ddlChannel.SelectedValue;
            model.page    = txtPage.Text.Trim();
            model.inherit = txtInherit.Text.Trim();
            model.templet = txtTemplet.Text.Trim();
            //添加URL重写节点
            List <Model.url_rewrite_item> items = new List <Model.url_rewrite_item>();

            string[] itemPathArr        = Request.Form.GetValues("itemPath");
            string[] itemPatternArr     = Request.Form.GetValues("itemPattern");
            string[] itemQuerystringArr = Request.Form.GetValues("itemQuerystring");
            if (itemPathArr != null && itemPatternArr != null && itemQuerystringArr != null)
            {
                for (int i = 0; i < itemPathArr.Length; i++)
                {
                    items.Add(new Model.url_rewrite_item {
                        path = itemPathArr[i], pattern = itemPatternArr[i], querystring = itemQuerystringArr[i]
                    });
                }
            }
            model.url_rewrite_items = items;

            if (bll.Edit(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改URL配置信息:" + model.name); //记录日志
                return(true);
            }
            return(false);
        }
Пример #2
0
 private bool DoEdit(string _urlName)
 {
     BLL.url_rewrite   bll   = new BLL.url_rewrite();
     Model.url_rewrite model = bll.GetInfo(_urlName);
     model.name        = txtName.Text.Trim();
     model.path        = txtPath.Text.Trim();
     model.pattern     = txtPattern.Text.Trim();
     model.page        = txtPage.Text.Trim();
     model.querystring = txtQueryString.Text.Trim();
     model.templet     = txtTemplet.Text.Trim();
     model.channel     = txtChannel.Text.Trim();
     model.type        = ddlType.SelectedValue;
     model.inherit     = txtInherit.Text.Trim();
     return(bll.Edit(model));
 }
Пример #3
0
        private bool DoEdit(string _urlName)
        {
            BLL.url_rewrite bll = new BLL.url_rewrite();
            Model.url_rewrite model = bll.GetInfo(_urlName);

            model.type = ddlType.SelectedValue;
            model.channel = ddlChannel.SelectedValue;
            model.page = txtPage.Text.Trim();
            model.inherit = txtInherit.Text.Trim();
            model.templet = txtTemplet.Text.Trim();
            //添加URL重写节点
            List<Model.url_rewrite_item> items = new List<Model.url_rewrite_item>();
            string[] itemPathArr = Request.Form.GetValues("itemPath");
            string[] itemPatternArr = Request.Form.GetValues("itemPattern");
            string[] itemQuerystringArr = Request.Form.GetValues("itemQuerystring");
            if (itemPathArr != null && itemPatternArr != null && itemQuerystringArr != null)
            {
                for (int i = 0; i < itemPathArr.Length; i++)
                {
                    items.Add(new Model.url_rewrite_item { path = itemPathArr[i], pattern = itemPatternArr[i], querystring = itemQuerystringArr[i] });
                }
            }
            model.url_rewrite_items = items;

            if (bll.Edit(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改URL配置信息:" + model.name); //记录日志
                return true;
            }
            return false;
        }
Пример #4
0
 private bool DoEdit(string _urlName)
 {
     BLL.url_rewrite bll = new BLL.url_rewrite();
     Model.url_rewrite model = bll.GetInfo(_urlName);
     model.name = txtName.Text.Trim();
     model.path = txtPath.Text.Trim();
     model.pattern = txtPattern.Text.Trim();
     model.page = txtPage.Text.Trim();
     model.querystring = txtQueryString.Text.Trim();
     model.templet = txtTemplet.Text.Trim();
     model.channel = txtChannel.Text.Trim();
     model.type = ddlType.SelectedValue;
     model.inherit = txtInherit.Text.Trim();
     return bll.Edit(model);
 }