Exemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     Person p1 = new PersonAction().queryOne(Convert.ToInt32(textBox1.Text));
     String str = "挂号业务ID:" + p1.Id + "\n"
                                    + "姓名:" + p1.Name + "\n"
                                    + "年龄:" + p1.Age + "\n"
                                    + "症状:" + p1.Desc + "\n"
                                    + "诊疗方法和建议: " + p1.Medicine + "\n";
     Form myForm = new Form7(str);
     myForm.ShowDialog();
 }
Exemplo n.º 2
0
        private void демонстрационныеРежимыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources.ИБзаставка1;
            Form7 f1 = new Form7();

            f1.Hide();
            f1.Show();
            f1.label2.Text       = "1";
            f1.Text              = "Демонстрационные режимы";
            richTextBox1.Visible = false;
            richTextBox2.Visible = false;
            //richTextBox3.Visible = false;
        }
Exemplo n.º 3
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (table == 0)
     {
         Form6 formChild = new Form6(deledit);
         formChild.Show();
     }
     else
     {
         Form7 formChild = new Form7(deledit);
         formChild.Show();
     }
 }
Exemplo n.º 4
0
        private void toolsMenu_Click(object sender, EventArgs e)
        {
            if (this.checkChildFrmExist("Form7") == true)
            {
                return;
            }
            Form fm7 = new Form7();

            fm7.MdiParent   = this;
            fm7.WindowState = FormWindowState.Maximized;
            //fm7.Dock = true;
            fm7.Show();
        }
Exemplo n.º 5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (flag)
     {
         Form7 f7 = new Form7();
         this.Hide();
         f7.Show();
     }
     else
     {
         MessageBox.Show("Press Test First");
     }
 }
 private void button2_Click(object sender, EventArgs e)
 {
     //If there is no Form 7 instance
     if (f7 == null)
     {
         //Instantiate Form 7
         f7 = new Form7();
     }
     //Show the new Form 7 instance
     f7.Show();
     //Set Form 7's Form 3 variable as this instance
     f7.f3 = this;
     //Hide this form
     this.Hide();
 }
Exemplo n.º 7
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            //this.Hide();
            // Form7 = new Form7();
            // aa.Show();
            try
            {
                // Donot make any changes
                connection.Open();
                OleDbCommand command = new OleDbCommand();
                command.Connection  = connection;
                command.CommandText = "SELECT * from Data where username = '******' and Password = '******'";
                OleDbDataReader reader = command.ExecuteReader();

                int count = 0;

                while (reader.Read())
                {
                    //count = count + 1;
                    count++;
                }
                if (count == 1)
                {
                    // MessageBox.Show("Welcome!!!");

                    connection.Close();
                    connection.Dispose();
                    this.Hide();
                    Form7 f7 = new Form7();
                    f7.ShowDialog();
                }
                else if (count > 1)
                {
                    MessageBox.Show(" Incorrect username and password!!!");
                }
                else
                {
                    MessageBox.Show(" Username and Password is not correct!!!");
                }

                connection.Close();
            }

            catch (Exception x)
            {
                MessageBox.Show("Error try again!!!" + x);
            }
        }
Exemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            name1 = textBox1.Text;
            name2 = textBox2.Text;

            if (name1 == "" || name2 == "")
            {
                MessageBox.Show("You must enter your name !");
            }
            else
            {
                this.Hide();
                Form7 f7 = new Form7();
                f7.Show();
            }
        }
        private void button6_Click(object sender, EventArgs e)
        {
            Program.flightnum = new List <string>();
            int i = 1;

            while (i <= Program.FlightList.GetLength())
            {
                Flight flight = Program.FlightList.GetElem(i);
                Program.flightnum.Add(flight.FlightNum);
                i++;
            }

            Form7 form7 = new Form7();

            form7.StartPosition = FormStartPosition.CenterScreen;
            form7.ShowDialog();
        }
