Пример #1
0
        private void btnExp_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = eventGrid.CurrentRow;

            AddExpensesForm aef = new AddExpensesForm(int.Parse(row.Cells[1].Value.ToString()),
                                                      int.Parse(row.Cells[0].Value.ToString()),
                                                      int.Parse(row.Cells[3].Value.ToString()),
                                                      row.Cells[4].Value.ToString(),
                                                      row.Cells[5].Value.ToString(),
                                                      Convert.ToDateTime(row.Cells[7].Value.ToString()),
                                                      Convert.ToDateTime(row.Cells[8].Value.ToString()),
                                                      row.Cells[13].Value.ToString(),
                                                      row.Cells[14].Value.ToString(),
                                                      row.Cells[15].Value.ToString());

            aef.ShowDialog();
        }
Пример #2
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            MySqlDataReader reader = DBConnection.getData("select event_id from event where proj_id = " + projectName.SelectedValue + " and sch_no = " + eventsSch.SelectedValue + ";");

            if (reader.Read())
            {
                event_id = reader.GetInt16("event_id") + 1;
            }
            else
            {
                event_id = 1;
            }

            reader.Close();

            AddExpensesForm add = new AddExpensesForm(int.Parse(projectName.SelectedValue.ToString()), event_id);

            add.Show();
        }