Esempio n. 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);
            }
        }
Esempio n. 2
0
 public static string createSQL(IDAOFilter filter, string tableName, string fields, char fieldSplitter)
 {
     return(createSQL(filter, tableName, new List <string>(fields.Split(fieldSplitter))));
 }
Esempio n. 3
0
 public static string createSQL(IDAOFilter filter, string tableName, string[] fields)
 {
     return(createSQL(filter, tableName, new List <string>(fields)));
 }
Esempio n. 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>()));
 }
Esempio n. 5
0
 public void LoadSet(IDAOFilter filter, LoadMembersDelegate method, string tableName)
 {
     LoadSet(filter, method, tableName, null);
 }
Esempio n. 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.");
 }
Esempio n. 7
0
 string createSQL(IDAOFilter filter, string tableName)
 {
     return(createSQL(filter, tableName, null));
 }
Esempio n. 8
0
 public FilterEventsArgs(IDAOFilter filter)
 {
     Filter = filter;
 }
Esempio n. 9
0
 public object[] LoadDat(IDAOFilter filter, string tableName)
 {
     throw new NotImplementedException();
 }