Пример #1
0
 public static OSGeo.FDO.Schema.PropertyValueConstraint GetConstraint()
 {
     ValueConstraintDialog dlg = new ValueConstraintDialog();
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         return dlg.Constraint;
     }
     return null;
 }
Пример #2
0
        public static OSGeo.FDO.Schema.PropertyValueConstraint GetConstraint()
        {
            ValueConstraintDialog dlg = new ValueConstraintDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                return(dlg.Constraint);
            }
            return(null);
        }
Пример #3
0
 public static OSGeo.FDO.Schema.PropertyValueConstraint GetConstraint(PropertyValueConstraint constraint, FdoConnection conn)
 {
     ValueConstraintDialog dlg = new ValueConstraintDialog(conn);
     dlg.Constraint = constraint;
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         return dlg.Constraint;
     }
     return null;
 }
Пример #4
0
        public static OSGeo.FDO.Schema.PropertyValueConstraint GetConstraint(PropertyValueConstraint constraint, FdoConnection conn)
        {
            ValueConstraintDialog dlg = new ValueConstraintDialog(conn);

            dlg.Constraint = constraint;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                return(dlg.Constraint);
            }
            return(null);
        }
Пример #5
0
 private void btnEditConstraint_Click(object sender, EventArgs e)
 {
     if (_context.IsConnected)
     {
         var constraint = _dp.ValueConstraint;
         if (constraint == null)
         {
             constraint = ValueConstraintDialog.GetConstraint(_context.Connection);
             if (constraint != null)
             {
                 _dp.ValueConstraint = constraint;
             }
         }
         else
         {
             constraint = ValueConstraintDialog.GetConstraint(constraint, _context.Connection);
             if (constraint != null)
             {
                 _dp.ValueConstraint = constraint;
             }
         }
     }
     else
     {
         var constraint = _dp.ValueConstraint;
         if (constraint == null)
         {
             constraint = ValueConstraintDialog.GetConstraint();
             if (constraint != null)
             {
                 _dp.ValueConstraint = constraint;
             }
         }
         else
         {
             constraint = ValueConstraintDialog.GetConstraint(constraint);
             if (constraint != null)
             {
                 _dp.ValueConstraint = constraint;
             }
         }
     }
 }