示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LabMS.Model.DictionaryClass mDClass = new LabMS.Model.DictionaryClass();
            if (!Page.IsPostBack)
            {
                string strDClass;
                if (Request.QueryString["Type"] == null)
                {
                    Common.JShelper.JSAlert(Page, "err", "参数错误!");
                    return;
                }

                strDClass = Request.QueryString["Type"].ToString();
                lbType.Text = strDClass;
                mDClass = checkQueryString(strDClass);
                if (mDClass == null)
                {
                    Common.JShelper.JSAlert(Page, "err2", "字典类别不存在!");
                    return;
                }
                lbPageName.Text = mDClass.Name;

                bind(strDClass);

            }
            this.Page.Title = lbPageName.Text;
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LabMS.Model.DictionaryClass mDClass = new LabMS.Model.DictionaryClass();
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["location"] == null)
                {
                    Common.JShelper.JSAlert(Page, "err", "参数错误!");
                    return;
                }
                if (Request.QueryString["type"] == null)
                {
                    Common.JShelper.JSAlert(Page, "err", "参数错误!");
                    return;
                }
                string strLocation = Request.QueryString["location"].ToString();
                string strDClass = Request.QueryString["type"].ToString();
                lbType.Text = strDClass;
                lbLocation.Text = strLocation;

                bind(strDClass, strLocation,"");

                lbPageName.Text = mDClass.Name;
            }
            this.Page.Title = lbPageName.Text + this.Page.Title;
        }
示例#3
0
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<LabMS.Model.DictionaryClass> GetModelList(string strWhere)
 {
     DataSet ds = dal.GetList(strWhere);
     List<LabMS.Model.DictionaryClass> modelList = new List<LabMS.Model.DictionaryClass>();
     int rowsCount = ds.Tables[0].Rows.Count;
     if (rowsCount > 0)
     {
         LabMS.Model.DictionaryClass model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new LabMS.Model.DictionaryClass();
             model.ID=long.Parse(ds.Tables[0].Rows[n]["ID"].ToString());
             model.Code=ds.Tables[0].Rows[n]["Code"].ToString();
             model.Name=ds.Tables[0].Rows[n]["Name"].ToString();
             modelList.Add(model);
         }
     }
     return modelList;
 }