protected void BindChannel()
        {
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            string channelid = string.Empty;

            bll.GetDropList(this.w_d_Channel, channelid);
        }
        private void InitWebControl()
        {
            SOSOshop.BLL.SysParameter            sp  = new SOSOshop.BLL.SysParameter();
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            string channelid = ChangeHope.WebPage.PageRequest.GetQueryString("channelid");

            bll.GetDropList(this.ddlChannel, ""); if (channelid != "")
            {
                try { this.ddlChannel.SelectedValue = channelid; }catch {}
            }
            bll = null;
            this.txtArea.Attributes.Add("readonly", "readonly");
            this.txtArea.Attributes.Add("onclick", "selectFile('Area',new Array(" + this.txtAreaValue.ClientID + "," + this.txtArea.ClientID + "),310,450,'" + sp.DummyPaht + "');");
            ChangeHope.WebPage.WebControl.Validate(this.txtTitle, "资讯标题,2~50个字符", "isnull_2_50", "必填", "该项为必填");
            ChangeHope.WebPage.WebControl.Validate(this.txtSubTitle, "副标题,选填项目", "no", "", "");
            ChangeHope.WebPage.WebControl.Validate(this.txtKeyWord, "关键字,多个关键字用逗号(,)隔开,该关键字将会直接关联相关的其他内容", "isnull", "必填", "该项为必填");
            ChangeHope.WebPage.WebControl.Validate(this.txtCopyFrom, "如果该文章属于转载,则需要填写转载的地址", "no", "", "");
            ChangeHope.WebPage.WebControl.Validate(this.txtLinkUrl, "如果该文章是直接指向某个链接地址,则填写链接地址", "no", "", "");
            ChangeHope.WebPage.WebControl.Validate(this.txtAuthor, "如果有作者的信息,则需要填写作者信息", "no", "", "");
            ChangeHope.WebPage.WebControl.Validate(this.txtIntroduction, "简介内容,对于该篇文章的简介内容", "no", "", "");
            ChangeHope.WebPage.WebControl.Validate(this.txtArea, "该文章属于哪个分站的内容,不填写则不属于任何分站,只属于该主站内容", "no", "", "");
            this.Form.Attributes.Add("onsubmit", "return CheckForm();");

            if (!sp.IsCloseStation)
            {
                this.txtArea.Enabled = false;
            }
        }
        public void GetParentChannel(string channelid)
        {
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            StringBuilder text      = new StringBuilder();
            SortedList    hashtable = bll.GetChannel(channelid);

            foreach (DictionaryEntry de in hashtable)
            {
                text.Append(" → <a href='?q_chanelid=" + de.Key.ToString() + "'>" + de.Value.ToString() + "</a>");
            }
            hashtable.Clear();
            hashtable      = null;
            this.link.Text = text.ToString().Substring(2);
            bll            = null;
        }
Beispiel #4
0
        //private void GetFileList()
        //{
        //    SOSOshop.BLL.SysParameter sp = new SOSOshop.BLL.SysParameter();
        //    ChangeHope.Common.FileHelper file = new ChangeHope.Common.FileHelper();
        //    StringBuilder filelist = new StringBuilder();
        //    file.rootUrl = Server.MapPath("~/" + sp.DummyPaht + sp.WebSiteTemplatePath + "/banner");
        //    file.listFileName(file.rootUrl, 0);
        //    filelist.AppendLine("<script type=\"text/javascript\">");
        //    filelist.AppendLine("d = new dTree('d');");
        //    filelist.AppendLine("d.add(0,-1,'请选择栏目模版文件夹');");
        //    filelist.AppendLine(file.fileTree.ToString());
        //    filelist.AppendLine("document.write(d);");
        //    filelist.AppendLine("$(\"fileLists\").style.visibility=\"hidden\";");
        //    filelist.AppendLine("</script>");
        //    this.ltlFileList.Text = filelist.ToString();
        //    file = null;
        //}

        private void GetParentChannel(string channelid)
        {
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            StringBuilder text      = new StringBuilder();
            SortedList    hashtable = bll.GetChannel(channelid);

            foreach (DictionaryEntry de in hashtable)
            {
                text.Append("→" + de.Value.ToString());
            }
            hashtable.Clear();
            hashtable        = null;
            this.Label1.Text = text.ToString().Substring(1);
            bll = null;
        }
        public void GetParentChannel(string channelid)
        {
            YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
            StringBuilder text      = new StringBuilder();
            SortedList    hashtable = bll.GetChannel(channelid);

            text.AppendLine("<a href='article_edit.aspx?channelid=" + channelid + "'><font color='Blue'>添加资讯</font></a>");
            int index = 0;

            //获取父路径
            foreach (DictionaryEntry de in hashtable)
            {
                if (index == 0)
                {
                    text.AppendLine(" ◎ ");
                }
                else
                {
                    text.AppendLine(" → ");
                }
                text.AppendLine("<a href='?w_z_channel=" + de.Key.ToString() + "'>" + de.Value.ToString() + "</a>");
                index++;
            }
            hashtable.Clear();
            hashtable = null;

            //获取子路径
            hashtable = bll.GetChildChannel(channelid);

            index = 0;
            foreach (DictionaryEntry de in hashtable)
            {
                if (index == 0)
                {
                    text.AppendLine(" ◎ ");
                }
                else
                {
                    text.AppendLine(" ");
                }
                text.Append("<a href='?w_z_channel=" + de.Key.ToString() + "'><font color='#FF9900'>" + de.Value.ToString() + "</font></a>");
                index++;
            }
            hashtable.Clear();
            hashtable          = null;
            this.ltlLink.Text += text.ToString();
            bll = null;
        }
