コード例 #1
0
ファイル: SelectionBL.cs プロジェクト: hinstam/JobScheduling
        public virtual List <SelectListItem> GetSelectList(string tableName, object defaultValue, string TextFormat, Dictionary <string, object> whereParam, params string[] colsName)
        {
            SelectionDA selectionDA = null;
            DataTable   table       = new DataTable();

            try
            {
                selectionDA = new SelectionDA();
                table       = selectionDA.GetDataTable(tableName, whereParam, colsName);
            }
            finally
            {
                if (selectionDA != null)
                {
                    selectionDA.CloseConnection();
                }
            }

            return(NewSelectList(table, defaultValue, TextFormat, colsName));
        }
コード例 #2
0
ファイル: SelectionBL.cs プロジェクト: hinstam/JobScheduling
        public virtual List <SelectListItem> GetSelectList(string tableName, object defaultValue, bool isAll, params string[] colsName)
        {
            SelectionDA selectionDA = null;
            DataTable   table       = new DataTable();

            try
            {
                selectionDA = new SelectionDA();
                table       = selectionDA.GetDataTable(tableName, null, isAll, colsName);
            }
            finally
            {
                if (selectionDA != null)
                {
                    selectionDA.CloseConnection();
                }
            }

            return(NewSelectList(table, defaultValue, null, colsName));
        }