diff --git a/WorkFlowProvider/NpgsqlContentProvider.cs b/WorkFlowProvider/NpgsqlContentProvider.cs index aeb46154..0d6df8e9 100644 --- a/WorkFlowProvider/NpgsqlContentProvider.cs +++ b/WorkFlowProvider/NpgsqlContentProvider.cs @@ -12,6 +12,36 @@ namespace WorkFlowProvider { public class NpgsqlContentProvider: ProviderBase, IContentProvider { + public StatusChange[] GetWrittingStatuses (long wrid) + { + throw new NotImplementedException (); + } + + public StatusChange[] GetEstimateStatuses (long estid) + { + throw new NotImplementedException (); + } + + public void DropTagWritting (long wrid, string tag) + { + throw new NotImplementedException (); + } + + public void UpdateWritting (Writting wr) + { + throw new NotImplementedException (); + } + + public void SetWrittingStatus (long wrtid, int status, string username) + { + throw new NotImplementedException (); + } + + public void SetEstimateStatus (long estid, int status, string username) + { + throw new NotImplementedException (); + } + public void TagWritting (long wrid, string tag) { throw new NotImplementedException (); diff --git a/WorkFlowProvider/WFManager.cs b/WorkFlowProvider/WFManager.cs index 9bd5f482..196693c8 100644 --- a/WorkFlowProvider/WFManager.cs +++ b/WorkFlowProvider/WFManager.cs @@ -8,6 +8,11 @@ namespace WorkFlowProvider { public static class WFManager { + public static void UpdateWritting (Writting wr) + { + throw new NotImplementedException (); + } + public static void DropWritting (long wrid) { ContentProvider.DropWritting (wrid); @@ -75,7 +80,10 @@ namespace WorkFlowProvider return ContentProvider.Write(estid, desc, ucost, count, productid); } - + public static void SetEstimateStatus(long estid, int status, string username) + { + ContentProvider.SetEstimateStatus (estid, status, username); + } } } diff --git a/web/Controllers/WorkFlowController.cs b/web/Controllers/WorkFlowController.cs index ee8cf240..bcc1fd45 100644 --- a/web/Controllers/WorkFlowController.cs +++ b/web/Controllers/WorkFlowController.cs @@ -27,7 +27,12 @@ namespace Yavsc.ApiControllers { WFManager.DropWritting (wrid); } - + [HttpGet] + [Authorize] + public void UpdateWritting(Writting wr) + { + WFManager.UpdateWritting (wr); + } [HttpGet] [Authorize] diff --git a/yavscModel/WorkFlow/IContentProvider.cs b/yavscModel/WorkFlow/IContentProvider.cs index c881304f..a9d818e0 100644 --- a/yavscModel/WorkFlow/IContentProvider.cs +++ b/yavscModel/WorkFlow/IContentProvider.cs @@ -4,12 +4,11 @@ using System.Web.Mvc; namespace yavscModel.WorkFlow { + public interface StatusChange { int Status {get;} DateTime date {get;} } + public interface IContentProvider : IProvider, IDisposable { - void DropWritting (long wrid); - void DropEstimate (long estid); - void TagWritting (long wrid,string tag); - int GetStatus (string estimId); + /// /// Gets the status labels. /// 0 is the starting status @@ -17,11 +16,20 @@ namespace yavscModel.WorkFlow /// The status labels. string [] StatusLabels {get;} bool [] FinalStatuses { get; } + StatusChange[] GetWrittingStatuses (long wrid); + StatusChange[] GetEstimateStatuses (long estid); long CreateEstimate (string client, string title); - void SetTitle (long estid, string newTitle); + Estimate GetEstimate (long estimid); long Write (long estid, string desc, decimal ucost, int count, long productid); + void DropWritting (long wrid); + void DropEstimate (long estid); + void TagWritting (long wrid,string tag); + void DropTagWritting (long wrid,string tag); + void UpdateWritting (Writting wr); + void SetTitle (long estid, string newTitle); void SetDesc (long writid, string newDesc); - Estimate GetEstimate (long estimid); + void SetWrittingStatus (long wrtid,int status,string username); + void SetEstimateStatus (long estid,int status,string username); } }