private void btnModify_Click(object sender, EventArgs e) { AddRecord frm = new AddRecord(_guid, this); frm.ShowDialog(this); btnFilter_Click(sender, e); RefreshTables(); //dataGridViewPatient.DataSource = null; //dataGridViewOrder.DataSource = null; //dataGridViewReport.DataSource = null; }
//add record to table private void AddRecordButton_Click(object sender, RoutedEventArgs e) { if (ValidateInputFields()) { if (ValidateInputFormat()) { AddRecord addRecord = new AddRecord(con.Connect()); addRecord.AddRec(fieldsData); LoadRecords(); } } }
private void btnAdd_Click(object sender, EventArgs e) { AddRecord frm = new AddRecord(this); frm.ShowDialog(this); if (dataGridViewIndex.Rows.Count > 0) { dataGridViewIndex.Rows[dataGridViewIndex.Rows.Count - 1].Cells[0].Selected = true; dataGridViewIndex.Rows[dataGridViewIndex.Rows.Count - 1].Selected = true; } dataGridViewIndex.Focus(); }
private static void CheckWin(Board board, DispatcherTimer dispatcherTimer, Grid grid) { if (numbersOfVisible == board.numbersOfMines) { gameWon = true; Image faceImage = grid.FindName("faceImage") as Image; faceImage.Source = new BitmapImage(new Uri("/Minesweeper;component/img/faceWin.png", UriKind.Relative)); dispatcherTimer.Stop(); AddRecord addRecord = new AddRecord(time); addRecord.ShowDialog(); DataBaseWindow dataBaseWindow = new DataBaseWindow(); dataBaseWindow.ShowDialog(); } }
public bool AddRecordEx(AddRecord command) => Resolve(command);