コード例 #1
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     if (dgvMedicine.CurrentRow != null)
     {
         Medicine medicine = new Medicine()
         {
             MedId         = dgvMedicine.CurrentRow.Cells["MedID"].Value.ToString(),
             MedName       = dgvMedicine.CurrentRow.Cells["MedName"].Value.ToString(),
             MedStandard   = dgvMedicine.CurrentRow.Cells["MedStandard"].Value.ToString(),
             MedTypeId     = dgvMedicine.CurrentRow.Cells["MedTypeID"].Value.ToString(),
             MedUnit       = dgvMedicine.CurrentRow.Cells["MedUnit"].Value.ToString(),
             MedApproval   = dgvMedicine.CurrentRow.Cells["MedApproval"].Value.ToString(),
             MedSpellFirst = dgvMedicine.CurrentRow.Cells["MedSpellFirst"].Value.ToString()
         };
         FrmCreateMed frmCreateMed = new FrmCreateMed(medicine);
         frmCreateMed.ShowDialog();
         btnSearch_Click(null, null);
     }
     else
     {
         MessageBox.Show(@"请选择需要操作的药品!");
     }
 }
コード例 #2
0
        private void sbtnCreate_Click(object sender, EventArgs e)
        {
            FrmCreateMed frmCreateMed = new FrmCreateMed();

            frmCreateMed.ShowDialog();
        }