示例#1
0
        private void pictureBox5_Click(object sender, EventArgs e)
        {
            Class1.index = 0;
            Form10 f10 = new Form10();

            f10.Show();
            timer1.Enabled = true;
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form10 f = new Form10();

            this.Hide();
            f.ShowDialog();
            Close();
        }
示例#3
0
 private void pictureBox10_Click(object sender, EventArgs e)
 {
     if (Class1.min == Class1.max && Class1.min == 0)
     {
         MessageBox.Show("no images analyzed!");
     }
     else
     {
         Form10 f10 = new Form10();
         f10.Show();
         timer1.Enabled = true;
     }
 }
示例#4
0
文件: Form3.cs 项目: pharinp/Python
 private void button1_Click(object sender, EventArgs e) //ย้อนกลับหน้าแรก
 {
     if (Program.checkstatus == "ADMIN")                //เช็คระบบadmin
     {
         Form2 a = new Form2();
         this.Hide();
         a.Show();
     }
     else
     {
         Form10 a = new Form10();
         this.Hide();
         a.Show();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton3.Checked == true)
            {
                d = 1;
            }
            else
            {
                d = 2;
            }
            Form10 form = new Form10();

            form.Show();
            this.Hide();
        }
示例#6
0
        private void login_press()
        {
            MySqlConnection conn = databaseConnection();

            conn.Open();
            MySqlCommand cmd;

            cmd             = conn.CreateCommand();
            cmd.CommandText = $"SELECT * FROM members WHERE member_user=\"{user.Text}\" AND member_password=\"{pass.Text}\"";
            MySqlDataReader rowss = cmd.ExecuteReader();

            if (rowss.HasRows)
            {
                rowss.Read();
                //เลือกข้อมูลจากตารางมาแสดง
                Program.checkname     = rowss.GetString("member_name");
                Program.checklastname = rowss.GetString("member_lastname");
                Program.checkstatus   = rowss.GetString("member_status");
                if (Program.checkstatus == "ADMIN")//เช็คระบบadmin
                {
                    MessageBox.Show("เข้าสู่ระบบ Admin แล้ว ", "Alert");
                    // MessageBox.Show($"เข้าสู่ระบบแล้ว \"{Program.checkname}\"", "Alert",MessageBoxButtons.OK,MessageBoxIcon.Information);//โชว์ชื่อหน้าล็อคอิน
                    Form2 a = new Form2();
                    this.Hide();
                    a.Show();
                }
                else
                {
                    MessageBox.Show("เข้าสู่ระบบแล้ว ", "Alert");
                    Form10 a = new Form10();
                    this.Hide();
                    a.Show();
                }
            }
            else
            {
                MessageBox.Show("ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง ", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                user.Text = ""; //คำสั่งเคลียร์
                pass.Clear();   //คำสั่งเคลียร์
                user.Focus();   //คำสั่งเคลียร์
            }
        }
示例#7
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            MySqlConnection conn = databaseConnection();

            conn.Open();
            MySqlCommand cmd;

            cmd             = conn.CreateCommand();
            cmd.CommandText = $"SELECT * FROM members WHERE member_user=\"{user.Text}\" AND member_password=\"{pass.Text}\"";
            MySqlDataReader rowss = cmd.ExecuteReader();

            rowss.Read();
            if (rowss.HasRows)
            {
                Program.checkstatus = rowss.GetString("member_status");
                if (Program.checkstatus == "ADMIN")//เช็คระบบadmin
                {
                    MessageBox.Show("เข้าสู่ระบบ Admin แล้ว ", "Alert");
                    Form2 a = new Form2();
                    this.Hide();
                    a.Show();
                }
                else
                {
                    MessageBox.Show("เข้าสู่ระบบแล้ว ", "Alert");
                    Form10 a = new Form10();
                    this.Hide();
                    a.Show();
                }
            }
            else
            {
                MessageBox.Show("ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง ", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                user.Text = ""; //คำสั่งเคลียร์
                pass.Clear();   //คำสั่งเคลียร์
                user.Focus();   //คำสั่งเคลียร์
            }
            conn.Close();
        }
示例#8
0
文件: 父窗口.cs 项目: 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();
     }
 }
示例#9
0
        private void button7_Click(object sender, EventArgs e)
        {
            Form10 form10 = new Form10();

            form10.Show();
        }
示例#10
0
        private void button9_Click(object sender, EventArgs e)
        {
            Form10 f = new Form10();

            f.ShowDialog();
        }
