Refactoring: moving
the Catalog manager and model into the Yavsc.Model.FrontOffice namespace * Web.config: * Catalog.xml: * MyClass.cs: * Note.cs: * Euro.cs: * Unit.cs: * Text.cs: * Link.cs: * Price.cs: * Label.cs: * Brand.cs: * Scalar.cs: * Option.cs: * Period.cs: * YavscModel.csproj: * Catalog.cs: * Service.cs: * Product.cs: * YavscClient.csproj: * CatalogManager.cs: * Currency.cs: * CheckBox.cs: * SaleForm.cs: * FormInput.cs: * CatalogProvider.cs: * TextInput.cs: * SelectItem.cs: * SalesCatalog.csproj: * FilesInput.cs: * FormElement.cs: * SelectInput.cs: * IValueProvider.cs: * StockStatus.cs: * RadioButton.cs: * Commande.cs: * ProductImage.cs: * WebCatalogExtensions.cs: * TemplateException.cs: * ProductCategory.cs: * PhysicalProduct.cs: * Note.cs: * Link.cs: * Text.cs: * Euro.cs: * Unit.cs: * WorkFlowManager.cs: * Brand.cs: * Label.cs: * Price.cs: * Scalar.cs: * FrontOfficeController.cs: * Period.cs: * Option.cs: * Product.cs: * Service.cs: * Catalog.cs: * SaleForm.cs: * Currency.cs: * CheckBox.cs: * TextInput.cs: * FrontOfficeApiController.cs: * FormInput.cs: * SelectItem.cs: * FilesInput.cs: * XmlCatalog.cs: * FormElement.cs: * SelectInput.cs: * RadioButton.cs: * StockStatus.cs: * ProductImage.cs: * CatalogHelper.cs: * CatalogManager.cs: * CatalogProvider.cs: * ProductCategory.cs: * PhysicalProduct.cs: * XmlCatalogProvider.cs: * CatalogProviderConfigurationElement.cs: * CatalogProvidersConfigurationSection.cs: * CatalogProvidersConfigurationCollection.cs: * CatalogProviderConfigurationElement.cs: * CatalogProvidersConfigurationSection.cs: * CatalogProvidersConfigurationCollection.cs: * CatalogHelper.cs:
This commit is contained in:
parent
7796467236
commit
3c6c3f19aa
49 changed files with 110 additions and 98 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>SalesCatalog</RootNamespace>
|
<RootNamespace>SalesCatalog</RootNamespace>
|
||||||
<AssemblyName>SalesCatalog</AssemblyName>
|
<AssemblyName>SalesCatalog</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
@ -38,44 +39,10 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AssemblyInfo.cs" />
|
<Compile Include="AssemblyInfo.cs" />
|
||||||
<Compile Include="Configuration\CatalogProviderConfigurationElement.cs" />
|
|
||||||
<Compile Include="Configuration\CatalogProvidersConfigurationSection.cs" />
|
|
||||||
<Compile Include="Configuration\CatalogProvidersConfigurationCollection.cs" />
|
|
||||||
<Compile Include="CatalogManager.cs" />
|
|
||||||
<Compile Include="Model\CheckBox.cs" />
|
|
||||||
<Compile Include="Model\Currency.cs" />
|
|
||||||
<Compile Include="Model\Euro.cs" />
|
|
||||||
<Compile Include="Model\FilesInput.cs" />
|
|
||||||
<Compile Include="Model\FormElement.cs" />
|
|
||||||
<Compile Include="Model\FormInput.cs" />
|
|
||||||
<Compile Include="Model\Label.cs" />
|
|
||||||
<Compile Include="Model\Link.cs" />
|
|
||||||
<Compile Include="Model\Price.cs" />
|
|
||||||
<Compile Include="Model\ProductCategory.cs" />
|
|
||||||
<Compile Include="Model\RadioButton.cs" />
|
|
||||||
<Compile Include="Model\SelectInput.cs" />
|
|
||||||
<Compile Include="Model\TextInput.cs" />
|
|
||||||
<Compile Include="Model\Unit.cs" />
|
|
||||||
<Compile Include="Model\Brand.cs" />
|
|
||||||
<Compile Include="CatalogProvider.cs" />
|
|
||||||
<Compile Include="XmlImplementation\XmlCatalog.cs" />
|
<Compile Include="XmlImplementation\XmlCatalog.cs" />
|
||||||
<Compile Include="CatalogHelper.cs" />
|
|
||||||
<Compile Include="Tests\TestCatalogInit.cs" />
|
<Compile Include="Tests\TestCatalogInit.cs" />
|
||||||
<Compile Include="Model\Product.cs" />
|
|
||||||
<Compile Include="Model\Period.cs" />
|
|
||||||
<Compile Include="Model\Service.cs" />
|
|
||||||
<Compile Include="Model\PhysicalProduct.cs" />
|
|
||||||
<Compile Include="Model\Catalog.cs" />
|
|
||||||
<Compile Include="XmlImplementation\XmlCatalogProvider.cs" />
|
<Compile Include="XmlImplementation\XmlCatalogProvider.cs" />
|
||||||
<Compile Include="Model\Text.cs" />
|
|
||||||
<Compile Include="Model\SelectItem.cs" />
|
|
||||||
<Compile Include="Model\StockStatus.cs" />
|
|
||||||
<Compile Include="Model\Scalar.cs" />
|
|
||||||
<Compile Include="Tests\TestBrands.cs" />
|
<Compile Include="Tests\TestBrands.cs" />
|
||||||
<Compile Include="Model\SaleForm.cs" />
|
|
||||||
<Compile Include="Model\ProductImage.cs" />
|
|
||||||
<Compile Include="Model\Option.cs" />
|
|
||||||
<Compile Include="Model\Note.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|
@ -95,4 +62,10 @@
|
||||||
<Folder Include="XmlImplementation\" />
|
<Folder Include="XmlImplementation\" />
|
||||||
<Folder Include="Tests\" />
|
<Folder Include="Tests\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\yavscModel\YavscModel.csproj">
|
||||||
|
<Project>{68F5B80A-616E-4C3C-91A0-828AA40000BD}</Project>
|
||||||
|
<Name>YavscModel</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace SalesCatalog.XmlImplementation
|
namespace SalesCatalog.XmlImplementation
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace SalesCatalog.XmlImplementation
|
namespace SalesCatalog.XmlImplementation
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using SalesCatalog;
|
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using System.Web.Mvc.Html;
|
using System.Web.Mvc.Html;
|
||||||
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace Yavsc.CatExts
|
namespace Yavsc.CatExts
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,17 +38,26 @@
|
||||||
<Id>comment</Id>
|
<Id>comment</Id>
|
||||||
<Value xsi:type="xsd:string">Commentaire</Value>
|
<Value xsi:type="xsd:string">Commentaire</Value>
|
||||||
</FormElement>
|
</FormElement>
|
||||||
<!-- <FormElement xsi:type="Text">
|
<FormElement xsi:type="Text">
|
||||||
<Val>Choisissez le type d'intervention souhaité: </Val>
|
<Val>Choisissez le type d'intervention souhaité: </Val>
|
||||||
</FormElement>
|
</FormElement>
|
||||||
- <FormElement xsi:type="SelectInput">
|
|
||||||
|
<FormElement xsi:type="TextInput">
|
||||||
|
<Id>testarray[]</Id>
|
||||||
|
<Value xsi:type="xsd:string">xxxxxxxxxx</Value>
|
||||||
|
</FormElement>
|
||||||
|
<FormElement xsi:type="TextInput">
|
||||||
|
<Id>testarray[]</Id>
|
||||||
|
<Value xsi:type="xsd:string"></Value>
|
||||||
|
</FormElement>
|
||||||
|
<FormElement xsi:type="SelectInput">
|
||||||
<Id>ad</Id>
|
<Id>ad</Id>
|
||||||
<Items>
|
<Items>
|
||||||
<string>à distance</string>
|
<string>à distance</string>
|
||||||
<string>sur site</string>
|
<string>sur site</string>
|
||||||
</Items>
|
</Items>
|
||||||
<SelectedIndex>0</SelectedIndex>
|
<SelectedIndex>0</SelectedIndex>
|
||||||
</FormElement> -->
|
</FormElement>
|
||||||
</Items>
|
</Items>
|
||||||
</DefaultForm>
|
</DefaultForm>
|
||||||
</Brand>
|
</Brand>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Yavsc;
|
using Yavsc;
|
||||||
using SalesCatalog;
|
using SalesCatalog;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
@ -23,6 +22,7 @@ using System.Text;
|
||||||
using System.Web.Profile;
|
using System.Web.Profile;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using Yavsc.Model;
|
using Yavsc.Model;
|
||||||
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers
|
namespace Yavsc.ApiControllers
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using Yavsc;
|
using Yavsc;
|
||||||
using SalesCatalog;
|
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Yavsc;
|
using Yavsc;
|
||||||
using SalesCatalog;
|
using SalesCatalog;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Yavsc;
|
using Yavsc;
|
||||||
using SalesCatalog;
|
using SalesCatalog;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||||
</system.diagnostics>
|
</system.diagnostics>
|
||||||
<catalog defaultProvider="XmlCatalogProvider">
|
<catalog defaultProvider="XmlCatalogProvider">
|
||||||
<providers>
|
<providers>
|
||||||
<add name="XmlCatalogProvider" connection="/srv/www/yavsc/Catalog.xml" applicationName="/" type="SalesCatalog.XmlImplementation.XmlCatalogProvider, SalesCatalog" />
|
<add name="XmlCatalogProvider" connection="~/Catalog.xml" applicationName="/" type="SalesCatalog.XmlImplementation.XmlCatalogProvider, SalesCatalog" />
|
||||||
</providers>
|
</providers>
|
||||||
</catalog>
|
</catalog>
|
||||||
<system.net>
|
<system.net>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Xml.Serialization;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Brand
|
public class Brand
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Catalog.
|
/// Catalog.
|
||||||
|
|
@ -2,9 +2,9 @@ using System;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using SalesCatalog.Configuration;
|
using Yavsc.Model.FrontOffice.Configuration;
|
||||||
|
|
||||||
namespace SalesCatalog
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Catalog helper.
|
/// Catalog helper.
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using SalesCatalog.Model;
|
namespace Yavsc.Model.FrontOffice
|
||||||
|
|
||||||
namespace SalesCatalog
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Catalog manager.
|
/// Catalog manager.
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Configuration.Provider;
|
using System.Configuration.Provider;
|
||||||
using SalesCatalog.Model;
|
|
||||||
|
|
||||||
namespace SalesCatalog
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Catalog provider.<br/>
|
/// Catalog provider.<br/>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class CheckBox : FormInput
|
public class CheckBox : FormInput
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
|
|
||||||
namespace SalesCatalog.Configuration
|
namespace Yavsc.Model.FrontOffice.Configuration
|
||||||
{
|
{
|
||||||
|
|
||||||
public class CatalogProviderConfigurationElement : ConfigurationElement
|
public class CatalogProviderConfigurationElement : ConfigurationElement
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace SalesCatalog.Configuration
|
namespace Yavsc.Model.FrontOffice.Configuration
|
||||||
{
|
{
|
||||||
public class CatalogProvidersConfigurationCollection : ConfigurationElementCollection
|
public class CatalogProvidersConfigurationCollection : ConfigurationElementCollection
|
||||||
{
|
{
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace SalesCatalog.Configuration
|
namespace Yavsc.Model.FrontOffice.Configuration
|
||||||
{
|
{
|
||||||
public class CatalogProvidersConfigurationSection : ConfigurationSection
|
public class CatalogProvidersConfigurationSection : ConfigurationSection
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public abstract class Currency: Unit
|
public abstract class Currency: Unit
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Euro : Currency
|
public class Euro : Currency
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class FilesInput : FormInput
|
public class FilesInput : FormInput
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public abstract class FormElement
|
public abstract class FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public abstract class FormInput: FormElement
|
public abstract class FormInput: FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Label:FormElement
|
public class Label:FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Link:Label
|
public class Link:Label
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Note:Text
|
public class Note:Text
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Option : FormElement
|
public class Option : FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Period
|
public class Period
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class PhysicalProduct : Product
|
public class PhysicalProduct : Product
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Price: Scalar
|
public class Price: Scalar
|
||||||
{
|
{
|
||||||
|
|
@ -21,7 +21,7 @@ namespace SalesCatalog.Model
|
||||||
}
|
}
|
||||||
|
|
||||||
Currency curr;
|
Currency curr;
|
||||||
public override SalesCatalog.Model.Unit Unit {
|
public override Unit Unit {
|
||||||
get {
|
get {
|
||||||
return curr;
|
return curr;
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Product.
|
/// Product.
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class ProductCategory
|
public class ProductCategory
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class ProductImage: FormElement
|
public class ProductImage: FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class RadioButton:FormInput
|
public class RadioButton:FormInput
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class SaleForm
|
public class SaleForm
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public abstract class Scalar
|
public abstract class Scalar
|
||||||
{
|
{
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class SelectInput: FormInput
|
public class SelectInput: FormInput
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class SelectItem
|
public class SelectItem
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Service : Product
|
public class Service : Product
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public enum StockStatus
|
public enum StockStatus
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class Text: FormElement
|
public class Text: FormElement
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public class TextInput:FormInput
|
public class TextInput:FormInput
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace Yavsc.Model.FrontOffice
|
||||||
{
|
{
|
||||||
public abstract class Unit
|
public abstract class Unit
|
||||||
{
|
{
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using Yavsc;
|
using Yavsc;
|
||||||
using SalesCatalog;
|
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using Yavsc.Model.WorkFlow;
|
using Yavsc.Model.WorkFlow;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace Yavsc.Model.FrontOffice
|
namespace Yavsc.Model.FrontOffice
|
||||||
|
|
@ -13,6 +12,9 @@ namespace Yavsc.Model.FrontOffice
|
||||||
public DateTime CreationDate { get; set; }
|
public DateTime CreationDate { get; set; }
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public string ProdRef { get; set; }
|
public string ProdRef { get; set; }
|
||||||
|
|
||||||
|
public StringDictionary Parameters = new StringDictionary();
|
||||||
|
|
||||||
public Commande() {
|
public Commande() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,6 +24,11 @@ namespace Yavsc.Model.FrontOffice
|
||||||
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
|
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
|
||||||
cmd.ProdRef=collection["ref"]; // Required product reference
|
cmd.ProdRef=collection["ref"]; // Required product reference
|
||||||
cmd.CreationDate = DateTime.Now;
|
cmd.CreationDate = DateTime.Now;
|
||||||
|
|
||||||
|
// stores the parameters:
|
||||||
|
foreach (string key in collection.AllKeys) {
|
||||||
|
cmd.Parameters.Add (key, collection [key]);
|
||||||
|
}
|
||||||
WorkFlowManager wm = new WorkFlowManager ();
|
WorkFlowManager wm = new WorkFlowManager ();
|
||||||
wm.RegisterCommand (cmd); // sets cmd.Id
|
wm.RegisterCommand (cmd); // sets cmd.Id
|
||||||
return cmd;
|
return cmd;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ using Yavsc.Model.WorkFlow;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using Yavsc.Model.WorkFlow.Configuration;
|
using Yavsc.Model.WorkFlow.Configuration;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using Yavsc.Model.FrontOffice;
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace Yavsc.Model.WorkFlow
|
namespace Yavsc.Model.WorkFlow
|
||||||
|
|
@ -111,7 +110,7 @@ namespace Yavsc.Model.WorkFlow
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(productid)) {
|
if (!string.IsNullOrWhiteSpace(productid)) {
|
||||||
if (Catalog == null)
|
if (Catalog == null)
|
||||||
Catalog = SalesCatalog.CatalogManager.GetCatalog ("/WorkFlowApi");
|
Catalog = CatalogManager.GetCatalog ("/WorkFlowApi");
|
||||||
if (Catalog == null)
|
if (Catalog == null)
|
||||||
throw new Exception ("No catalog");
|
throw new Exception ("No catalog");
|
||||||
Product p = Catalog.FindProduct (productid);
|
Product p = Catalog.FindProduct (productid);
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,40 @@
|
||||||
<Compile Include="RssFeeds.cs" />
|
<Compile Include="RssFeeds.cs" />
|
||||||
<Compile Include="FrontOffice\Commande.cs" />
|
<Compile Include="FrontOffice\Commande.cs" />
|
||||||
<Compile Include="FrontOffice\Basket.cs" />
|
<Compile Include="FrontOffice\Basket.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Brand.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Catalog.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\CheckBox.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Currency.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Euro.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\FilesInput.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\FormElement.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\FormInput.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Label.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Link.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Note.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Option.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Period.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\PhysicalProduct.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Price.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Product.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\ProductCategory.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\ProductImage.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\RadioButton.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\SaleForm.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Scalar.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\SelectInput.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\SelectItem.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Service.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\StockStatus.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Text.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\TextInput.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Unit.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Configuration\CatalogProviderConfigurationElement.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Configuration\CatalogProvidersConfigurationCollection.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\Configuration\CatalogProvidersConfigurationSection.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\CatalogHelper.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\CatalogManager.cs" />
|
||||||
|
<Compile Include="FrontOffice\Catalog\CatalogProvider.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -109,12 +143,7 @@
|
||||||
<Folder Include="FileSystem\" />
|
<Folder Include="FileSystem\" />
|
||||||
<Folder Include="Google\" />
|
<Folder Include="Google\" />
|
||||||
<Folder Include="FrontOffice\" />
|
<Folder Include="FrontOffice\" />
|
||||||
</ItemGroup>
|
<Folder Include="FrontOffice\Catalog\" />
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\SalesCatalog\SalesCatalog.csproj">
|
|
||||||
<Project>{90BF2234-7252-4CD5-B2A4-17501B19279B}</Project>
|
|
||||||
<Name>SalesCatalog</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<MonoDevelop>
|
<MonoDevelop>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using SalesCatalog.Model;
|
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http.Formatting;
|
using System.Net.Http.Formatting;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Yavsc.Model.FrontOffice;
|
||||||
|
|
||||||
namespace Yavsc
|
namespace Yavsc
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -51,5 +51,9 @@
|
||||||
<Project>{90BF2234-7252-4CD5-B2A4-17501B19279B}</Project>
|
<Project>{90BF2234-7252-4CD5-B2A4-17501B19279B}</Project>
|
||||||
<Name>SalesCatalog</Name>
|
<Name>SalesCatalog</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\yavscModel\YavscModel.csproj">
|
||||||
|
<Project>{68F5B80A-616E-4C3C-91A0-828AA40000BD}</Project>
|
||||||
|
<Name>YavscModel</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue