* Web.config:
* Web.csproj: * Web.config: * Blog.cs: * Index.aspx: * BBCodeHelper.cs: * Comment.cs: * yavscModel.csproj: * BlogEntry.cs: * UserPost.aspx: * UserPosts.aspx: * Estimate.cs: * RemovePost.aspx: * TitleNotFound.aspx: * BlogProvider.cs: * AccountController.cs: * BlogsApiController.cs: * WorkFlowController.cs: * BlogEditEntryModel.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * Comment.cs: * BlogEditCommentModel.cs: * NpgsqlBlogProvider.cs: * NpgsqlContentProvider.cs: * BlogEntry.cs: * NpgsqlBlogProvider.csproj: * NpgsqlMembershipProvider.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * BlogHelper.cs: refactoring: moving code from NpgsqlBlogProvider to yavscModel.Blogs * BlogManager.cs: NpgsqlBlogProvider/BlogHelper.cs * BlogsController.cs: a successfull confirmed removal * Blog.cs: refactoring
This commit is contained in:
parent
bba917dcc0
commit
9fc7f82531
29 changed files with 213 additions and 114 deletions
|
|
@ -1123,10 +1123,13 @@ namespace Npgsql.Web
|
|||
{
|
||||
MembershipUserCollection users = new MembershipUserCollection ();
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection (connectionString)) {
|
||||
conn.Open ();
|
||||
using (NpgsqlCommand cmd = new NpgsqlCommand ("SELECT count(*)" +
|
||||
" FROM Users " +
|
||||
" WHERE Username LIKE @UsernameSearch AND ApplicationName = @ApplicationName ", conn)) {
|
||||
totalRecords = (int)cmd.ExecuteScalar ();
|
||||
" WHERE Username LIKE @uns AND ApplicationName = @appn ", conn)) {
|
||||
cmd.Parameters.Add ("@uns", usernameToMatch);
|
||||
cmd.Parameters.Add ("@appn", ApplicationName);
|
||||
totalRecords = (int)((long)cmd.ExecuteScalar ());
|
||||
}
|
||||
if (totalRecords > 0)
|
||||
using (NpgsqlCommand cmd = new NpgsqlCommand ("SELECT PKID, Username, Email, PasswordQuestion," +
|
||||
|
|
@ -1137,7 +1140,7 @@ namespace Npgsql.Web
|
|||
" ORDER BY Username Asc", conn)) {
|
||||
cmd.Parameters.Add ("@UsernameSearch", NpgsqlDbType.Varchar, 255).Value = usernameToMatch;
|
||||
cmd.Parameters.Add ("@ApplicationName", NpgsqlDbType.Varchar, 255).Value = pApplicationName;
|
||||
conn.Open ();
|
||||
|
||||
using (NpgsqlDataReader reader = cmd.ExecuteReader ()) {
|
||||
int counter = 0;
|
||||
int startIndex = pageSize * pageIndex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue