Exemple #1
0
        private void gridPat_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            PatField field = PatFields.GetByName(PatFieldDefs.List[e.Row].FieldName, listPatientFields);

            if (field == null)
            {
                field           = new PatField();
                field.PatNum    = PatCur.PatNum;
                field.FieldName = PatFieldDefs.List[e.Row].FieldName;
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Text)
                {
                    FormPatFieldEdit FormPF = new FormPatFieldEdit(field);
                    FormPF.IsNew = true;
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.PickList)
                {
                    FormPatFieldPickEdit FormPF = new FormPatFieldPickEdit(field);
                    FormPF.IsNew = true;
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Date)
                {
                    FormPatFieldDateEdit FormPF = new FormPatFieldDateEdit(field);
                    FormPF.IsNew = true;
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Checkbox)
                {
                    FormPatFieldCheckEdit FormPF = new FormPatFieldCheckEdit(field);
                    FormPF.IsNew = true;
                    FormPF.ShowDialog();
                }
            }
            else
            {
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Text)
                {
                    FormPatFieldEdit FormPF = new FormPatFieldEdit(field);
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.PickList)
                {
                    FormPatFieldPickEdit FormPF = new FormPatFieldPickEdit(field);
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Date)
                {
                    FormPatFieldDateEdit FormPF = new FormPatFieldDateEdit(field);
                    FormPF.ShowDialog();
                }
                if (PatFieldDefs.List[e.Row].FieldType == PatFieldType.Checkbox)
                {
                    FormPatFieldCheckEdit FormPF = new FormPatFieldCheckEdit(field);
                    FormPF.ShowDialog();
                }
            }
            FillGridPat();
        }
Exemple #2
0
 private void gridPat_CellDoubleClick(object sender, ODGridClickEventArgs e)
 {
     if (gridPat.Rows[e.Row].Tag is PatFieldDef)             //patfield for an existing PatFieldDef
     {
         PatFieldDef patFieldDef = (PatFieldDef)gridPat.Rows[e.Row].Tag;
         PatField    field       = PatFields.GetByName(patFieldDef.FieldName, _arrayPatientFields);
         PatFieldL.OpenPatField(field, patFieldDef, _patCur.PatNum, true);
     }
     else if (gridPat.Rows[e.Row].Tag is PatField)             //PatField for a PatFieldDef that no longer exists
     {
         PatField         field  = (PatField)gridPat.Rows[e.Row].Tag;
         FormPatFieldEdit FormPF = new FormPatFieldEdit(field);
         FormPF.IsLaunchedFromOrtho = true;
         FormPF.ShowDialog();
     }
     FillGridPat();
 }