Exemplo n.º 1
0
        //查找检查项目
        public void BindExamItem()
        {
            StringBuilder strBuild = new StringBuilder();

            if (cmb_EXAM_CLASS.Text != "")
            {
                strBuild.Append(" EXAM_CLASS ='" + cmb_EXAM_CLASS.Text.Trim() + "' and ");
            }
            if (cmb_EXAM_SUB_CLASS.Text != "")
            {
                strBuild.Append(" EXAM_SUB_CLASS ='" + cmb_EXAM_SUB_CLASS.Text.Trim() + "' and ");
            }
            if (txt_INPUT_CODE.Text.Trim() != "")
            {
                strBuild.Append(" INPUT_CODE  like '%" + txt_INPUT_CODE.Text.Trim() + "%' and ");
            }

            //  DataTable dt = BExamItemDi.GetList(strBuild.ToString() + " 1=1 ORDER BY EXAM_ITEM_CODE ,EXAM_SUB_CLASS ");
            DataTable dt = BExamItemDi.GetList(strBuild.ToString() + " 1=1 ORDER BY SORT_ID ");

            this.dgv_ExamItem.DataSource = dt;
            if (dt.Rows.Count > 0)
            {
                this.dgv_ExamItem.Visible  = true;
                this.gb_PromptInfo.Visible = false;
            }
            else
            {
                this.dgv_ExamItem.Visible  = false;
                this.gb_PromptInfo.Visible = true;
            }
            rowcount = dgv_ExamItem.Rows.Count + 1;
        }
Exemplo n.º 2
0
        //查找某一检查类别下的项目表
        private void Find_Exam_Item(string sqlstr)
        {
            DataTable dt = bExamItem.GetList(sqlstr + " 1=1 Order by SORT_ID");

            if (dt == null)
            {
                return;
            }
            else
            {
                dgv_Exam_Item.DataSource = dt;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 检查类别、检查子类检索表EXAM_ITEM_DICT得到数据集绑定至检查项目列表中
        /// </summary>
        public System.Data.DataTable Bind_ExamItem(string ExamClass, string ExamSubClass, ComboBox cmb_ExamItem)
        {
            BExamItemDict bExamItemDict = new BExamItemDict();

            System.Data.DataTable dt = bExamItemDict.GetList("EXAM_CLASS='" + ExamClass + "' and EXAM_SUB_CLASS='" + ExamSubClass + "' order by SORT_ID");
            if (GetConfig.RM_ExamItemSort)
            {
                if (GetConfig.RM_ExamItemSort)
                {
                    ExamItemSorter examItemSorter = new ExamItemSorter();
                    dt = examItemSorter.ExamItemSort(ExamClass, ExamSubClass, dt);
                }
            }
            cmb_ExamItem.DataSource    = dt.DefaultView;
            cmb_ExamItem.DisplayMember = dt.Columns["EXAM_ITEM_NAME"].ColumnName;
            cmb_ExamItem.ValueMember   = dt.Columns["EXAM_ITEM_CODE"].ColumnName;
            return(dt);
            //this.Now_DT_VS_Group = new System.Data.DataTable[dt.Rows.Count];
        }