Exemplo n.º 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool l, k;

            localhost.Service1 s = new localhost.Service1();
            s.isadmin(txtname.Text, txtpassword.Text, out l, out k);
            if (l)
            {
                Form7 f = new Form7();
                f.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("enter  valid information");
            }
        }
Exemplo n.º 11
0
        private void button3_Click(object sender, EventArgs e)
        {
            conn.oleDbConnection1.Open();
            OleDbCommand    cmd = new OleDbCommand("select VID from vendor", conn.oleDbConnection1);
            OleDbDataReader dr  = cmd.ExecuteReader();

            while (dr.Read())
            {
                comboBox1.Items.Add(dr["VID"].ToString());
            }
            conn.oleDbConnection1.Close();


            Form7 F7 = new Form7();

            F7.Show();
            this.Hide();
        }
Exemplo n.º 12
0
        private void обучающийРежимToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources.ИБзаставка1;
            Form7 f1 = new Form7();

            f1.Hide();
            f1.Show();
            f1.label2.Text       = "3";
            f1.button4.Visible   = true;
            f1.textBox2.Visible  = true;
            f1.button1.Visible   = false;
            f1.button2.Visible   = false;
            f1.button3.Visible   = false;
            f1.pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources.ИБ_имя_ч_л_к_ч;
            f1.textBox2.Text     = "";
            f1.Text = "Обучающий режим";
            richTextBox1.Visible = false;
            richTextBox2.Visible = false;
        }
Exemplo n.º 13
0
        private void btn_confirm_Click(object sender, EventArgs e)
        {
            try
            {
                string       sqlSearch = "select * from AdminPassword where Adm='" + username1 + "'";
                OleDbCommand command   = new OleDbCommand(sqlSearch, connection);
                connection.Open();
                command.Connection = connection;
                OleDbDataReader dr = command.ExecuteReader();
                if (dr.Read())
                {
                    if (txt_new.Text == txt_confirm.Text)
                    {
                        string       sqlUpdate = "update AdminPassword set Pass='******' where Adm='" + username1 + "'";
                        OleDbCommand cmdd      = new OleDbCommand(sqlUpdate, connection);
                        cmdd.ExecuteNonQuery();
                        MessageBox.Show("Successfully updated");

                        this.Hide();
                        Form7 f7 = new Form7(username1);
                        f7.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("Please retype your new password correctly");
                    }
                }
                else
                {
                    MessageBox.Show("No record found");
                }
                connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error   " + ex);
            }
            this.Hide();
            Form3 f3 = new Form3(username1);

            f3.ShowDialog();
        }
Exemplo n.º 14
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         MessageBox.Show("不正解");
         Form7 fome7 = new Form7();
         fome7.Show();
         this.Close();
     }
     if (radioButton2.Checked)
     {
         MessageBox.Show("不正解");
         Form7 fome7 = new Form7();
         fome7.Show();
         this.Close();
     }
     if (radioButton3.Checked)
     {
         MessageBox.Show("不正解");
         Form7 fome7 = new Form7();
         fome7.Show();
         this.Close();
     }
     if (radioButton4.Checked)
     {
         MessageBox.Show("不正解");
         Form7 fome7 = new Form7();
         fome7.Show();
         this.Close();
     }
     if (radioButton5.Checked)
     {
         MessageBox.Show("不正解");
         Form7 fome7 = new Form7();
         fome7.Show();
         this.Close();
     }
 }
Exemplo n.º 15
0
        private void label8_Click(object sender, EventArgs e)
        {
            Form7 f7 = new Form7();

            f7.Show();
        }
Exemplo n.º 16
0
        private void товарыИЗаказыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form f7 = new Form7();

            f7.Show();
        }
Exemplo n.º 17
0
        private void notaMesatareToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form7 form7 = new Form7();

            form7.Show();
        }
Exemplo n.º 18
0
        private void button8_pClick(object sender, EventArgs e)
        {
            Form7 frm = new Form7();

            frm.Show();
        }
 private void btn_back_Click(object sender, EventArgs e)
 {
     this.Hide();
     Form7 f7 = new Form7(username1);
     f7.ShowDialog();
 }
