Ejemplo n.º 1
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     frmMedicinEdit frmedit = new frmMedicinEdit();
     frmMedicinEdit.IdMedicineEdit = 0;
     frmedit.ShowDialog();
     FillToGrid();
 }
Ejemplo n.º 2
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            frmMedicinEdit frmedit = new frmMedicinEdit();

            frmMedicinEdit.IdMedicineEdit = 0;
            frmedit.ShowDialog();
            FillToGrid();
        }
Ejemplo n.º 3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if ((lblID.Text == "") || (lblID.Text == "0"))
     {
         MessageBox.Show("Bạn hãy chọn bản thuốc cần sửa!");
         return;
     }
     frmMedicinEdit.IdMedicineEdit = int.Parse(lblID.Text);
     frmMedicinEdit frmedit = new frmMedicinEdit();
     frmedit.ShowDialog();
     FillToGrid();
 }
Ejemplo n.º 4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if ((lblID.Text == "") || (lblID.Text == "0"))
            {
                MessageBox.Show("Bạn hãy chọn bản thuốc cần sửa!");
                return;
            }
            frmMedicinEdit.IdMedicineEdit = int.Parse(lblID.Text);
            frmMedicinEdit frmedit = new frmMedicinEdit();

            frmedit.ShowDialog();
            FillToGrid();
        }
Ejemplo n.º 5
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdMedicine = 0;
            }

            else
            {
                IdMedicine = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            frmMedicinEdit.IdMedicineEdit = IdMedicine;
            frmMedicinEdit frmEdit = new frmMedicinEdit();

            frmEdit.ShowDialog();
            FillToGrid();
        }
Ejemplo n.º 6
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdMedicine = 0;
            }

            else
            {
                IdMedicine = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            frmMedicinEdit.IdMedicineEdit = IdMedicine;
            frmMedicinEdit frmEdit = new frmMedicinEdit();
            frmEdit.ShowDialog();
            FillToGrid();
        }