public static void ComboBoxDic(ComboBox cb, string pid)//绑定下拉控件-字典表
        {
            object objType = GetCache("T_DictionaryPid" + pid);
            List <WSS.Model.Dictionary> listdc = null;

            if (objType == null)
            {
                try
                {
                    listdc = new WSS.BLL.Dictionary().GetModelList("F_ParentID=" + pid + " and F_IsUsed=1 order by F_Sort asc");
                    SetCache("T_DictionaryPid" + pid, listdc); // 写入缓存
                }
                catch                                          //(System.Exception ex)
                {
                    //string str=ex.Message;// 记录错误日志
                }
            }
            else
            {
                listdc = (List <WSS.Model.Dictionary>)objType;
            }

            for (int i = 0; i < listdc.Count; i++)
            {
                cb.Items.Add(new Coolite.Ext.Web.ListItem(listdc[i].F_Value, listdc[i].F_DicID.ToString()));
            }
        }
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtF_ParentID.Text.Trim().Length == 0)
            {
                strErr += "F_ParentID不能为空!\\n";
            }
            if (this.txtF_Value.Text.Trim().Length == 0)
            {
                strErr += "F_Value不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string F_DicID    = this.lblF_DicID.Text;
            string F_ParentID = this.txtF_ParentID.Text;
            string F_Value    = this.txtF_Value.Text;
            bool   F_IsUsed   = this.chkF_IsUsed.Checked;


            WSS.Model.Dictionary model = new WSS.Model.Dictionary();
            model.F_DicID    = F_DicID;
            model.F_ParentID = F_ParentID;
            model.F_Value    = F_Value;
            model.F_IsUsed   = F_IsUsed;

            WSS.BLL.Dictionary bll = new WSS.BLL.Dictionary();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
 private void ShowInfo(string F_DicID)
 {
     WSS.BLL.Dictionary   bll   = new WSS.BLL.Dictionary();
     WSS.Model.Dictionary model = bll.GetModel(F_DicID);
     this.lblF_DicID.Text     = model.F_DicID;
     this.txtF_ParentID.Text  = model.F_ParentID;
     this.txtF_Value.Text     = model.F_Value;
     this.chkF_IsUsed.Checked = model.F_IsUsed;
 }
 private void ShowInfo(string F_DicID)
 {
     WSS.BLL.Dictionary   bll   = new WSS.BLL.Dictionary();
     WSS.Model.Dictionary model = bll.GetModel(F_DicID);
     this.lblF_DicID.Text    = model.F_DicID;
     this.lblF_ParentID.Text = model.F_ParentID;
     this.lblF_Value.Text    = model.F_Value;
     this.lblF_IsUsed.Text   = model.F_IsUsed?"ÊÇ":"·ñ";
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         WSS.BLL.Dictionary bll = new WSS.BLL.Dictionary();
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             string F_DicID = Request.Params["id"];
             bll.Delete(F_DicID);
             Response.Redirect("list.aspx");
         }
     }
 }