示例#11
0
文件: Form8.cs 项目: Ionnier/Atestat
        private void Form8_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                button1.PerformClick();
            }

            if (e.KeyCode == Keys.Oemplus || e.KeyCode == Keys.Add)
            {
                if (tabel == 1)
                {
                    string html2 = string.Empty;
                    int    zi    = DateTime.Today.Day;
                    int    an    = DateTime.Today.Year;
                    int    luna  = DateTime.Today.Month;
                    string url2  = @"https://*****:*****@"https://localhost:8080/createproduct";
                     * // https://localhost:8080/createbill?zi=3&luna=14&an=2444
                     *
                     * HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url2);
                     * request.AutomaticDecompression = DecompressionMethods.GZip;
                     * using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                     * using (Stream stream = response.GetResponseStream())
                     * using (StreamReader reader = new StreamReader(stream))
                     * {
                     *  html2 = reader.ReadToEnd();
                     * }
                     *
                     *
                     * if (html2 == "Executat")
                     * {
                     *  populateDGV2();
                     * }
                     * else if (html2 == "Baza de date offline")
                     * {
                     *  MessageBox.Show("Baza de date offline", "Eroare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     * }
                     */
                }

                else if (tabel == 3)
                {
                }
            }

            if (e.KeyCode == Keys.Delete)
            {
                if (tabel == 1)
                {
                    if (dataGridView1.SelectedRows.Count == 0)
                    {
                    }
                    else
                    {
                        int counterr = 0;
                        foreach (DataGridViewRow row in dataGridView1.SelectedRows)
                        {
                            int indexx = int.Parse(row.Index.ToString());

                            int id;
                            id = int.Parse(dataGridView1.Rows[indexx].Cells["ID"].Value.ToString());

                            string html23 = string.Empty;
                            string url23  = @"https://*****:*****@"https://localhost:8080/deletegridproduct?id=" + id + "&tip=" + ctip;

                            // https://localhost:8080/deletegridu?id=14
                            Console.WriteLine(url23);
                            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url23);
                            request.AutomaticDecompression = DecompressionMethods.GZip;
                            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                                using (Stream stream = response.GetResponseStream())
                                    using (StreamReader reader = new StreamReader(stream))
                                    {
                                        html23 = reader.ReadToEnd();
                                    }


                            if (html23 == "Executat")
                            {
                                counterr = 1;
                            }
                        }
                        if (counterr == 0)
                        {
                            MessageBox.Show("Baza de date offline", "Eroare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                        else
                        {
                            populateDGV2();
                        }
                    }
                }

                else if (tabel == 3)
                {
                }
            }

            if (e.Control & e.KeyCode.ToString() == "S")
            {
                if (tabel != 0)
                {
                    using (Form7 form7 = new Form7())
                    {
                        if (form7.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            if (form7.SelectedText == "CSV")
                            {
                                if (tabel == 1)
                                {
                                    SaveToCSV(dataGridView1);
                                }
                                else
                                if (tabel == 2)
                                {
                                    SaveToCSV(dataGridView2);
                                }
                                else
                                if (tabel == 3)
                                {
                                    SaveToCSV(dataGridView3);
                                }
                                else
                                if (tabel == 4)
                                {
                                    SaveToCSV(dataGridView4);
                                }
                            }
                            else if (form7.SelectedText == "PDF")
                            {
                                if (tabel == 1)
                                {
                                    SavePDF(dataGridView1, "Facturi");
                                }
                                else
                                if (tabel == 2)
                                {
                                    SavePDF(dataGridView2, "Produse");
                                }
                                else
                                if (tabel == 3)
                                {
                                    SavePDF(dataGridView3, "Calculatoare");
                                }
                                else
                                if (tabel == 4)
                                {
                                    SavePDF(dataGridView4, "Telefoane");
                                }
                            }
                        }
                    }
                }

                /* if (tabel == 1) {
                 *  SavePDF(dataGridView1);
                 *
                 * } if (tabel == 2)
                 * {
                 *  SaveToCSV(dataGridView2);
                 * }*/
            }

            if (e.KeyCode == Keys.G)
            {
                if (tabel == 2)
                {
                    if (dataGridView2.SelectedRows.Count == 0)
                    {
                    }
                    else
                    {
                        int counterr = 0;
                        foreach (DataGridViewRow row in dataGridView2.SelectedRows)
                        {
                            int indexx = int.Parse(row.Index.ToString());

                            int id;
                            id = int.Parse(dataGridView2.Rows[indexx].Cells["ID"].Value.ToString());
                            string html23 = string.Empty;
                            string url23  = @"https://localhost:8080/generatesale?produs=" + id;

                            // https://localhost:8080/deletegridu?id=14
                            Console.WriteLine(url23);
                            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url23);
                            request.AutomaticDecompression = DecompressionMethods.GZip;
                            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                                using (Stream stream = response.GetResponseStream())
                                    using (StreamReader reader = new StreamReader(stream))
                                    {
                                        html23 = reader.ReadToEnd();
                                    }


                            if (html23 == "Executat")
                            {
                                counterr = 1;
                            }
                        }
                        if (counterr == 0)
                        {
                            MessageBox.Show("Baza de date offline", "Eroare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                        else
                        {
                            populateDGV2();
                        }
                    }
                }
            }

            if (e.KeyCode == Keys.R)
            {
                using (Form11 f8 = new Form11())
                {
                    f8.ShowDialog(this);
                }
            }
        }
        private void openform10()
        {
            Form10 f10 = new Form10();

            Application.Run(f10);
        }
示例#13
0
        private void контактыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form10 f10 = new Form10();

            f10.ShowDialog();
        }
示例#14
0
        private void hücreSaymaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form10 invert = new Form10();

            invert.ShowDialog();
        }
示例#15
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;
        }
示例#16
0
 public Form2(Form10 frm)
 {
     this.frm = frm;
     InitializeComponent();
     dataGridView1.RowHeadersVisible = false;
 }
示例#17
0
        private void Editlabel_Click(object sender, EventArgs e)
        {
            Form10 form = new Form10();

            form.Show();
        }