예제 #1
0
        public void Reset()
        {
            string result = "Reset";

            try
            {
                i_current = -1;
                dbread    = false;
                if (!cached)
                {
                    _dataReader = _dataCmd.Select();
                    if (_dataReader != null)
                    {
                        sel_Maps.Clear();
                        foreach (var propMap in propMaps.Where(pm => pm.Field.Ordinal >= 0))
                        {
                            sel_Maps.Add(propMap);
                        }
                        sel_Maps.Sort((l, r) => l.Field.Ordinal - r.Field.Ordinal);
                        dbread = true;
                    }
                    cached = true;
                }
                result = "Ok";
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            OnReset(result);
        }
예제 #2
0
        public void Reset()
        {
            string result = "Reset";

            try
            {
                _dbreader = _dataCmd.Select(CommandBehavior.SequentialAccess);
                _current  = new DynamicRecord(_dynaRecord, _dbreader);
                result    = "Ok";
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            finally
            {
                //OnReset?.Invoke(result);
            }
        }