Пример #1
0
 private void grid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (grid.CurrentRow != null)
     {
         itemForm = new FormAddItem(this, itemType);
         getValues();
         itemForm.medicine.Enabled  = false;
         itemForm.equipment.Enabled = false;
         itemForm.ShowDialog();
     }
 }
Пример #2
0
 private void mbView_Click(object sender, EventArgs e)
 {
     if (grid.CurrentRow != null)
     {
         itemForm = new FormAddItem(this, itemType);
         getValues();
         itemForm.ShowDialog();
     }
     else
     {
         MetroMessageBox.Show(this.Parent.Parent, "No results found.", "EMPTY GRID", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
        private void gridItemLibrary_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int intType = 1;

            if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Medicine"))
            {
                intType = 1;
            }
            else if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Supply"))
            {
                intType = 2;
            }
            else if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Equipment"))
            {
                intType = 3;
            }

            FormAddItem itemForm = new FormAddItem(this, intType);

            getValues(itemForm, intType);
            itemForm.ShowDialog();
        }
Пример #4
0
 private void mbAdd_Click(object sender, EventArgs e)
 {
     itemForm        = new FormAddItem(this, itemType);
     itemForm.choice = 0;
     itemForm.ShowDialog();
 }