예제 #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         FRM_Add_M FRM = new FRM_Add_M();
         FRM.txtID.Text     = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
         FRM.txtName.Text   = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
         FRM.txtQ.Text      = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
         FRM.txtP.Text      = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
         FRM.comboBox1.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
         FRM.Text           = "تحديث بيانات الدواء : " + this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
         FRM.button2.Text   = "تحديث";
         FRM.state          = "update";
         FRM.txtID.ReadOnly = true;
         FRM.txtID.Enabled  = false;
         byte[]       image = (byte[])med.Get_Image_Medicine(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
         MemoryStream MS    = new MemoryStream(image);
         FRM.pictureBox1.Image = Image.FromStream(MS);
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #2
0
 private void إضافةدواءجديدToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         FRM_Add_M Frm = new FRM_Add_M();
         Frm.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما !", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            FRM_Add_M FRM = new FRM_Add_M();

            FRM.ShowDialog();
        }