public List <TableConstraintDesignerInfo> GetConstraints()
        {
            List <TableConstraintDesignerInfo> constraintDesingerInfos = new List <TableConstraintDesignerInfo>();

            foreach (DataGridViewRow row in this.dgvConstraints.Rows)
            {
                TableConstraintDesignerInfo constraint = new TableConstraintDesignerInfo();

                string constraintName = row.Cells[this.colName.Name].Value?.ToString();

                if (!string.IsNullOrEmpty(constraintName))
                {
                    TableConstraintDesignerInfo tag = row.Tag as TableConstraintDesignerInfo;

                    constraint.OldName    = tag?.OldName;
                    constraint.Name       = constraintName;
                    constraint.Definition = DataGridViewHelper.GetCellStringValue(row, this.colDefinition.Name);
                    constraint.Comment    = DataGridViewHelper.GetCellStringValue(row, this.colComment.Name);

                    row.Tag = constraint;

                    constraintDesingerInfos.Add(constraint);
                }
            }

            return(constraintDesingerInfos);
        }
        public static List <TableConstraintDesignerInfo> GetConstraintDesignerInfos(List <TableConstraint> constraints)
        {
            List <TableConstraintDesignerInfo> constraintDesignerInfos = new List <TableConstraintDesignerInfo>();

            foreach (TableConstraint constraint in constraints)
            {
                TableConstraintDesignerInfo constraintDesignerInfo = new TableConstraintDesignerInfo();

                ObjectHelper.CopyProperties(constraint, constraintDesignerInfo);

                constraintDesignerInfo.OldName = constraint.Name;

                constraintDesignerInfos.Add(constraintDesignerInfo);
            }

            return(constraintDesignerInfos);
        }