public virtual string Validate(ContactManager.Address address, string culture) { System.Globalization.CultureInfo cultureInfo = ConvertUtilities.ToCultureInfo(culture); ContactManager.Address address1 = address; if ((address1 == null)) { return(default(string)); } return(address1.Validate(cultureInfo)); }
public virtual string Validate(SoftFluent.Samples.SignalR.Customer customer, string culture) { System.Globalization.CultureInfo cultureInfo = ConvertUtilities.ToCultureInfo(culture); SoftFluent.Samples.SignalR.Customer customer1 = customer; if ((customer1 == null)) { return(default(string)); } return(customer1.Validate(cultureInfo)); }
public virtual string Validate(ContactManager.Contact contact, string culture) { System.Globalization.CultureInfo cultureInfo = ConvertUtilities.ToCultureInfo(culture); ContactManager.Contact contact1 = contact; if ((contact1 == null)) { return(default(string)); } return(contact1.Validate(cultureInfo)); }
private void buttonOk_Click(object sender, EventArgs e) { Entity userEntity = CreateUserEntity(); Entity roleEntity = null; //Entity userRoleEntity = null; Entity loginsEntity = null; Entity claimsEntity = null; Entity roleClaimEntity = null; if (checkBoxRole.Checked) { roleEntity = CreateRoleEntity(); } //if (checkBoxUserRole.Checked) //{ // userRoleEntity = CreateUserRoleEntity(); // AddRelation(userEntity, PropertyType.Roles, userRoleEntity, PropertyType.User, RelationType.ManyToOne); // AddRelation(roleEntity, PropertyType.RoleUsers, userRoleEntity, PropertyType.Role, RelationType.ManyToOne); //} //else //{ AddRelation(userEntity, PropertyType.UserRoles, roleEntity, PropertyType.RoleUsers, RelationType.ManyToMany); //} if (checkBoxClaims.Checked) { claimsEntity = CreateUserClaimsEntity(); AddRelation(userEntity, PropertyType.UserClaims, claimsEntity, PropertyType.UserClaimUser, RelationType.ManyToOne); } if (checkBoxExternalLogins.Checked) { loginsEntity = CreateUserLoginsEntity(); AddRelation(userEntity, PropertyType.UserLogins, loginsEntity, PropertyType.UserLoginUser, RelationType.ManyToOne); } if (checkBoxRoleClaim.Checked) { roleClaimEntity = CreateRoleClaimEntity(); AddRelation(roleEntity, PropertyType.RoleClaims, roleClaimEntity, PropertyType.RoleClaimRole, RelationType.ManyToOne); } CreateUserMethods(userEntity, loginsEntity); SetCollectionMode(userEntity); SetCollectionMode(roleEntity); //SetCollectionMode(userRoleEntity); SetCollectionMode(loginsEntity); SetCollectionMode(claimsEntity); SetCollectionMode(roleClaimEntity); if (_aspNetIdentityProducer.MustCreateMessages) { ProjectMessages messages = new ProjectMessages(_project); if (messages.RoleNotFoundMessage == null) { var message = new Message { EditorName = "RoleNotFound", Class = MessageClass._default.ToString(), CultureName = ConvertUtilities.ToCultureInfo(_aspNetIdentityProducer.MessagesCulture, _project.Culture).Name, Value = IdentityRole.RoleNotFoundMessage, AddToRuntimeResourceFile = true }; message.SetAttributeValue("", "messageType", Constants.NamespaceUri, ProjectMessageType.RoleNotFound); _project.Messages.Add(message); } } this.Close(); }