public void CreateSetSpeicalDrugRecords(SetSpeicalDrugRecord item) { try { base.Add(item); } catch (Exception ex) { this.HandleException("方法CreateSetSpeicalDrugRecords出错!!!", ex); } }
private void toolStripButton2_Click(object sender, EventArgs e) { if (DrugInventoryId == null) { MessageBox.Show("请选择药品", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } SetSpeicalDrugRecord ssdr = new SetSpeicalDrugRecord(); ssdr.DrugInventoryId = DrugInventoryId; ssdr.MaintainDuetime = Convert.ToInt32(txtMaintainDuetime.Value); ssdr.MaintainEmphasis = txtMaintainEmphasis.Text.Trim(); ssdr.Reason = txtReason.Text.Trim(); ssdr.Memo = txtMemo.Text.Trim(); PharmacyDatabaseService.CreateSetSpeicalDrugRecords(ssdr); this.Close(); }