private void InfiniteCB_CheckedChanged(object sender, EventArgs e) { /* * if (FiniteCB.Checked) * { * PeriodicCB.Visible = Visible; * NullCB.Visible = Visible; * ArraySizeLabel.Visible = Visible; * ArraySizeTB.Visible = Visible; * InfiniteCB.Checked = false; * } */ if (InfiniteCB.Checked) { PeriodicCB.Hide(); NullCB.Hide(); ArraySizeLabel.Hide(); ArraySizeTB.Hide(); ParallelCB.Hide(); SequentialCB.Hide(); LeftToRight.Hide(); RightToLeft.Hide(); Random.Hide(); UserCB.Hide(); FiniteCB.Checked = false; } }
private void ParallelCB_CheckedChanged(object sender, EventArgs e) { if (ParallelCB.Checked == true) { SequentialCB.Checked = false; RightToLeft.Hide(); LeftToRight.Hide(); Random.Hide(); UserCB.Hide(); } }
public Form1() { InitializeComponent(); InfiniteCB.Checked = true; PeriodicCB.Hide(); NullCB.Hide(); ArraySizeLabel.Hide(); ArraySizeTB.Hide(); ParallelCB.Hide(); SequentialCB.Hide(); RightToLeft.Hide(); LeftToRight.Hide(); Random.Hide(); UserCB.Hide(); ParallelCB.Checked = true; PeriodicCB.Checked = true; LeftToRight.Checked = true; }
private void UserCB_DropDownClosed(object sender, EventArgs e) { string userslct = UserCB.GetItemText(UserCB.SelectedItem); using (MySqlConnection cmn = new MySqlConnection(Globals.connStr)) { cmn.Open(); MySqlCommand mmmd = new MySqlCommand("SELECT userId from user where userName = '******';", cmn); MySqlDataAdapter mapt = new MySqlDataAdapter(mmmd); DataTable mdm = new DataTable(); mapt.Fill(mdm); if (mdm.Rows.Count > 0) { int idc = (int)mdm.Rows[0][0]; Globals.SelUser = idc; } cmn.Close(); } //Fill Appt Table with Selected User Appts DataTable at = new DataTable(); using (MySqlConnection cn = new MySqlConnection(Globals.connStr)) { cn.Open(); MySqlCommand cmd = new MySqlCommand("SELECT appointmentId, customerId, type, start, end FROM appointment where userId = '" + Globals.SelUser + "'", cn); MySqlDataReader reader = cmd.ExecuteReader(); at.Load(reader); if (at.Rows.Count > 0) { dataGridView1.DataSource = at; } cn.Close(); } }