* 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:
Paul Schneider 2014-09-23 01:43:11 +02:00
commit 9fc7f82531
29 changed files with 213 additions and 114 deletions

View file

@ -11,11 +11,67 @@ namespace WorkFlowProvider
{
public class NpgsqlContentProvider: ProviderBase, IContentProvider
{
public Estimate GetEstimate (long estimid)
public bool[] FinalStatuses {
get {
throw new NotImplementedException ();
}
}
public string Order (IWFOrder c)
{
throw new NotImplementedException ();
}
public IContent GetBlob (string orderId)
{
throw new NotImplementedException ();
}
public int GetStatus (string orderId)
{
throw new NotImplementedException ();
}
public string[] StatusLabels {
get {
throw new NotImplementedException ();
}
}
#region IDisposable implementation
public void Dispose ()
{
}
#endregion
public Estimate GetEstimate (long estimid)
{
using (NpgsqlConnection cnx = CreateConnection ()) {
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
cmd.CommandText =
"select title,username from estimate where _id = @estid";
cmd.Parameters.Add ("@estid", estimid);
cnx.Open ();
Estimate est = null;
using (NpgsqlDataReader rdr = cmd.ExecuteReader ()) {
if (!rdr.Read ()) {
throw new Exception (
string.Format("Estimate not found : {0}", estimid));
}
est = new Estimate ();
est.Title = rdr.GetString(
rdr.GetOrdinal("title"));
est.Owner = rdr.GetString(
rdr.GetOrdinal("username"));
}
cnx.Close ();
return est;
}
}
}
public void SetTitle (long estid, string newTitle)
{
using (NpgsqlConnection cnx = CreateConnection ()) {
@ -66,39 +122,6 @@ namespace WorkFlowProvider
}
}
public bool[] FinalStatuses {
get {
throw new NotImplementedException ();
}
}
public string Order (IWFOrder c)
{
throw new NotImplementedException ();
}
public IContent GetBlob (string orderId)
{
throw new NotImplementedException ();
}
public int GetStatus (string orderId)
{
throw new NotImplementedException ();
}
public string[] StatusLabels {
get {
throw new NotImplementedException ();
}
}
#region IDisposable implementation
public void Dispose ()
{
}
#endregion
public long CreateEstimate (string client, string title)
{