コード例 #1
0
 /// <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);
 }
コード例 #2
0
ファイル: Dentist.cs プロジェクト: ELPTFASSN/DentalClinic
 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();
     }
 }
コード例 #3
0
 private void btnSQLExec_Click(object sender, EventArgs e)
 {
     sQuery = new SQLLib(txtDataProvider.Text, txtDataSource.Text);
     sQuery.CommandExec(txtCommand, dbGrid);
 }