private void butAdd_Click(object sender,EventArgs e) {
			FormAllergyDefEdit formA=new FormAllergyDefEdit();
			formA.AllergyDefCur=new AllergyDef();
			formA.AllergyDefCur.IsNew=true;
			formA.ShowDialog();
			FillGrid();
		}
示例#2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            FormAllergyDefEdit formA = new FormAllergyDefEdit();

            formA.AllergyDefCur       = new AllergyDef();
            formA.AllergyDefCur.IsNew = true;
            formA.ShowDialog();
            FillGrid();
        }
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			if(IsSelectionMode) {
				SelectedAllergyDefNum=listAllergyDefs[e.Row].AllergyDefNum;
				DialogResult=DialogResult.OK;
			}
			else {
				FormAllergyDefEdit formA=new FormAllergyDefEdit();
				formA.AllergyDefCur=listAllergyDefs[gridMain.GetSelectedIndex()];
				formA.ShowDialog();
				FillGrid();
			}
		}
示例#4
0
 private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
 {
     if (IsSelectionMode)
     {
         SelectedAllergyDefNum = listAllergyDefs[e.Row].AllergyDefNum;
         DialogResult          = DialogResult.OK;
     }
     else
     {
         FormAllergyDefEdit formA = new FormAllergyDefEdit();
         formA.AllergyDefCur = listAllergyDefs[gridMain.GetSelectedIndex()];
         formA.ShowDialog();
         FillGrid();
     }
 }
        private void AddAllergy(SheetFieldDef SheetFieldDefCur)
        {
            FormAllergyDefEdit formADE = new FormAllergyDefEdit();

            formADE.AllergyDefCur             = new AllergyDef();
            formADE.AllergyDefCur.IsNew       = true;
            formADE.AllergyDefCur.Description = SheetFieldDefCur?.FieldName.Replace("allergy:", "") ?? "";
            formADE.ShowDialog();
            if (formADE.DialogResult != DialogResult.OK)
            {
                return;
            }
            _listAllergies.Add(formADE.AllergyDefCur);
            FillListMedical(MedicalListType.allergy);
        }