Esempio n. 1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Cms.Model.C_Column_field model)
 {
     return(dal.Update(model));
 }
Esempio n. 2
0
    public void DataBind(int classId)
    {
        Cms.BLL.C_Column   bllcolumn = new Cms.BLL.C_Column();
        Cms.Model.C_Column model     = bllcolumn.GetModel(classId);
        DataSet            ds        = bllcolumn.GetList("classId=" + classId + "");

        if (ds.Tables[0].Rows.Count > 0)
        {
            DataRow dr = ds.Tables[0].Rows[0];
            this.parentId.SelectedValue = model.parentId.ToString();    //上级栏目ID
            this.modelId.SelectedValue  = model.modelId.ToString();     //栏目模型ID
            this.className.Text         = model.className.ToString();   //栏目名称
            this.sub_title.Text         = model.sub_title.ToString();   //副名称
            this.engName.Text           = model.engName.ToString();     //栏目英文名称
            this.orderNumber.Text       = model.orderNumber.ToString(); //栏目排序
            this.photoUrl.Value         = model.photoUrl.ToString();    //栏目缩略图
            this.photoUrlone.Value      = model.photoUrlone.ToString(); //栏目图标True
            this.photoUrltwo.Value      = model.photoUrltwo.ToString(); //栏目图标False


            string ShowChannel = model.isShowChannel.ToString();
            if (ShowChannel == "0")
            {
                isShowChannel.Checked = false;//是否参与导航 0是参与导航
            }
            else
            {
                isShowChannel.Checked = true;//是否参与导航 1是不参与导航
            }
            string ShowNext = model.isShowNext.ToString();
            if (ShowNext == "0")
            {
                isShowNext.Checked = false;//是否显示子栏目 0是显示
            }
            else
            {
                isShowNext.Checked       = true;//是否显示子栏目 1是隐藏
                best_tab_item.Visible    = true;
                best_tab_content.Visible = true;
            }
            string Blank = model.isBlank.ToString();
            if (Blank == "0")
            {
                isBlank.Checked = false;//是否打开新窗口 0是不打开新窗口
            }
            else
            {
                isBlank.Checked = true;//是否打开新窗口 1是打开新窗口
            }
            string Hidden = model.isHidden.ToString();
            if (Hidden == "0")
            {
                isHidden.Checked = false;//是否隐藏 0是显示
            }
            else
            {
                isHidden.Checked = true;                       //是否隐藏 1是隐藏
            }
            this.linkUrl.Text      = model.linkUrl.ToString(); //外链地址
            this.tplChannel.Text   = model.tplChannel.ToString();
            this.tplContent.Text   = model.tplContent.ToString();
            this.listinfopath.Text = model.listinfopath.ToString();     //后台列表信息地址
            this.txtCallIndex.Text = model.name.ToString();             //调用别名
            this.columnchose.Text  = model.related.ToString();          //关联栏目

            this.intro.Text          = model.intro.ToString();          //栏目简介
            this.content.Value       = model.content.ToString();        //栏目内容
            this.seoTitle.Text       = model.seoTitle.ToString();       //SEO标题
            this.seoKeyword.Text     = model.seoKeyword.ToString();     //SEO关键字
            this.seoDescription.Text = model.seoDescription.ToString(); //SEO描述

            string wisShowChannel = model.w_isShowChannel.ToString();   //是否参与手机导航 0是参与导航
            if (wisShowChannel == "0")
            {
                w_isShowChannel.Checked = false;//是否参与手机导航 1是不参与导航
            }
            else
            {
                w_isShowChannel.Checked = true;//是否参与导航 1是不参与导航
                wap_tab_item.Visible    = true;
                wap_tab_content.Visible = true;
            }
            this.w_linkUrl.Text = model.w_linkUrl.ToString();         //手机链接地址

            this.w_intro.Text    = model.w_intro.ToString();          //手机站简介
            this.w_content.Value = model.w_content.ToString();        //手机站内容

            string eisShowChannel = model.e_isShowChannel.ToString(); //是否参与英文导航 0是参与导航
            if (eisShowChannel == "0")
            {
                e_isShowChannel.Checked = false;//是否参与英文导航 1是不参与导航
            }
            else
            {
                e_isShowChannel.Checked     = true;//是否参与英文导航 1是不参与导航
                english_tab_item.Visible    = true;
                english_tab_content.Visible = true;
            }
            this.e_linkUrl.Text = model.e_linkUrl.ToString();               //手英文链接地址

            this.e_intro.Text          = model.e_intro.ToString();          //英文站简介
            this.e_content.Value       = model.e_content.ToString();        //英文站内容
            this.e_seoTitle.Text       = model.e_seoTitle.ToString();       //英文站SEO标题
            this.e_seoKeyword.Text     = model.e_seoKeyword.ToString();     //英文站SEO关键字
            this.e_seoDescription.Text = model.e_seoDescription.ToString(); //英文站SEO描述



            if (model.is_albums == 1)
            {
                cbIsAlbums.Checked = true;
            }
            if (model.is_attach == 1)
            {
                cbIsAttach.Checked = true;
            }
            txtPageSize.Text = model.page_size.ToString();

            #region 赋值操作权限类型=============================
            string[] actionTypeArr = model.action_type.Split(',');
            for (int i = 0; i < cblActionType.Items.Count; i++)
            {
                for (int n = 0; n < actionTypeArr.Length; n++)
                {
                    if (actionTypeArr[n].ToLower() == cblActionType.Items[i].Value.ToLower())
                    {
                        cblActionType.Items[i].Selected = true;
                    }
                }
            }
            #endregion

            #region 赋值扩展字段=============================
            if (model.channel_fields != null)
            {
                for (int i = 0; i < cblAttributeField.Items.Count; i++)
                {
                    Cms.Model.C_Column_field modelt = model.channel_fields.Find(p => p.field_id == int.Parse(cblAttributeField.Items[i].Value)); //查找对应的字段ID
                    if (modelt != null)
                    {
                        cblAttributeField.Items[i].Selected = true;
                    }
                }
            }
            #endregion
        }
    }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Cms.Model.C_Column_field model)
 {
     return(dal.Add(model));
 }