Esempio n. 1
0
        public DataTable Befor()
        {
            DBfunk dbClass = new DBfunk();

            using (var conn = dbClass.LoadMem())
            {
                DataTablesFun dataTablesFunktions = new DataTablesFun();
                SqlDataReader reader;
                reader = conn.ExecuteReader();

                DataTable dt = dataTablesFunktions.dt();


                dt.Load(reader);

                return(dt);
            }
        }
Esempio n. 2
0
        public object[] Fore2()
        {
            DBfunk dbClass = new DBfunk();

            using (var conn = dbClass.LoadMem())
            {
                SqlDataReader reader;
                reader = conn.ExecuteReader();

                var Listt = new ListBox();
                while (reader.Read())
                {
                    Listt.Items.Add(reader[3].ToString() + "   " + reader[1].ToString() + "     " + reader[2].ToString());
                }
                object[] objCollection = new object[Listt.Items.Count];
                Listt.Items.CopyTo(objCollection, 0);
                return(objCollection);
            }
        }