コード例 #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
ファイル: UCItemLibrary.cs プロジェクト: ruban258/pupimedv3
        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();
 }