private void слайдШоуToolStripMenuItem_Click(object sender, EventArgs e) { Form8 f = new Form8(); f.Icon = this.Icon; f.BackColor = this.BackColor; f.Text = "Слайд шоу"; f.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { { //database billing admin4.Connect(); admin4.admin2 = new MySqlCommand("Insert into billing(StudentID, Name, Total, RemainingBalance, Monthly, TypeofPayment) value(@sn, @Name, @Total, @RemainingBalance, @Monthly, @TypeofPayment)", admin4.adminn); admin4.admin2.Parameters.Add(new MySqlParameter("sn", StudentID)); admin4.admin2.Parameters.Add(new MySqlParameter("Name", label4.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("Total", button3.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("RemainingBalance", label13.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("Monthly", textBox3.Text)); string payment = ""; if (radioButton1.Checked) { payment = radioButton1.Text; } else if (radioButton2.Checked) { payment = radioButton2.Text; } admin4.admin2.Parameters.Add(new MySqlParameter("TypeofPayment", payment)); admin4.admin2.ExecuteNonQuery(); admin4.Disconnect(); } //Name use1 = label4.Text; //remaining balance use2 = label13.Text; //AMTpay use3 = textBox1.Text; //AMTtoPAY use7 = textBox4.Text; //schoo year use4 = label16.Text; //date use5 = dateTimePicker1.Text; //change use6 = button4.Text; //total amount use8 = button3.Text; this.Hide(); Form8 Form8 = new Form8(); Form8.ShowDialog(); }
private void addCashierSaleToolStripMenuItem_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); Form8 saleform = new Form8(); saleform.employee = this.user; if (saleform.ShowDialog() == DialogResult.OK) { db.dataGrid(dt, "sales"); dataGridView1.DataSource = dt; int rowCount = ((DataTable)this.dataGridView1.DataSource).Rows.Count; dataGridView1.Rows[rowCount - 1].Selected = true; dataGridView1.FirstDisplayedScrollingRowIndex = rowCount - 1; } }
private async void btns_Click(object sender, EventArgs e) { WindowsFormsApplication1.Resources.ProductDB product = new WindowsFormsApplication1.Resources.ProductDB(); var Pcount = await product.get_allproduct(); int index = (int)(sender as Button).Tag; if (Pcount[index].Count != 0 && Pcount[index].OwnerEmail != mail) { Form8 f8 = new Form8(index, this, mail); f8.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (checkBox4.Checked & checkBox6.Checked) { MessageBox.Show("正解!!"); Form8 fome8 = new Form8(); fome8.Show(); this.Close(); } else { MessageBox.Show("不正解"); } }
private void button7_Click(object sender, EventArgs e) { f2.oleDbConnection1.Open(); OleDbCommand cmd = new OleDbCommand("Update vendor set vstatus='InActive' where vid ='" + textBox12.Text + "'", f2.oleDbConnection1); cmd.ExecuteNonQuery(); MessageBox.Show("Vendor Has not been Approved"); f2.oleDbConnection1.Close(); Form8 f8 = new Form8(); f8.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { List<Person> p = new PersonAction().query(); String str = null; for (int i = 0; i < p.Count();i ++) { str += "挂号业务ID:" + p[i].Id + "\n" + "姓名:" + p[i].Name + "\n" + "年龄:" + p[i].Age + "\n" + "症状:" + p[i].Desc + "\n" + "诊疗方法和建议: " + p[i].Medicine + "\n\n\n" ; } Form myForm = new Form8(str); myForm.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Length >= 15) { MessageBox.Show("So long word !!"); } else { secret = textBox1.Text; secword = secret.ToLower(); this.Hide(); Form8 f8 = new Form8(); f8.Show(); } }
private void button7_Click(object sender, EventArgs e) { MySqlConnection con = new MySqlConnection("server=localhost;user id=root;persistsecurityinfo=True;database=voteme;Password =jaishriRAM0385"); MySqlCommand cmd = new MySqlCommand("select status from registration where Enrollment='" + textBox1.Text + "'", con); cmd.CommandType = CommandType.Text; // cmd.Parameters.AddWithValue("@UserId", textBox1.Text); // cmd.Parameters.AddWithValue("@Password", textBox2.Text); //Form2 obj2 = new Form2(); // obj2.id = textBox1.Text; con.Open(); MySqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { MySqlConnection mysqlconn = new MySqlConnection(); mysqlconn.ConnectionString = ("server=localhost;userid=root;password=jaishriRAM0385;database=VoteMe"); mysqlconn.Open(); MySqlCommand cmd2 = new MySqlCommand(); cmd2.Connection = mysqlconn; cmd2.CommandType = CommandType.Text; cmd2.CommandText = "update registration set status='Approved' where Enrollment='" + textBox1.Text + "'"; //cmd.Parameters.AddWithValue("@Enroll", textBox1.Text); cmd2.ExecuteNonQuery(); MessageBox.Show("Sucesfully Validated"); Form8 obj1 = new Form8(); obj1.Show(); this.Hide(); //obj1.id = textBox1.Text; } else { MessageBox.Show("Enrollment is Invalid"); Form8 obj1 = new Form8(); obj1.Show(); this.Hide(); } con.Close(); }
private void button1_Click_1(object sender, EventArgs e) { student s1 = new student(); s1.loadfile(); s1.string_edit(); string X = textBox1.Text; string y = textBox2.Text; if (X == "admin" && y == "admin") { this.Hide(); Form8 m = new Form8(); m.Show(); } else { MessageBox.Show("Invalid username or password,Please check and try again !"); } }
private void button1_Click(object sender, EventArgs e) { { //update admin4.Connect(); admin4.admin2 = new MySqlCommand("update billing set StudentID=@StudentID, Name=@Name, RemainingBalance=@RemainingBalace, Monthly=@Monthly where ID=@ID", admin4.adminn); admin4.admin2.Parameters.Add(new MySqlParameter("ID", label15.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("StudentID", label4.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("Name", label5.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("RemainingBalance", label20.Text)); admin4.admin2.Parameters.Add(new MySqlParameter("Monthly", label10.Text)); admin4.admin2.ExecuteNonQuery(); admin4.Disconnect(); LoadTable1(); } //Name user1 = label5.Text; //remaining balance user2 = label7.Text; //AMTpay user3 = textBox2.Text; //AMTtoPAY user4 = textBox3.Text; //change user5 = label18.Text; //School year user6 = label18.Text; //date user7 = dateTimePicker1.Text; this.Hide(); Form8 Form8 = new Form8(); Form8.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { string num = textBox1.Text; if (num == "") { MessageBox.Show("Veuillez donner le numéro du sinistre"); return; } bool r = checklogin(num); if (r) { Form8 f8 = new Form8(); this.Hide(); f8.Show(); } else { MessageBox.Show("Vérifiez vos paramètres"); } }
private void button6_Click(object sender, EventArgs e) { if (radioButton1.Checked) { Form8 f8 = new Form8("приход", 1); f8.ShowDialog(); dataGridView1.Refresh(); dataGridView2.Refresh(); this.test1TableAdapter1.FillBy1(this.northwindDataSet31.test1, 1); test2BindingSource.ResetBindings(false); this.test2TableAdapter.Fill(this.northwindDataSet31.test2); } if (radioButton2.Checked) { Form8 f8 = new Form8("рассход", 2); f8.ShowDialog(); dataGridView1.Refresh(); dataGridView2.Refresh(); this.test1TableAdapter1.FillBy1(this.northwindDataSet31.test1, 2); test2BindingSource.ResetBindings(false); this.test2TableAdapter.Fill(this.northwindDataSet31.test2); } }
public Form7(Form8 tf8) { InitializeComponent(); f8 = tf8; TextBox.CheckForIllegalCrossThreadCalls = false; }
private void button7_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.Show(); }
private void txt_confirm_Click(object sender, EventArgs e) { try { connection.Open(); string q; int i, flag = 0; int.TryParse(txt_ticket.Text, out i); OleDbCommand command = new OleDbCommand(); command.Connection = connection; if (ticket_type == "GrandStand") { if (i <= 2) { command.CommandText = "update Venue_Capacity set Grand_Stand=Grand_Stand-" + i + " where MatchNo=" + matchNo + ""; flag = 1; } else { MessageBox.Show("Wrong Input!!"); } } else if (ticket_type == "Business") { if (i <= 4) { command.CommandText = "update Venue_Capacity set Business_Class=Business_Class-" + i + " where MatchNo=" + matchNo + ""; flag = 1; } else { MessageBox.Show("Wrong Input!!"); } } else if (ticket_type == "Lawn") { if (i <= 2) { command.CommandText = "update Venue_Capacity set Lawn=Lawn-" + i + " where MatchNo=" + matchNo + ""; flag = 1; } else { MessageBox.Show("Wrong Input!!"); } } else if (ticket_type == "Economy") { if (i <= 5) { command.CommandText = "update Venue_Capacity set Economy_Class=Economy_Class-" + i + " where MatchNo=" + matchNo + ""; flag = 1; } else { MessageBox.Show("Wrong Input!!"); } } if (flag == 1) { command.ExecuteNonQuery(); q = "insert into Booking (Usernamee,No_of_ticketss,MatchNo,Team11,Team22,Venuee,Credit_Card_Idd,Ticket_type) values('" + username1 + "'," + i + "," + matchNo + ",'" + team1 + "','" + team2 + "','" + venue + "','" + txt_cred_card.Text + "','" + ticket_type + "')"; command.CommandText = q; command.ExecuteNonQuery(); } else { MessageBox.Show("Wrong Input!!"); } connection.Close(); this.Hide(); Form8 f8 = new Form8(username1); f8.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Error " + ex); } }
private void 管他那么多直接删除肥肉DToolStripMenuItem_Click(object sender, EventArgs e) { Form Form8 = new Form8(); Form8.Show(); }
private void label6_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.Show(); }
private void компанииToolStripMenuItem_Click(object sender, EventArgs e) { Form f8 = new Form8(); f8.Show(); }
private void button1_Click(object sender, EventArgs e) { this.Visible = false; Form8 connectionMode = new Form8(); connectionMode.Show(); }
private void button1_Click(object sender, EventArgs e) { int flag = 0; int ff = 0; int fff = 0; string str = "否"; Random ro = new Random(); int[] iResult = new int[100]; int iUp = 999999; int iDown = 100000; for (int i = 1; i <= f; i++) { iResult[i] = ro.Next(iDown, iUp); } uid.ConnectionString = global.constr; string a = "update 排片信息 set 剩余票数=剩余票数-" + f.ToString() + " where 电影名称='" + movie_name + "' and 放映厅='" + comboBox2.Text + "' and 场次='" + comboBox1.Text + "'"; SqlCommand cmd1 = new SqlCommand(a, uid); try { uid.Open(); if (f == 0) { MessageBox.Show("还没买票!"); } else { cmd1.ExecuteNonQuery(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { uid.Close(); } for (int i = 0; i < 11; i++) { v[i] = new int[11]; } for (int i = 0; i < tabPage1.Controls.Count; i++) { if (tabPage1.Controls[i].BackColor == Color.Red) { string b = tabPage1.Controls[i].Text.Substring(0, 1); string c = tabPage1.Controls[i].Text.Substring(2, 1); tabPage1.Controls[i].Enabled = false; int bb = int.Parse(b); int cc = int.Parse(c); v[bb][cc] = 1; } } if (f != 0) { this.Visible = true; Form f8 = new Form8(); f8.ShowDialog(); DateTime dt = DateTime.Today; for (int i = 0; i < 11; i++) { for (int j = 0; j < 11; j++) { if (u[i][j] != v[i][j]) { ff++; string b = "insert into 购票座位号 values('" + textBox5.Text + "','" + comboBox2.Text + "', '" + comboBox1.Text + "', '" + dt + "', '" + (i).ToString() + "', '" + (j).ToString() + "','" + (iResult[ff]).ToString() + "') "; SqlCommand cmd = new SqlCommand(b, uid); try { uid.Open(); if (cmd.ExecuteNonQuery() > 0) { flag = 1; MessageBox.Show(" 第" + (ff).ToString() + " 张票\r\n 取票密码:" + (iResult[ff]).ToString() + "\r\n 放 映 厅 :" + comboBox2.Text + "\r\n 场 次:" + comboBox1.Text); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { uid.Close(); } } } } for (int i = 0; i < 11; i++) { for (int j = 0; j < 11; j++) { if (u[i][j] != v[i][j]) { fff++; string c = "insert into 订单 values('" + iResult[fff].ToString() + "','" + global.userID + "','" + str + "') "; SqlCommand cmd2 = new SqlCommand(c, uid); try { uid.Open(); if (cmd2.ExecuteNonQuery() > 0) { } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { uid.Close(); } } } } button1.Enabled = false; } }
private void tabelaEShumToolStripMenuItem_Click(object sender, EventArgs e) { Form8 form8 = new Form8(); form8.Show(); }
private void button1_Click_1(object sender, EventArgs e) { Form8 yeni = new Form8(); yeni.Show(); }
private void depositMoneyToolStripMenuItem_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.Show(); }
//调用系统参数窗体 private void button4_Click(object sender, EventArgs e) { Form8 formck = new Form8(); formck.ShowDialog(); }
private void listadoDeTécnicosToolStripMenuItem_Click(object sender, EventArgs e) { Form8 form8 = new Form8(); form8.MdiParent = this; form8.Show(); }
public void Afisare_Forma(string Text_Forma, Form frn, string Close_or_Hide) { Form f = new Form(); switch (Text_Forma) { case "MENIU": f = new Form1(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "LECTII": f = new Form2(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA INTRODUCERE1": f = new Form3(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA INTRODUCERE2": f = new Form4(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA INTRODUCERE3": f = new Form5(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI1": f = new Form6(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI2": f = new Form7(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI3": f = new Form8(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI4": f = new Form9(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI5": f = new Form10(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA CAZURI6": f = new Form11(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "CONGRUENTA DREPTUNGHICE": f = new Form12(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "TESTE": f = new Form16(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "TEST USOR": f = new Test_Usor_Pagina_1(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "TEST MEDIU": f = new Test_Mediu(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; case "TEST GREU": f = new Test_Greu(); f.Show(); Verifica_daca_Close_sau_Hide(Close_or_Hide, frn); break; } }
//登录按键响应事件 private void ButtonLogin_Click(object sender, EventArgs e) { //新建ClassSqlConnect类,调用重构的ViewCount方法返回从数据库中查询的结果 ClassSqlConnect log = new ClassSqlConnect(); SqlDataReader reader = log.ViewCount(ComboxUserName.Text.ToString(),TxtPassword.Text.ToString()); if (reader.Read())//判断有数据,说明登录成功 { /*保存账号信息,将这部分信息保存在数据库(XML)中更好*/ ComboxUserName.Items.Add(ComboxUserName.Text.ToString()); Form nfm; //提取用户名信息 string UName = reader[1].ToString(); MessageBox.Show("欢迎你,"+ UName); //提取权限信息并选择应打开的界面 switch((int)reader[2]) { case 0: nfm = new Form2();//系统管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 1: nfm = new Form7();//人事经理管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 2: nfm = new Form3();//人事员工管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 3: nfm = new Form8();//财务经理管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 4: nfm = new Form4();//财务员工管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 5: nfm = new Form9();//销售经理管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 6: nfm = new Form6();//销售员工管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 7: nfm = new Form10();//仓库经理管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; case 8: nfm = new Form5();//仓库员工管理界面 this.Hide(); if (nfm.ShowDialog() == DialogResult.OK) { this.Show(); } break; default: MessageBox.Show("你没有登录权限," + UName,"没有权限"); ComboxUserName.Text = ""; TxtPassword.Text = ""; break; } } else { MessageBox.Show("用户名或密码错误!","错误"); TxtPassword.Text = ""; } //调用自定义的Close方法关闭sql连接 log.Close(); }
private void Form3_KeyDown(object sender, KeyEventArgs e) { /** * form31:uav * form32:car */ //大坝位移超标事件数据传输 if (e.Modifiers == Keys.Control && e.KeyCode == Keys.E) { this.setType("uav"); if (this.isRunning2()) { this.stopProcess2(); } else { this.startProcess2(); } //调用数据传输程序 Process m_Process = new Process(); m_Process.StartInfo.FileName = @".\exe\ERSSky\bind\ERSSky.exe"; m_Process.Start(); //睡眠一段时间 Thread.Sleep(10000); //关闭进程 Process[] proc = Process.GetProcessesByName("ERSSky"); for (int i = 0; i < proc.Length; i++) { proc[i].Kill(); //逐个结束进程. } } //"Ctrl + I"显示或隐藏数据传输链路 else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.I) { //绘制数据传输链路 this.userControl11.DrawLink(); } //大坝位移超标事件数据处理 else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.F) { this.setType("uav"); if (this.isRunning3()) { this.stopProcess3(); } else { this.startProcess3(); } if (form8.getClosed()) { form8 = new Form8(); form8.setForm3(this); if (!form8.Visible) { form8.Show(); } } else { form8.setForm3(this); if (!form8.Visible) { form8.Show(); } } } //水质污染超标事件数据传输 else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.NumPad6) { this.setType("car"); if (this.isRunning2()) { this.stopProcess2(); } else { this.startProcess2(); } } //水质污染超标事件数据传输链路 else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.NumPad3) { userControl11.AddSensorNetwork(); } else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.NumPad7) { this.setType("car"); //数据传输 if (this.isRunning2()) { this.stopProcess2(); } else { this.startProcess2(); } //数据处理 if (this.isRunning3()) { this.stopProcess3(); } else { this.startProcess3(); } if (form8.getClosed()) { form8 = new Form8(); form8.setForm3(this); if (!form8.Visible) { form8.Show(); } } else { form8.setForm3(this); if (!form8.Visible) { form8.Show(); } } } }
private void showForm8ToolStripMenuItem_Click(object sender, EventArgs e) { Form8 objektForm8 = new Form8(); objektForm8.Show(); }
private void button1_Click(object sender, EventArgs e) { //If form 8 is null if (f8 == null) { //Instantiate form 8 f8 = new Form8(); } //Show the new Form 8 instance f8.Show(); //Set Form 8's Form 5 variable as this instance f8.f5 = f5; //Pass the content of both text boxes as well as the workshop session and time to form 8's variables f8.returnText1.Text = f5.textBox1.Text; f8.returnText2.Text = f5.textBox2.Text; //Set Form 8's label 5 text value as the workshop session f8.label5.Text = this.f5.workshopSession; //Set Form 8's laben 7 text value as the workshop time f8.label7.Text = this.f5.workshopTime; //Clear both text boxes aof all content f5.textBox1.Text = ""; f5.textBox2.Text = ""; //Enable all buttons in form 5 again f5.button1.Enabled = true; f5.button2.Enabled = true; f5.button3.Enabled = true; f5.button4.Enabled = true; f5.button5.Enabled = true; f5.button6.Enabled = true; f5.button7.Enabled = true; f5.button8.Enabled = true; f5.button9.Enabled = true; f5.button10.Enabled = true; f5.button11.Enabled = true; f5.button12.Enabled = true; f5.button13.Enabled = true; f5.button14.Enabled = true; f5.button15.Enabled = true; f5.button16.Enabled = true; f5.button17.Enabled = true; f5.button18.Enabled = true; f5.button19.Enabled = true; f5.button20.Enabled = true; f5.button21.Enabled = true; f5.button22.Enabled = true; f5.button23.Enabled = true; f5.button24.Enabled = true; f5.button25.Enabled = true; f5.button26.Enabled = true; f5.button29.Enabled = true; f5.button30.Enabled = true; f5.button31.Enabled = true; f5.button32.Enabled = true; f5.button33.Enabled = true; f5.button34.Enabled = true; f5.button35.Enabled = true; f5.button36.Enabled = true; f5.button37.Enabled = true; f5.button38.Enabled = true; f5.button39.Enabled = true; f5.button40.Enabled = true; f5.button41.Enabled = true; f5.button42.Enabled = true; f5.button43.Enabled = true; f5.button44.Enabled = true; f5.button45.Enabled = true; f5.button46.Enabled = true; f5.button47.Enabled = true; f5.button48.Enabled = true; f5.button49.Enabled = true; f5.button50.Enabled = true; //Hide this form this.Hide(); //Hide form 5 f5.Hide(); }
private void button9_pClick(object sender, EventArgs e) { Form8 frm = new Form8(); frm.Show(); }
// Load Music File List private void button21_Click(object sender, EventArgs e) { if (soundON == false) { Form8 soundList = new Form8(); soundList.Show(this); soundON = true; } }