예제 #1
0
 private void butAdd_Click(object sender,EventArgs e)
 {
     FormFormularyEdit FormF=new FormFormularyEdit();
     FormF.FormularyCur=new Formulary();
     Formularies.Insert(FormF.FormularyCur);
     FormF.IsNew=true;
     FormF.ShowDialog();
     if(FormF.DialogResult!=DialogResult.OK) {
         FormularyMeds.DeleteMedsForFormulary(FormF.FormularyCur.FormularyNum);
         Formularies.Delete(FormF.FormularyCur.FormularyNum);
         return;
     }
     FillList();
 }
예제 #2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            FormFormularyEdit FormF = new FormFormularyEdit();

            FormF.FormularyCur = new Formulary();
            Formularies.Insert(FormF.FormularyCur);
            FormF.IsNew = true;
            FormF.ShowDialog();
            if (FormF.DialogResult != DialogResult.OK)
            {
                FormularyMeds.DeleteMedsForFormulary(FormF.FormularyCur.FormularyNum);
                Formularies.Delete(FormF.FormularyCur.FormularyNum);
                return;
            }
            FillList();
        }
예제 #3
0
        private void listMain_DoubleClick(object sender, EventArgs e)
        {
            if (listMain.SelectedIndex == -1)
            {
                return;
            }
            if (IsSelectionMode)
            {
                SelectedFormularyNum = ListFormularies[listMain.SelectedIndex].FormularyNum;
                DialogResult         = DialogResult.OK;
                return;
            }
            FormFormularyEdit FormF = new FormFormularyEdit();

            FormF.FormularyCur = ListFormularies[listMain.SelectedIndex];
            FormF.ShowDialog();
            if (FormF.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillList();
        }
예제 #4
0
 private void listMain_DoubleClick(object sender,EventArgs e)
 {
     if(listMain.SelectedIndex==-1) {
         return;
     }
     if(IsSelectionMode) {
         SelectedFormularyNum=ListFormularies[listMain.SelectedIndex].FormularyNum;
         DialogResult=DialogResult.OK;
         return;
     }
     FormFormularyEdit FormF=new FormFormularyEdit();
     FormF.FormularyCur=ListFormularies[listMain.SelectedIndex];
     FormF.ShowDialog();
     if(FormF.DialogResult!=DialogResult.OK) {
         return;
     }
     FillList();
 }