using System.Windows.Forms; using System.Data; namespace Louis__Pharmacy_CNSA212_FP { public partial class frmMedication : Form { public frmMedication(frmInfo sourceForm, bool isNew) { InitializeComponent(); } public void FillMedication(string rxID) { var ds = new DataSet(); var data = new PharmacyDataTier(); ds = PharmacyDataTier.MedicationInfoSearch(rxID); txtMedID.Text = ds.Tables[0].Rows[0]["Medication_id"].ToString(); txtName.Text = ds.Tables[0].Rows[0]["MedicationName"].ToString(); txtIntake.Text = ds.Tables[0].Rows[0]["IntakeMethod"].ToString(); txtFrequency.Text = ds.Tables[0].Rows[0]["Frequency"].ToString(); txtDosage.Text = ds.Tables[0].Rows[0]["Dosage"].ToString(); txtPurpose.Text = ds.Tables[0].Rows[0]["Purpose"].ToString(); txtRxNum.Text = ds.Tables[0].Rows[0]["RxNum"].ToString(); } } }