Пример #1
0
        public bool Find(IRadarParameters param)
        {
            var found = false;

            InitializeConnection();

            PrepareFindQuery(param);

            var reader = rdrFindSqlCommand.ExecuteReader();

            if (reader.Read())
            {
                OnFound(reader);
                found = true;
            }
            reader.Close();
            return(found);
        }
Пример #2
0
        private void FillComboBox()
        {
            QueryBuilder qB = new QueryBuilder().
                              SelectAllFrom(dC.TableType);

            SqlProxyCommand fillCM = new SqlProxyCommand(qB.Query, sqlCN);

            try
            {
                SqlProxyDataReader fillRD = fillCM.ExecuteReader();
                while (fillRD.Read())
                {
                    this.Items.Add(fillRD.GetString(dC.Name));
                }

                fillRD.Close();
            }
            catch (SqlException exc)
            {
                MessageBox.Show(exc.StackTrace, exc.Message);
            }
        }
Пример #3
0
 public SqlProxyDataReader ExecuteReader()
 {
     scc.CommandText = Query;
     return(scc.ExecuteReader());
 }