Ejemplo n.º 1
0
        private void PictureBox3_Click(object sender, EventArgs e)
        {
            Manage_Medicine mm = new Manage_Medicine();

            this.Close();
            mm.Show();
        }
Ejemplo n.º 2
0
 private void Button3_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow.Index != -1)
     {
         Medicine m = new Medicine();
         m.M_Id = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
         m.deleteMedicine();
         Manage_Medicine mp = new Manage_Medicine();
         this.Close();
         mp.Show();
     }
 }
Ejemplo n.º 3
0
        private void Login_Click(object sender, EventArgs e)
        {
            Medicine m = new Medicine();

            m.Name    = textBox1.Text.ToString();
            m.Company = textBox2.Text.ToString();
            m.M_Date  = dateTimePicker1.Value;
            m.E_Date  = dateTimePicker2.Value;
            m.Price   = Convert.ToInt32(textBox3.Text.ToString());
            m.Unit    = Convert.ToInt32(textBox4.Text.ToString());
            if (login.Text == "SAVE")
            {
                m.addMedicine();
            }
            else
            {
                m.M_Id = v1;
                m.updateMedicine();
            }
            Manage_Medicine mm = new Manage_Medicine();

            this.Close();
            mm.Show();
        }