示例#1
0
        private void addConcreteMedLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MedicamentForm mf = new MedicamentForm();

            mf.ShowDialog();

            if (mf.CurrentMedicament != null)
            {
                medicamentsList.Add(mf.CurrentMedicament);
                concreteMedTable.Refresh();
            }
        }
示例#2
0
        private void addFromCopyConcreteMedLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Medicament     selectedMedicament = concreteMedTable.SelectedRows[0].DataBoundItem as Medicament;
            MedicamentForm mf = new MedicamentForm(selectedMedicament.Id, true);

            mf.ShowDialog();

            if (mf.CurrentMedicament != null)
            {
                medicamentsList.Add(mf.CurrentMedicament);
                concreteMedTable.Refresh();
            }
        }
示例#3
0
        private void concreteMedTable_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Medicament     selectedMedicament = concreteMedTable.SelectedRows[0].DataBoundItem as Medicament;
            MedicamentForm mf = new MedicamentForm(selectedMedicament.Id, false);

            mf.ShowDialog();

            if (mf.CurrentMedicament != null)
            {
                selectedMedicament.AgentDozages     = mf.CurrentMedicament.AgentDozages;
                selectedMedicament.FullName         = mf.CurrentMedicament.FullName;
                selectedMedicament.MedicamentNameId = mf.CurrentMedicament.MedicamentNameId;
                selectedMedicament.MedicamentType   = mf.CurrentMedicament.MedicamentType;
                selectedMedicament.MedicamentTypeId = mf.CurrentMedicament.MedicamentTypeId;
                selectedMedicament.NumInPack        = mf.CurrentMedicament.NumInPack;
                selectedMedicament.Price            = mf.CurrentMedicament.Price;
            }
        }