Exemplo n.º 1
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form14 form = new Form14();

            form.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form14 f = new Form14();

            this.Hide();
            f.ShowDialog();
            Close();
        }
Exemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            int    index, n;
            string Reys_ID;
            string Litak_ID, Data, ChasVidpravlennya, MarshrutID, ChasPrybuttya;
            string SqlText = "DELETE FROM [Reys] WHERE [Reys].Reys_ID = ";

            // перевірка, чи є взагалі записи в таблиці Source
            n = dataGridView1.Rows.Count;
            if (n == 1)
            {
                return;
            }

            Form14 f = new Form14();

            index   = dataGridView1.CurrentRow.Index;
            Reys_ID = Convert.ToString(dataGridView1[0, index].Value);

            // сформувати SQL-команду
            SqlText = SqlText + Reys_ID;

            // заповнити інформаційну довідку у вікні Form5
            Reys_ID           = Convert.ToString(dataGridView1[1, index].Value);
            Litak_ID          = Convert.ToString(dataGridView1[2, index].Value);
            Data              = Convert.ToString(dataGridView1[2, index].Value);
            ChasVidpravlennya = Convert.ToString(dataGridView1[2, index].Value);
            MarshrutID        = Convert.ToString(dataGridView1[2, index].Value);
            ChasPrybuttya     = Convert.ToString(dataGridView1[2, index].Value);

            f.label2.Text = Reys_ID + " - " + Reys_ID + " - " + Litak_ID + " - " + Data + "-" + ChasVidpravlennya + "-" + MarshrutID + "-" + ChasPrybuttya;

            if (f.ShowDialog() == DialogResult.OK) // вивести форму
            {
                // виконати SQL-команду
                MyExecuteNonQuery(SqlText);
                // відобразити таблицю Source
                Reys();
            }
        }
Exemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (textBox5.Text == "admin" && textBox6.Text == "adminhere")
         {
             MessageBox.Show("username and password are correct.");
             uname = textBox5.Text;
             Form14 form = new Form14();
             form.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("username or password are incorrect. Please try again.");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 5
0
        private void Editlabel_Click(object sender, EventArgs e)
        {
            Form14 form = new Form14();

            form.Show();
        }
Exemplo n.º 6
0
Arquivo: 父窗口.cs Projeto: 77XX/X
 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();
     }
 }
Exemplo n.º 7
0
        /// <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;
        }
Exemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form14 form14 = new Form14();

            form14.Show();
        }