private void backbtn_Click(object sender, EventArgs e) { Form15 form = new Form15(); form.Show(); this.Hide(); }
private void ManageGroupButton_Click(object sender, EventArgs e) { Form15 form = new Form15(); form.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { Form15 f = new Form15(); this.Hide(); f.ShowDialog(); Close(); }
private void button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=DESKTOP-OLL88JR\\SQLEXPRESS;Initial Catalog=ProjectA;Persist Security Info=True;User ID=sa;Password=12345678"); conn.Open(); String AddGroupCMD = "INSERT INTO [Group] (Created_On) VALUES (@cdate)"; SqlCommand AddGroupCommand = new SqlCommand(AddGroupCMD, conn); AddGroupCommand.Parameters.Add(new SqlParameter("cdate", DateTime.Today)); int count = AddGroupCommand.ExecuteNonQuery(); Form15 form = new Form15(); form.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { if (Form14.d == 1) { if (radioButton3.Checked == true) { Form8 form = new Form8(); form.Show(); this.Hide(); } else if (radioButton2.Checked == true) { Form12 form = new Form12(); form.Show(); this.Hide(); } else if (radioButton1.Checked == true) { Form13 form = new Form13(); form.Show(); this.Hide(); } } else if (Form14.d == 2) { if (radioButton3.Checked == true) { Form15 form = new Form15(); form.Show(); this.Hide(); } else if (radioButton2.Checked == true) { Form16 form = new Form16(); form.Show(); this.Hide(); } else if (radioButton1.Checked == true) { Form17 form = new Form17(); form.Show(); this.Hide(); } } }
private void button4_Click(object sender, EventArgs e) { int index, n; string SqlText = "UPDATE [Reys] SET "; string Reys_ID, Litak_ID, Data, ChasVidpravlennya, MarshrutID, ChasPrybuttya; // перевірка, чи є взагалі записи в таблиці Source n = dataGridView1.Rows.Count; if (n == 1) { return; } Form15 f = new Form15(); // заповнити форму даними перед відкриттям index = dataGridView1.CurrentRow.Index; Reys_ID = dataGridView1[0, index].Value.ToString(); Litak_ID = dataGridView1[0, index].Value.ToString(); Data = dataGridView1[1, index].Value.ToString(); ChasVidpravlennya = dataGridView1[2, index].Value.ToString(); MarshrutID = dataGridView1[2, index].Value.ToString(); ChasPrybuttya = dataGridView1[2, index].Value.ToString(); f.textBox1.Text = Litak_ID; f.textBox2.Text = Data; f.textBox3.Text = ChasVidpravlennya; f.textBox4.Text = MarshrutID; f.textBox5.Text = ChasPrybuttya; if (f.ShowDialog() == DialogResult.OK) { Litak_ID = f.textBox1.Text; Data = f.textBox2.Text; ChasVidpravlennya = f.textBox3.Text; MarshrutID = f.textBox4.Text; ChasPrybuttya = f.textBox5.Text; SqlText += "Litak_ID = \'" + Litak_ID + "\', Data = '" + Data + "\', ChasVidpravlennya = '" + ChasVidpravlennya + "\', MarshrutID = '" + MarshrutID + "\', ChasPrybuttya = '" + ChasPrybuttya + ""; SqlText += "WHERE [Reys].Reys_ID = " + Reys_ID; MyExecuteNonQuery(SqlText); Reys(); } }
private void button1_Click(object sender, EventArgs e) { if (sexual.SelectedIndex == 0 && st.SelectedIndex == 0) { Form2 form2 = new Form2(); this.Hide(); form2.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 1) { Form3 form3 = new Form3(); this.Hide(); form3.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 2) { Form4 form4 = new Form4(); this.Hide(); form4.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 3) { Form5 form5 = new Form5(); this.Hide(); form5.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 4) { Form6 form6 = new Form6(); this.Hide(); form6.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 5) { Form7 form7 = new Form7(); this.Hide(); form7.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 6) { Form8 form8 = new Form8(); this.Hide(); form8.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 7) { Form9 form9 = new Form9(); this.Hide(); form9.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 8) { Form10 form10 = new Form10(); this.Hide(); form10.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 9) { Form11 form11 = new Form11(); this.Hide(); form11.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 0) { Form12 form12 = new Form12(); this.Hide(); form12.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 1) { Form13 form13 = new Form13(); this.Hide(); form13.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 2) { Form14 form14 = new Form14(); this.Hide(); form14.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 3) { Form15 form15 = new Form15(); this.Hide(); form15.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 4) { Form16 form16 = new Form16(); this.Hide(); form16.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 5) { Form17 form17 = new Form17(); this.Hide(); form17.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 6) { Form18 form18 = new Form18(); this.Hide(); form18.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 7) { Form19 form19 = new Form19(); this.Hide(); form19.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 8) { Form20 form20 = new Form20(); this.Hide(); form20.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 9) { Form21 form21 = new Form21(); this.Hide(); form21.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 10) { Form22 form22 = new Form22(); this.Hide(); form22.Show(); } }
/// <summary> /// 通用按钮点击选项卡 在选项卡上显示对应的窗体 /// </summary> private void btnX_Click(object sender, EventArgs e) { string formClass = ((TabControl)sender).SelectedTab.Tag.ToString(); //string form = tabControl1.SelectedTab.Tag.ToString(); Form fm = null; DBConn db = null; DataTable dt = null; string sql = ""; switch (formClass) { case "Form5": //身份验证信息 fm = new Form5(aac044, frm, str_id); break; case "Form6": //就诊登记 fm = new Form6(sf, str_id); break; case "Form10": //费用明细录入 db = new DBConn(); sql = "select * from gxjzdj where aac044 = '" + sf.aac044 + "'and id =" + str_id; dt = db.GetDataSet(sql).Tables[0]; if (dt.Rows.Count > 0) { gxjzdj gx = new gxjzdj(); var pros = gx.GetType().GetProperties(); foreach (var p in pros) { p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null); } fm = new Form10(gx, str_id); } break; case "Form7": //出院登记 DBConn con = new DBConn(); sql = "select * from fymxjl where aac044 = '" + sf.aac044 + "' and id = " + str_id; dt = con.GetDataSet(sql).Tables[0]; if (dt.Rows.Count > 0) { sql = "select * from fhjzdj where aac044 = '" + sf.aac044 + "' and id = " + str_id; dt = con.GetDataSet(sql).Tables[0]; string ykc700 = dt.Rows[0]["ykc700"].ToString(); fm = new Form7(sf, ykc700, str_id); } break; case "Form12": //模拟结算 db = new DBConn(); sql = "select * from cydj where aac044 = '" + sf.aac044 + "' and id = " + str_id; dt = db.GetDataSet(sql).Tables[0]; if (dt.Rows.Count > 0) { fm = new Form12(this.sf, str_id); } break; case "Form14": //费用结算 db = new DBConn(); sql = "select * from cydj where aac044 = '" + sf.aac044 + "' and id = " + str_id; dt = db.GetDataSet(sql).Tables[0]; if (dt.Rows.Count > 0) { fm = new Form14(sf, str_id);;; } break; case "Form15": db = new DBConn(); sql = "select * from gxjzdj where aac044 = '" + sf.aac044 + "' and id = " + str_id; dt = db.GetDataSet(sql).Tables[0]; if (dt.Rows.Count > 0) { gxjzdj gx = new gxjzdj(); var pros = gx.GetType().GetProperties(); foreach (var p in pros) { p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null); } fm = new Form15(gx, str_id); } break; default: break; } if (fm == null) { int zt = int.Parse(qj.getGxStatus(aac044, str_id)); foreach (var q in qj.status) { if (int.Parse(q.Key) == zt + 1) { ((TabControl)sender).SelectedTab.Controls.Clear(); MessageBox.Show("请先完成:" + q.Value); return; } } } ((TabControl)sender).SelectedTab.Controls.Clear(); fm.FormBorderStyle = FormBorderStyle.None; fm.TopLevel = false; fm.Parent = ((TabControl)sender).SelectedTab; fm.ControlBox = false; fm.Dock = DockStyle.Fill; fm.Anchor = AnchorStyles.None; fm.Show(); //s[((TabControl)sender).SelectedIndex] = 1; }
private void button2_Click(object sender, EventArgs e) { Form15 form15 = new Form15(); form15.Show(); }