예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            a = new Login(textBox1.Text, textBox2.Text);
            bool check = a.login();

            if (textBox1.Text != "" && textBox2.Text != "")
            {
                if (check == true)
                {
                    Managementmedicinecs m = new Managementmedicinecs();
                    m.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Invalid User Name or Password");
                    textBox1.BackColor = Color.Red;
                    textBox2.BackColor = Color.Red;
                    textBox1.Clear();
                    textBox2.Clear();
                }
            }
            else
            {
                MessageBox.Show("Please Specify User ID or Password");
            }
        }
예제 #2
0
        private void button14_Click(object sender, EventArgs e)
        {
            m = new medicine();
            if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "")
            {
                m.insert(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);

                MessageBox.Show("Data Inserted");
            }

            else
            {
                MessageBox.Show("Error! Please Insert Complete Data");
            }

            Managementmedicinecs m1 = new Managementmedicinecs();

            m1.Show();
            this.Hide();
        }