public bool IsValid()
{
return
(!string.IsNullOrEmpty(Server) && Server.EndsWith(".sdf")) ||
(!string.IsNullOrEmpty(Server) &&
!string.IsNullOrEmpty(Database) &&
(IntegratedSecurity || (!string.IsNullOrEmpty(UserName) && !string.IsNullOrEmpty(Password))));
}