示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataStorage.IsItEdit = false;
            CharityControl cc = new CharityControl();

            cc.Show();
            Hide();
        }
示例#2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataStorage.CharID = e.RowIndex + 1;
            command            = new MySqlCommand("SELECT * FROM `charity` WHERE CharityId LIKE'" + DataStorage.CharID + "';", connection);

            connection.Open();
            MySqlDataReader reader1 = command.ExecuteReader();

            while (reader1.Read())
            {
                DataStorage.OrgName  = reader1.GetString("CharityName");
                DataStorage.OrgDiscr = reader1.GetString("CharityDescription");
            }
            reader1.Close();
            connection.Close();
            DataStorage.IsItEdit = true;
            CharityControl cc = new CharityControl();

            cc.Show();
            Hide();
            // }
        }