/// <summary> /// Add Schedule /// </summary> /// <param name="scheduleID"></param> /// <param name="date"></param> /// <param name="time"></param> /// <param name="description"></param> /// <param name="outputGridView"></param> public static void addSchedule(TextBox scheduleID, DateTimePicker date, DateTimePicker time, TextBox description, DataGridView outputGridView) { sQuery.Command = "insert into Schedule values('" + scheduleID.Text + "','" + date.Value + "','" + time.Value + "','" + description.Text + "')"; sQuery.CommandExec(sQuery.Command.ToString(), outputGridView); sQuery.CommandExec("select * from Schedule", outputGridView); MessageBox.Show("Schedule added successfully.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void frmDentist_Activated(object sender, EventArgs e) { statusDentist.Text = globals.Username; sQuery.CommandExec("SELECT * FROM Schedule", datagridSched); if (globals.Restriction != null) { mnuAdmin.Visible = globals.isAdministrator(); } }
private void btnSQLExec_Click(object sender, EventArgs e) { sQuery = new SQLLib(txtDataProvider.Text, txtDataSource.Text); sQuery.CommandExec(txtCommand, dbGrid); }