Exemplo n.º 20
0
        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;
            }
        }
Exemplo n.º 21
0
 private void showForm7ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form7 objektForm7 = new Form7();
       objektForm7.Show();
 }
Exemplo n.º 22
0
        private void Button1_Click_1(object sender, EventArgs e)
        {
            Form7 newpizza = new Form7();

            newpizza.Show();
        }
Exemplo n.º 23
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Visible = false;
     Form7 connectionMode = new Form7();
     connectionMode.Show();
 }
Exemplo n.º 24
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Form7 loginform = new Form7();

            if (loginform.ShowDialog() != DialogResult.OK)
            {
                Application.Exit();
            }
            else
            {
                if(loginform.employeeposition == "attendant")
                 {
                     addItemToolStripMenuItem.Enabled = false;
                     addSupplierToolStripMenuItem.Enabled = false;
                     upToolStripMenuItem.Enabled = false;
                     salesToolStripMenuItem.Enabled = false;
                     addCashierSaleToolStripMenuItem.Enabled = false;
                     toolStripButton5.Enabled = false;
                     toolStripButton4.Enabled = false;
                     toolStripButton6.Enabled = false;
                     toolStripButton3.Enabled = false;
                 }
                if (loginform.employeeposition == "cashier")
                {
                    addItemToolStripMenuItem.Enabled = false;
                    addSupplierToolStripMenuItem.Enabled = false;
                    upToolStripMenuItem.Enabled = false;
                    toolStripButton4.Enabled = false;
                    toolStripButton3.Enabled = false;
                }
                this.user = loginform.user;
                this.pos = loginform.employeeposition;
                this.label1.Text = String.Format("Position: {0}", pos.ToUpper());
                this.label2.Text = String.Format("Username: {0}", user);
                this.squery = "items";
                db.connect();
            }
        }
Exemplo n.º 25
0
        private void button10_Click(object sender, EventArgs e)
        {
            Form7 f7 = new Form7();

            f7.Show(); this.Hide();
        }
Exemplo n.º 26
0
        private void button4_Click(object sender, EventArgs e)
        {
            Form7 form7 = new Form7();

            form7.Show();
        }
Exemplo n.º 27
0
 // View Map Matrix
 private void button17_Click(object sender, EventArgs e)
 {
     matrixEditorPath = matrixPath + "\\" + comboBox1.SelectedIndex.ToString("D4");
     Form7 matrixViewer = new Form7();
     matrixViewer.ShowDialog(this);
 }
Exemplo n.º 28
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form7 f7 = new Form7(this.email.Text.ToString());

            f7.Show();
        }
Exemplo n.º 29
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form7 f7 = new Form7();

            f7.ShowDialog();
        }
Exemplo n.º 30
0
 private void button7_Click(object sender, EventArgs e)
 {
     Form7 form77 = new Form7();
     form77.ShowDialog();
 }
Exemplo n.º 31
0
        private void button4_Click_1(object sender, EventArgs e)
        {
            Form7 yeni = new Form7();

            yeni.Show();
        }
Exemplo n.º 32
0
        private void button7_Click(object sender, EventArgs e)
        {
            Form f7 = new Form7();

            f7.Show();
        }
Exemplo n.º 33
0
        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form fm7 = new Form7();

            fm7.Show();
        }
