public DrugAdmin() { drugMgr = new DrugMgr(); InitializeComponent(); DSP_addSubDrug.setDSPform(this); DSP_addSubDrug.setSubDrugEnabled(true); DSP_addSubDrug.setSubDrugSelectionEnabled(false); DSP_addSubDrug.setSubDrugInclNotSpecified(false); DSP_addSubDrug.setShowDeletedItemCB(false); DSP_addSubDrug.setShowDeletedItem(false); DSP_amdDrug.setDSPform(this); DSP_amdDrug.setSubDrugEnabled(true); DSP_amdDrug.setSubDrugSelectionEnabled(true); DSP_amdDrug.setSubDrugInclNotSpecified(true); DSP_amdDrug.setShowDeletedItemCB(true); DSP_amdDrug.setShowDeletedItem(false); DSP_incompatibleWith.setDSPform(this); DSP_incompatibleWith.setSubDrugEnabled(false); DSP_incompatibleWith.setSubDrugSelectionEnabled(false); DSP_incompatibleWith.setSubDrugInclNotSpecified(false); DSP_incompatibleWith.setShowDeletedItemCB(false); DSP_incompatibleWith.setShowDeletedItem(true); }
private void button_addPredefPres_Click(object sender, EventArgs e) { if (input_validation()) { DrugMgr drugMgr = new DrugMgr(); String statusMsg = ""; bool isSuccess; isSuccess = drugMgr.insertPredefinedPrescription(textBox_presName.Text.Trim(), prescriptionPanel1.getPrescriptionDataString(), ref statusMsg); if (isSuccess) { MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information); button_addPredefPres_reset_Click(sender, e); } else { MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }