* Web.csproj:

* jquery-latest.js:
* IITContent.cs:
* ITContent.csproj:
* YavscModel.csproj:
* Write.aspx:
* jquery.tablesorter.min.js:
* AssemblyInfo.cs:
* NewEstimateEvenArgs.cs: 

* jquery.metadata.js: ajax call Write

* jquery.tablesorter.js: Estimate table sorting

* Catalog.cs: Find a product by reference

* NpgsqlContentProvider.cs: Npgsql provider could not get the
  Postgresql data type "money"

* Yavsc.sln: Removing an empty project

* MyClass.cs: implements IModule

* fortune.csproj: uses Configuration

* FrontOfficeApiController.cs: Url: GetEstimate/5

* WorkFlowController.cs: debugging ajax call

* RemoveUserQuery.aspx: no more "head" place holder


* Estimate.aspx: Ajax call to add a line to estimates

* Web.config: using the "Deploy" target

* IModule.cs: Install & uninstall using a System.Data.IDbConnection

* IContentProvider.cs: refactoring

* WorkFlowManager.cs: an event at creating an estimate (NewOrder)

* Writting.cs: ProductReference is a string
This commit is contained in:
Paul Schneider 2014-10-17 02:10:00 +02:00
commit f157c6edb9
25 changed files with 1569 additions and 167 deletions

View file

@ -3,6 +3,7 @@ using Yavsc.Model.WorkFlow;
using System.Configuration;
using Yavsc.Model.WorkFlow.Configuration;
using System.Collections.Specialized;
using SalesCatalog.Model;
namespace Yavsc.Model.WorkFlow
{
@ -13,6 +14,9 @@ namespace Yavsc.Model.WorkFlow
/// </summary>
public static class WorkFlowManager
{
public static Catalog Catalog { get; set; }
public static void SetTitle (long id, string title)
{
ContentProvider.SetTitle (id, title);
@ -93,13 +97,22 @@ namespace Yavsc.Model.WorkFlow
/// <param name="title">Title.</param>
public static long CreateEstimate(string client, string title)
{
return ContentProvider.CreateEstimate (client, title);
long estid = ContentProvider.CreateEstimate (client, title);
if (NewOrder != null)
NewOrder.Invoke(ContentProvider, new NewEstimateEvenArgs(estid,client,title));
return estid;
}
public static long Write(long estid, string desc, decimal ucost, int count, long productid)
public static long Write(long estid, string desc, decimal ucost, int count, string productid)
{
if (!string.IsNullOrWhiteSpace(productid)) {
if (Catalog == null)
Catalog = SalesCatalog.CatalogManager.GetCatalog ();
if (Catalog == null)
throw new Exception ("No catalog");
Product p = Catalog.FindProduct (productid);
// TODO new EstimateChange Event
}
return ContentProvider.Write(estid, desc, ucost, count, productid);
}