Exemplo n.º 34
0
        private void AtenderServidor()
        {
            while (true)
            {
                //Recibimos la respuesta del servidor //  7/invitador
                byte[] msg2 = new byte[80];
                server.Receive(msg2);
                string[] trozos  = Encoding.ASCII.GetString(msg2).Split('/');
                int      codigo  = Convert.ToInt32(trozos[0]);
                string   mensaje = trozos[1].Split('\0')[0];
                Form6    F6      = new Form6();
                Form7    F7      = new Form7();
                string[] seg;
                string   invitador;
                int      numInvitados;
                string   invitado;
                string   respuesta;

                switch (codigo)
                {
                case 1:    //Puedo crear una cuenta

                    MessageBox.Show(mensaje);
                    break;

                case 2:    //Puedo iniciar sesión? Recibo un mensaje de la forma Y_Usuario o N

                    string[] segmentos = mensaje.Split('_');

                    if (segmentos[0] == "Y")
                    {
                        MessageBox.Show("Has sido autenticado correctamente!!!");
                        usuario     = segmentos[1];
                        label1.Text = "Has iniciado sesión como: " + usuario;
                    }
                    else if (segmentos[0] == "N")
                    {
                        MessageBox.Show("Contraseña incorrecta");
                    }
                    else if (segmentos[0] == "USER")
                    {
                        MessageBox.Show("El usuario no existe.");
                    }

                    break;

                case 3:    //Hay ganadores para una fecha?

                    if (mensaje == "NOT_FOUND")
                    {
                        MessageBox.Show("No hay ganadores para esta fecha");
                    }
                    else
                    {
                        MessageBox.Show(mensaje);
                    }
                    break;

                case 4:    //Hay ganadores para una duración?

                    if (mensaje == "NOT_FOUND")
                    {
                        MessageBox.Show("No hay ganadores con la duracion de partida proporcionada ");
                    }
                    else
                    {
                        MessageBox.Show(mensaje);
                    }
                    break;

                case 5:    //Que usuarios hay conectados?

                    F6.setListado(mensaje);
                    F6.setUsuario(usuario);
                    F6.ShowDialog();
                    break;

                case 6:                   //Hay una notificación de nuevo conectado!

                    conectados = mensaje; //  2_anakilator_juanito23
                    F6.setListado(conectados);
                    F6.setUsuario(usuario);
                    F6.ShowDialog();
                    break;

                case 7:    //Hay una invitación: 7/invitador_numInvitados_invitado


                    seg = mensaje.Split(new char[] { '_' }, 3);


                    invitador    = seg[0];
                    numInvitados = Convert.ToInt32(seg[1]);
                    invitado     = seg[2];



                    if (invitador != usuario)
                    {
                        MessageBox.Show("Hola " + usuario + ", " + invitador + " te ha invitado a jugar!");
                        F7.setListado(conectados);
                        F7.setInvitador(invitador);
                        F7.ShowDialog();
                        respuesta = F7.GetRespuesta();
                        //Enviamos petición con la respuesta de la invitacion
                        string mensj = "8/" + invitador + "/" + numInvitados + "/" + invitado + "/" + respuesta;
                        byte[] msg   = System.Text.Encoding.ASCII.GetBytes(mensj);
                        server.Send(msg);
                    }
                    break;

                case 8:     //Recibimos respuesta de la invitacion: 8/invitador/num_invitados/invitado/siOno

                    seg = mensaje.Split(new char[] { '_' }, 4);


                    invitador = seg[0];
                    //numInvitados = Convert.ToInt32(seg[1]);
                    invitado  = seg[2];
                    respuesta = seg[3];

                    if (respuesta == "no")
                    {
                        MessageBox.Show(invitado + " ha rechazado la invitación");
                    }
                    else
                    {
                        F8.setInvitador(invitador);
                        F8.setUsuario(invitado);
                        F8.ShowDialog();
                    }
                    break;
                }
            }
        }
Exemplo n.º 35
0
 private void button_prog_edit_Click(object sender, EventArgs e)
 {
     Form7 FormaSiodma = new Form7(this);
     FormaSiodma.Owner = this;
     FormaSiodma.ShowDialog();
 }
Exemplo n.º 36
0
 //登录按键响应事件
 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();
 }
Exemplo n.º 37
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            Form7 f7 = new Form7();

            f7.Show();
        }
Exemplo n.º 38
0
 private void listadoOrdenTrabajoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form7 form7 = new Form7();
     form7.MdiParent = this;
     form7.Show();
 }