private void submitBtn_Click(object sender, EventArgs e) { try { foreach (DataGridViewRow row in CustomersGrid.Rows) { if ((row.Cells[0].Value != null) && ((bool)((DataGridViewCheckBoxCell)row.Cells[0]).Value)) { versionPK = Database.getLatestVersion(); DateTime date = Convert.ToDateTime(actualDatePicker.Value.ToShortDateString() + ' ' + actualTimePicker.Value.ToShortTimeString()); Database.AddUpdate(versionPK, Convert.ToInt32(row.Cells["PK"].Value.ToString()), date, null, "", 0); } } }catch (Exception ex) { System.Console.WriteLine(ex.StackTrace); } DataGridView dgv = mainMenu.getVersionGrid(); dgv.DataSource = Database.GetVersionList(); MessageBox.Show("Completed!"); this.Hide(); mainMenu.Show(); }
private void backBtn_Click(object sender, EventArgs e) { versionsPage.Show(); this.Hide(); }