private void listOfRelationsDoubleClick(object sender, EventArgs e) { if (pcApplication.noRelations == 0) return; ListItem item = listOfRelations.SelectedItem as ListItem; if (item == null) return; pcRelation = pcRelations[item.Index]; tableNameStripLabel.Text = item.Values[0]; tableDescrStripLabel.Text = item.Descr[0]; showRelationsGrid(); }
private bool validatePython(TPCRelation relation, EHow how, string fieldNames, string values) { string oldValues = how == EHow.ADD ? "[]" : values; string newValues = how == EHow.DELETE ? "[]" : values; string validate = string.Format("result = validate('{0}', {1}, {2}, {3}, {4})", relation.name, (int)how, fieldNames, oldValues, newValues); if (pcRelation.validate.Length > 0) { if (runValidate(pcRelation.validate, validate) == false) return false; } else { if (runValidate(pcApplication.validateOther, validate) == false) return false; } if (runValidate(pcApplication.validateAll, validate) == false) return false; return true; }