Exemplo n.º 1
0
 private void button9_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "")
     {
         m = new medicine();
         dataGridView1.Show();
         dataGridView1.DataSource = m.select(Convert.ToInt32(comboBox1.Text)).Tables[0];
     }
     else
     {
         MessageBox.Show("Please Select An Id");
     }
 }
Exemplo n.º 2
0
        private void button12_Click(object sender, EventArgs e)
        {
            if (comboBox3.Text != "")
            {
                m = new medicine();
                m.delete(Convert.ToInt32(comboBox3.Text));
                MessageBox.Show("Data Deleted");

                string a = comboBox3.Text;
                m.select(Convert.ToInt32(a));
            }
            else
            {
                MessageBox.Show("Please Select An Id");
            }
        }
Exemplo n.º 3
0
        private void button13_Click(object sender, EventArgs e)
        {
            if (comboBox2.Text != "" && textBox8.Text != "" && textBox7.Text != "" && textBox6.Text != "" && textBox5.Text != "")
            {
                m = new medicine();
                m.update(Convert.ToInt32(comboBox2.Text), textBox8.Text, textBox7.Text, textBox6.Text, textBox5.Text);
                MessageBox.Show("Data Updated");

                textBox5.Clear();
                textBox6.Clear();
                textBox7.Clear();
                textBox8.Clear();
            }
            else
            {
                MessageBox.Show("Please Select An Id And Insert Data");
            }
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
0
 private void button11_Click(object sender, EventArgs e)
 {
     m = new medicine();
     dataGridView1.Show();
     dataGridView1.DataSource = m.select().Tables[0];
 }