Beispiel #6
0
        private void Save()
        {
            YXShop.BLL.SystemInfo.ArticleChannel   bll   = new YXShop.BLL.SystemInfo.ArticleChannel();
            YXShop.Model.SystemInfo.ArticleChannel model = new YXShop.Model.SystemInfo.ArticleChannel();
            model.Description     = this.txtDescription.Text;
            model.Name            = this.txtName.Text;
            model.Shop            = this.txtShop.SelectedValue;
            model.Type            = this.ckbType.SelectedValue;
            model.ProjectName     = this.txtProjectName.Text;
            model.ProjectUtil     = this.txtProjectUtil.Text;
            model.Target          = this.ckbTarget.SelectedValue;
            model.ExternalLink    = this.txtAddress.Text.Trim().ToString();
            model.MeteKey         = this.txtMeteKey.Text;
            model.MeteDescription = this.txtMeteDescription.Text;
            model.DefaultTemplate = this.txtWebPagePath.Text;
            model.ListTemplate    = this.txtListPageTemplate.Text;
            model.ContentTemplate = this.txtContentPageTemplate.Text;
            model.Power           = "";
            foreach (ListItem item in this.ckbPower.Items)
            {
                if (item.Selected)
                {
                    model.Power = model.Power + item.Value + ",";
                }
            }

            if (this.txtId.Value.Equals(""))
            {
                this.txtId.Value = bll.GetMaxId(this.txtParentId.Value);
            }
            model.Id = txtId.Value;
            SOSOshop.Model.AdminInfo adminInfo = (SOSOshop.Model.AdminInfo)SOSOshop.BLL.AdministrorManager.Get();
            if (adminInfo != null)
            {
                model.Users = adminInfo.AdminName;
            }
            if (bll.Exists(model.Id))
            {
                bll.Update(model);
            }
            else
            {
                bll.Add(model);
            }

            model = null;
            bll   = null;
        }
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="id"></param>
 private void Del(string id)
 {
     YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
     if (bll.HasChild(Convert.ToInt32(id))) //判断旗下是否有子频道
     {
         Response.Write("haschild");
         return;
     }
     YXShop.BLL.SystemInfo.Article abll = new YXShop.BLL.SystemInfo.Article();
     if (abll.ExistByCid(Convert.ToInt32(id))) //判断该频道下是否有文章
     {
         Response.Write("hasarticel");
         return;
     }
     bll.Delete(id);
     Response.Write("ok");
 }
Beispiel #8
0
        private void GetModel()
        {
            string id = ChangeHope.WebPage.PageRequest.GetQueryString("id");

            YXShop.BLL.SystemInfo.ArticleChannel   bll   = new YXShop.BLL.SystemInfo.ArticleChannel();
            YXShop.Model.SystemInfo.ArticleChannel model = bll.GetModel(id);
            if (model != null)
            {
                this.txtDescription.Text   = model.Description;
                this.txtId.Value           = model.Id;
                this.txtName.Text          = model.Name;
                this.txtShop.SelectedValue = model.Shop;
                this.ckbType.SelectedValue = model.Type;
                if (model.Type == "2")
                {
                    Page.RegisterStartupScript("ggg", "<script>changetype(2);</script>");
                }
                this.txtProjectName.Text         = model.ProjectName;
                this.txtProjectUtil.Text         = model.ProjectUtil;
                this.ckbTarget.SelectedValue     = model.Target;
                this.txtAddress.Text             = model.ExternalLink;
                this.txtWebPagePath.Text         = model.DefaultTemplate;
                this.txtListPageTemplate.Text    = model.ListTemplate;
                this.txtContentPageTemplate.Text = model.ContentTemplate;
                //this.txtTemplate.Text = model.Template;
                this.txtMeteKey.Text             = model.MeteKey;
                this.txtMeteDescription.Text     = model.MeteDescription;
                this.txtWebPagePath.Text         = model.DefaultTemplate;
                this.txtListPageTemplate.Text    = model.ListTemplate;
                this.txtContentPageTemplate.Text = model.ContentTemplate;

                foreach (ListItem item in this.ckbPower.Items)
                {
                    if (model.Power.IndexOf(item.Value + ",") >= 0)
                    {
                        item.Selected = true;
                    }
                }
            }
            model = null;
            bll   = null;
        }
 private void GetList()
 {
     YXShop.BLL.SystemInfo.ArticleChannel bll = new YXShop.BLL.SystemInfo.ArticleChannel();
     this.lblView.Text = bll.GetList();
     bll = null;
 }