Exemple #1
0
        private void Button7_Click(object sender, EventArgs e)
        {
            ActiveForm.Hide();
            ListofCharities reg = new ListofCharities();

            reg.ShowDialog();
            Close();
        }
Exemple #2
0
        public ListofCharities()
        {
            InitializeComponent();
            SqlConnection   scc = new SqlConnection();
            ListofCharities loc = this;

            scc.ListOfCharReader(loc);
            timer1.Start();
        }
Exemple #3
0
        public void ListOfCharReader(ListofCharities loc)
        {
            string          connStr = "Server=localhost;user=root;database=ketrar;password="******"SELECT CharityLogo, CharityName, CharityDescription FROM charity";
            MySqlCommand    command = new MySqlCommand(sql, conn);
            MySqlDataReader reader  = command.ExecuteReader();
            int             i       = 0;

            while (reader.Read())
            {
                loc.imgAdd(reader[0].ToString(), reader[1].ToString() + ":" + reader[2].ToString());
                i++;
            }
            reader.Close();
            conn.Close();
        }