Example #1
0
        public void LoadSet(IDAOFilter filter, LoadMembersDelegate method, string tableName, List <string> fieldsList)
        {
            bool         wasOpen = false;
            DbDataReader reader  = null;

            try
            {
                reader = ReaderOpen(out wasOpen, createSQL(filter, tableName, fieldsList));
                while (reader.Read())
                {
                    object[] vals = new object[reader.FieldCount];
                    reader.GetValues(vals);
                    method(vals);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                ReaderClose(reader, wasOpen);
            }
        }
Example #2
0
 public static string createSQL(IDAOFilter filter, string tableName, string fields, char fieldSplitter)
 {
     return(createSQL(filter, tableName, new List <string>(fields.Split(fieldSplitter))));
 }
Example #3
0
 public static string createSQL(IDAOFilter filter, string tableName, string[] fields)
 {
     return(createSQL(filter, tableName, new List <string>(fields)));
 }
Example #4
0
 /// <summary>
 /// Конструирование SQL запроса для загрузки данных из SQL Server
 /// </summary>
 /// <param name="topdistinct">Distinct</param>
 /// <param name="table">Название таблицы</param>
 /// <param name="filter">Фильтер</param>
 /// <returns></returns>
 string createSQL(IDAOFilter filter, string tableName)
 {
     return(createSQL(filter, tableName, new List <string>()));
 }
Example #5
0
 public void LoadSet(IDAOFilter filter, LoadMembersDelegate method, string tableName)
 {
     LoadSet(filter, method, tableName, null);
 }
Example #6
0
 public void LoadSet(IDAOFilter filter, int top, LoadMembersDelegate method, string tableName, List <string> fieldsList)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Example #7
0
 string createSQL(IDAOFilter filter, string tableName)
 {
     return(createSQL(filter, tableName, null));
 }
Example #8
0
 public FilterEventsArgs(IDAOFilter filter)
 {
     Filter = filter;
 }
 public object[] LoadDat(IDAOFilter filter, string tableName)
 {
     throw new NotImplementedException();
 }