* minor changes (like an [em] BBcode)
* Trying to use OAuth2 Google Login
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace SalesCatalog.Model
|
namespace SalesCatalog.Model
|
||||||
{
|
{
|
||||||
@ -10,11 +11,17 @@ namespace SalesCatalog.Model
|
|||||||
/// <value>
|
/// <value>
|
||||||
/// The identifier.
|
/// The identifier.
|
||||||
/// </value>
|
/// </value>
|
||||||
|
[Required]
|
||||||
|
[StringLength(256)]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
private string name=null;
|
|
||||||
public abstract string Type { get; }
|
public abstract string Type { get; }
|
||||||
|
|
||||||
|
private string name=null;
|
||||||
|
|
||||||
|
[StringLength(256)]
|
||||||
public string Name { get { return name == null ? Id : name; } set { name = value; } }
|
public string Name { get { return name == null ? Id : name; } set { name = value; } }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,22 +4,33 @@ namespace SalesCatalog.Model
|
|||||||
{
|
{
|
||||||
public class TextInput:FormInput
|
public class TextInput:FormInput
|
||||||
{
|
{
|
||||||
|
|
||||||
#region implemented abstract members of FormInput
|
#region implemented abstract members of FormInput
|
||||||
|
private string tpe = null;
|
||||||
public override string Type {
|
public override string Type {
|
||||||
get {
|
get {
|
||||||
return "text";
|
return tpe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public TextInput ()
|
public TextInput ()
|
||||||
{
|
{
|
||||||
|
tpe = "text";
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextInput (string txt)
|
public TextInput (string txt)
|
||||||
{
|
{
|
||||||
|
tpe = "text";
|
||||||
text = txt;
|
text = txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TextInput (string type, string txt)
|
||||||
|
{
|
||||||
|
tpe = type;
|
||||||
|
text = txt;
|
||||||
|
}
|
||||||
|
|
||||||
string text = null;
|
string text = null;
|
||||||
|
|
||||||
|
|
||||||
@ -27,10 +38,12 @@ namespace SalesCatalog.Model
|
|||||||
{
|
{
|
||||||
return t.text;
|
return t.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static implicit operator TextInput(string t)
|
public static implicit operator TextInput(string t)
|
||||||
{
|
{
|
||||||
return new TextInput(t);
|
return new TextInput(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string DefaultValue {
|
public string DefaultValue {
|
||||||
get {
|
get {
|
||||||
return text;
|
return text;
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>WorkFlowProvider</RootNamespace>
|
<RootNamespace>WorkFlowProvider</RootNamespace>
|
||||||
<AssemblyName>WorkFlowProvider</AssemblyName>
|
<AssemblyName>WorkFlowProvider</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>
|
||||||
|
@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YavscClient", "yavscclient\
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebControls", "WebControls\WebControls.csproj", "{59E1DF7B-FFA0-4DEB-B5F3-76EBD98D5356}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebControls", "WebControls\WebControls.csproj", "{59E1DF7B-FFA0-4DEB-B5F3-76EBD98D5356}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vscadm", "vscadm\vscadm.csproj", "{6C5E1490-E141-4ADA-84E5-6D65523D6B73}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ITContentProvider", "ITContentProvider\ITContentProvider.csproj", "{9D7D892E-9B77-4713-892D-C26E1E944119}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ITContentProvider", "ITContentProvider\ITContentProvider.csproj", "{9D7D892E-9B77-4713-892D-C26E1E944119}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{ECEC9074-ACB5-4A74-BE22-FF7B40F25A1A}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{ECEC9074-ACB5-4A74-BE22-FF7B40F25A1A}"
|
||||||
@ -39,10 +37,6 @@ Global
|
|||||||
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
{68F5B80A-616E-4C3C-91A0-828AA40000BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{6C5E1490-E141-4ADA-84E5-6D65523D6B73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{6C5E1490-E141-4ADA-84E5-6D65523D6B73}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{6C5E1490-E141-4ADA-84E5-6D65523D6B73}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{6C5E1490-E141-4ADA-84E5-6D65523D6B73}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{77044C92-D2F1-45BD-80DD-AA25B311B027}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace vscadm
|
|
||||||
{
|
|
||||||
class MainClass
|
|
||||||
{
|
|
||||||
public static void Main (string[] args)
|
|
||||||
{
|
|
||||||
Console.WriteLine ("Hello World!");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
|
|
||||||
// Information about this assembly is defined by the following attributes.
|
|
||||||
// Change them to the values specific to your project.
|
|
||||||
[assembly: AssemblyTitle ("vscadm")]
|
|
||||||
[assembly: AssemblyDescription ("")]
|
|
||||||
[assembly: AssemblyConfiguration ("")]
|
|
||||||
[assembly: AssemblyCompany ("")]
|
|
||||||
[assembly: AssemblyProduct ("")]
|
|
||||||
[assembly: AssemblyCopyright ("Paul Schneider")]
|
|
||||||
[assembly: AssemblyTrademark ("")]
|
|
||||||
[assembly: AssemblyCulture ("")]
|
|
||||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
|
||||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
|
||||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
|
||||||
[assembly: AssemblyVersion ("1.0.*")]
|
|
||||||
// The following attributes are used to specify the signing key for the assembly,
|
|
||||||
// if desired. See the Mono documentation for more information about signing.
|
|
||||||
//[assembly: AssemblyDelaySign(false)]
|
|
||||||
//[assembly: AssemblyKeyFile("")]
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{6C5E1490-E141-4ADA-84E5-6D65523D6B73}</ProjectGuid>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<RootNamespace>vscadm</RootNamespace>
|
|
||||||
<AssemblyName>vscadm</AssemblyName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Externalconsole>true</Externalconsole>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release</OutputPath>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Externalconsole>true</Externalconsole>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Messaging" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Configuration" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
|
44
web/Controllers/FormInputValue.cs
Normal file
44
web/Controllers/FormInputValue.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using Yavsc;
|
||||||
|
using SalesCatalog;
|
||||||
|
using SalesCatalog.Model;
|
||||||
|
using System.Web.Routing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using WorkFlowProvider;
|
||||||
|
using System.Web.Security;
|
||||||
|
using Yavsc.Model.WorkFlow;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Yavsc.Model.RolesAndMembers;
|
||||||
|
using Yavsc.Controllers;
|
||||||
|
using Yavsc.Formatters;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.Profile;
|
||||||
|
|
||||||
|
namespace Yavsc.ApiControllers
|
||||||
|
{
|
||||||
|
|
||||||
|
public class FormInputValue: IValueProvider<T>
|
||||||
|
{
|
||||||
|
#region IValueProvider implementation
|
||||||
|
|
||||||
|
public T GetValue ()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException ();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -21,6 +21,7 @@ using Yavsc.Controllers;
|
|||||||
using Yavsc.Formatters;
|
using Yavsc.Formatters;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.Profile;
|
using System.Web.Profile;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers
|
namespace Yavsc.ApiControllers
|
||||||
{
|
{
|
||||||
@ -70,8 +71,13 @@ namespace Yavsc.ApiControllers
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
[Authorize]
|
||||||
|
public IOrderInfo Order()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -11,6 +11,7 @@ using System.Collections.Generic;
|
|||||||
using Yavsc.Model.WorkFlow;
|
using Yavsc.Model.WorkFlow;
|
||||||
using WorkFlowProvider;
|
using WorkFlowProvider;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
@ -20,6 +21,9 @@ namespace Yavsc.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class FrontOfficeController : Controller
|
public class FrontOfficeController : Controller
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
|
||||||
|
*/
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public ActionResult Estimates ()
|
public ActionResult Estimates ()
|
||||||
{
|
{
|
||||||
|
120
web/Controllers/GoogleController.cs
Normal file
120
web/Controllers/GoogleController.cs
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Text;
|
||||||
|
using Mono.Security.Protocol.Tls;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
using Yavsc.Model;
|
||||||
|
|
||||||
|
namespace Yavsc.Controllers
|
||||||
|
{
|
||||||
|
public class GoogleController : Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
string API_KEY="AIzaSyBV_LQHb22nGgjNvFzZwnQHjao3Q7IewRw";
|
||||||
|
|
||||||
|
string CLIENT_ID="325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com";
|
||||||
|
|
||||||
|
string CLIENT_SECRET="MaxYcvJJCs2gDGvaELZbzwfL";
|
||||||
|
|
||||||
|
string [] SCOPES = {
|
||||||
|
"profile",
|
||||||
|
"email"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
string getTokenUrl = "https://accounts.google.com/o/oauth2/token";
|
||||||
|
// "https://www.googleapis.com/oauth2/v3/token";https://accounts.google.com/o/oauth2/token
|
||||||
|
string getCodeUrl = "https://accounts.google.com/o/oauth2/auth";
|
||||||
|
|
||||||
|
public void Login()
|
||||||
|
{
|
||||||
|
Random rand = new Random ();
|
||||||
|
string state = "security_token"+rand.Next (100000).ToString()+rand.Next (100000).ToString();
|
||||||
|
Session ["state"] = state;
|
||||||
|
|
||||||
|
string redirectUri = Request.Url.Scheme + "://" + Request.Url.Authority + "/Google/Auth";
|
||||||
|
|
||||||
|
string prms = String.Format("response_type=code&" +
|
||||||
|
"client_id={0}&" +
|
||||||
|
"redirect_uri={1}&" +
|
||||||
|
"scope={2}&" +
|
||||||
|
"state={3}&" +
|
||||||
|
"access_type=offline&" +
|
||||||
|
"include_granted_scopes=false",
|
||||||
|
CLIENT_ID,
|
||||||
|
redirectUri,
|
||||||
|
string.Join("%20",SCOPES),
|
||||||
|
state
|
||||||
|
);
|
||||||
|
|
||||||
|
WebRequest wr = WebRequest.Create(getCodeUrl+"?"+prms);
|
||||||
|
|
||||||
|
wr.Method = "GET";
|
||||||
|
// Get the response.
|
||||||
|
try {
|
||||||
|
WebResponse response = wr.GetResponse();
|
||||||
|
string resQuery = response.ResponseUri.Query;
|
||||||
|
string cont = HttpUtility.ParseQueryString(resQuery)["continue"];
|
||||||
|
Response.Redirect (cont);
|
||||||
|
}
|
||||||
|
catch (WebException we) {
|
||||||
|
Response.Redirect(we.Response.ResponseUri.AbsoluteUri);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public void Auth() {
|
||||||
|
string redirectUri = Request.Url.Scheme + "://" + Request.Url.Authority + "/Google/Code";
|
||||||
|
string code = Request.Params ["code"];
|
||||||
|
string error = Request.Params ["error"];
|
||||||
|
if (error != null) {
|
||||||
|
ViewData ["Message"] =
|
||||||
|
string.Format(LocalizedText.Google_error,
|
||||||
|
LocalizedText.ResourceManager.GetString(error));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string state = Request.Params ["state"];
|
||||||
|
if (state!=null && string.Compare((string)Session ["state"],state)!=0) {
|
||||||
|
ViewData ["Message"] =
|
||||||
|
LocalizedText.ResourceManager.GetString("invalid request state");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
HttpWebRequest webreq = WebRequest.CreateHttp(getTokenUrl);
|
||||||
|
webreq.Method = "POST";
|
||||||
|
webreq.ContentType = "application/x-www-form-urlencoded";
|
||||||
|
webreq.SendChunked = true;
|
||||||
|
string postData = String.Format("code={0}&client_id={1}&client_secret={2}&redirect_uri={3}&grant_type=authorization_code",
|
||||||
|
code,
|
||||||
|
CLIENT_ID,
|
||||||
|
CLIENT_SECRET,
|
||||||
|
redirectUri);
|
||||||
|
Encoding encr = new UTF8Encoding();
|
||||||
|
Byte[] bytes = encr.GetBytes(postData);
|
||||||
|
webreq.ContentLength = bytes.Length;
|
||||||
|
using (Stream dataStream = webreq.GetRequestStream()) {
|
||||||
|
dataStream.Write(bytes,0,bytes.Length);
|
||||||
|
dataStream.Close();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
WebResponse response = webreq.GetResponse();
|
||||||
|
string resQuery = response.ResponseUri.Query;
|
||||||
|
string cont = HttpUtility.ParseQueryString(resQuery)["continue"];
|
||||||
|
Response.Redirect (cont);
|
||||||
|
}
|
||||||
|
catch (WebException wex) {
|
||||||
|
Response.Redirect(wex.Response.ResponseUri.AbsoluteUri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Code()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
37
web/Controllers/IOrderInfo.cs
Normal file
37
web/Controllers/IOrderInfo.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using Yavsc;
|
||||||
|
using SalesCatalog;
|
||||||
|
using SalesCatalog.Model;
|
||||||
|
using System.Web.Routing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using WorkFlowProvider;
|
||||||
|
using System.Web.Security;
|
||||||
|
using Yavsc.Model.WorkFlow;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Yavsc.Model.RolesAndMembers;
|
||||||
|
using Yavsc.Controllers;
|
||||||
|
using Yavsc.Formatters;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.Profile;
|
||||||
|
|
||||||
|
namespace Yavsc.ApiControllers
|
||||||
|
{
|
||||||
|
|
||||||
|
public interface IOrderInfo
|
||||||
|
{
|
||||||
|
DateTime Creation { get; set; }
|
||||||
|
string Status { get; set; }
|
||||||
|
long OrderId { get; set; }
|
||||||
|
FormInputValue [] Details { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
34
web/Controllers/IValueProvider.cs
Normal file
34
web/Controllers/IValueProvider.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using Yavsc;
|
||||||
|
using SalesCatalog;
|
||||||
|
using SalesCatalog.Model;
|
||||||
|
using System.Web.Routing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using WorkFlowProvider;
|
||||||
|
using System.Web.Security;
|
||||||
|
using Yavsc.Model.WorkFlow;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Yavsc.Model.RolesAndMembers;
|
||||||
|
using Yavsc.Controllers;
|
||||||
|
using Yavsc.Formatters;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.Profile;
|
||||||
|
|
||||||
|
namespace Yavsc.ApiControllers
|
||||||
|
{
|
||||||
|
|
||||||
|
interface IValueProvider<T>
|
||||||
|
{
|
||||||
|
T GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -298,6 +298,7 @@ namespace Yavsc.Helpers
|
|||||||
parser = new BBCodeParser (new[] {
|
parser = new BBCodeParser (new[] {
|
||||||
new BBTag ("b", "<b>", "</b>"),
|
new BBTag ("b", "<b>", "</b>"),
|
||||||
new BBTag ("i", "<span style=\"font-style:italic;\">", "</span>"),
|
new BBTag ("i", "<span style=\"font-style:italic;\">", "</span>"),
|
||||||
|
new BBTag ("em", "<em>", "</em>"),
|
||||||
new BBTag ("u", "<span style=\"text-decoration:underline;\">", "</span>"),
|
new BBTag ("u", "<span style=\"text-decoration:underline;\">", "</span>"),
|
||||||
new BBTag ("code", "<span class=\"code\">", "</span>"),
|
new BBTag ("code", "<span class=\"code\">", "</span>"),
|
||||||
new BBTag ("img", "<img src=\"${content}\" alt=\"${alt}\" style=\"${style}\" />", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")),
|
new BBTag ("img", "<img src=\"${content}\" alt=\"${alt}\" style=\"${style}\" />", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")),
|
||||||
|
6632
web/Scripts/jquery-2.1.1-vsdoc.js
vendored
Normal file
6632
web/Scripts/jquery-2.1.1-vsdoc.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9190
web/Scripts/jquery-2.1.1.js
vendored
Normal file
9190
web/Scripts/jquery-2.1.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
web/Scripts/jquery-2.1.1.min.js
vendored
Normal file
4
web/Scripts/jquery-2.1.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
web/Scripts/jquery-2.1.1.min.map
Normal file
1
web/Scripts/jquery-2.1.1.min.map
Normal file
File diff suppressed because one or more lines are too long
10
web/Views/Account/OpenIDLogOn.aspx
Normal file
10
web/Views/Account/OpenIDLogOn.aspx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<%@ Page Title="Login" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
|
||||||
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
|
<%= Html.ValidationSummary("Ouverture de session avec OpenID") %>
|
||||||
|
<% using(Html.BeginForm("OpenIDLogOn", "Account")) %>
|
||||||
|
<% { %>
|
||||||
|
<label for="loginIdentifier"/>
|
||||||
|
<%= Html.TextBox( "loginIdentifier" ) %>
|
||||||
|
<%= Html.ValidationMessage("loginIdentifier", "*") %>
|
||||||
|
<% } %>
|
||||||
|
</asp:Content>
|
6
web/Views/Google/Auth.aspx
Normal file
6
web/Views/Google/Auth.aspx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
|
||||||
|
|
||||||
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
|
AccessToken : <%= Session["AccessToken"] %>
|
||||||
|
Target in error : <%= ViewData["TargetNameError"] %>
|
||||||
|
</asp:Content>
|
5
web/Views/Google/Calendar.aspx
Normal file
5
web/Views/Google/Calendar.aspx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
|
||||||
|
|
||||||
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
|
|
||||||
|
</asp:Content>
|
5
web/Views/Google/Login.aspx
Normal file
5
web/Views/Google/Login.aspx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
|
||||||
|
|
||||||
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
|
|
||||||
|
</asp:Content>
|
@ -25,15 +25,39 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||||||
<section name="catalog" type="SalesCatalog.Configuration.CatalogProvidersConfigurationSection, SalesCatalog" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
<section name="catalog" type="SalesCatalog.Configuration.CatalogProvidersConfigurationSection, SalesCatalog" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||||
<section name="workflow" type="Yavsc.Model.WorkFlow.Configuration.WorkflowConfiguration, YavscModel" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
<section name="workflow" type="Yavsc.Model.WorkFlow.Configuration.WorkflowConfiguration, YavscModel" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
|
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
|
||||||
|
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||||
|
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||||
|
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
|
||||||
|
</sectionGroup>
|
||||||
|
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
|
||||||
|
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||||
|
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||||
|
<section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
|
||||||
|
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
|
||||||
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- <runtime>
|
<runtime>
|
||||||
|
<!--
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Extensions" culture="neutral" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Extensions" culture="neutral" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="3.5.0.0" newVersion="4.0.0.0" />
|
<bindingRedirect oldVersion="3.5.0.0" newVersion="4.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime> -->
|
-->
|
||||||
|
<!-- This prevents the Windows Event Log from frequently logging that HMAC1 is being used (when the other party needs it). -->
|
||||||
|
<legacyHMACWarning enabled="0" />
|
||||||
|
<!-- When targeting ASP.NET MVC 3, this assemblyBinding makes MVC 1 and 2 references relink
|
||||||
|
to MVC 3 so libraries such as DotNetOpenAuth that compile against MVC 1 will work with it.
|
||||||
|
-->
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||||
|
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
<system.web>
|
<system.web>
|
||||||
<!--
|
<!--
|
||||||
Set compilation debug="true" to insert debugging
|
Set compilation debug="true" to insert debugging
|
||||||
@ -108,7 +132,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||||||
</httpModules>
|
</httpModules>
|
||||||
<httpRuntime maxRequestLength="52428800" />
|
<httpRuntime maxRequestLength="52428800" />
|
||||||
<trace enabled="false" localOnly="true" pageOutput="false" requestLimit="10" traceMode="SortByTime" />
|
<trace enabled="false" localOnly="true" pageOutput="false" requestLimit="10" traceMode="SortByTime" />
|
||||||
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" enableClientBasedCulture="true"/>
|
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" enableClientBasedCulture="true" />
|
||||||
<membership defaultProvider="NpgsqlMembershipProvider" userIsOnlineTimeWindow="1">
|
<membership defaultProvider="NpgsqlMembershipProvider" userIsOnlineTimeWindow="1">
|
||||||
<providers>
|
<providers>
|
||||||
<clear />
|
<clear />
|
||||||
@ -207,12 +231,55 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||||||
</providers>
|
</providers>
|
||||||
</catalog>
|
</catalog>
|
||||||
<system.net>
|
<system.net>
|
||||||
|
<!-- not supported: <defaultProxy enabled="true" /> -->
|
||||||
|
<settings>
|
||||||
|
<!-- This setting causes .NET to check certificate revocation lists (CRL)
|
||||||
|
before trusting HTTPS certificates. But this setting tends to not
|
||||||
|
be allowed in shared hosting environments. -->
|
||||||
|
<!--<servicePointManager checkCertificateRevocationList="true"/>-->
|
||||||
|
</settings>
|
||||||
<mailSettings>
|
<mailSettings>
|
||||||
<smtp deliveryMethod="network" from="paulschneider@free.fr">
|
<smtp deliveryMethod="network" from="paulschneider@free.fr">
|
||||||
<network host="smtp.free.fr" port="25" defaultCredentials="false" />
|
<network host="smtp.free.fr" port="25" defaultCredentials="false" />
|
||||||
</smtp>
|
</smtp>
|
||||||
</mailSettings>
|
</mailSettings>
|
||||||
</system.net>
|
</system.net>
|
||||||
|
<dotNetOpenAuth>
|
||||||
|
<messaging>
|
||||||
|
<untrustedWebRequest>
|
||||||
|
<whitelistHosts>
|
||||||
|
<!-- Uncomment to enable communication with localhost (should generally not activate in production!) -->
|
||||||
|
<!--<add name="localhost" />-->
|
||||||
|
</whitelistHosts>
|
||||||
|
</untrustedWebRequest>
|
||||||
|
</messaging>
|
||||||
|
<!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. -->
|
||||||
|
<reporting enabled="true" />
|
||||||
|
<!-- This is an optional configuration section where aspects of dotnetopenauth can be customized. -->
|
||||||
|
<!-- For a complete set of configuration options see http://www.dotnetopenauth.net/developers/code-snippets/configuration-options/ -->
|
||||||
|
<openid>
|
||||||
|
<relyingParty>
|
||||||
|
<security requireSsl="false">
|
||||||
|
<!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
|
||||||
|
<!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
|
||||||
|
<add endpoint="https://www.google.com/accounts/o8/ud" />
|
||||||
|
</trustedProviders>-->
|
||||||
|
</security>
|
||||||
|
<behaviors>
|
||||||
|
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
|
||||||
|
with OPs that use Attribute Exchange (in various formats). -->
|
||||||
|
<add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" />
|
||||||
|
</behaviors>
|
||||||
|
</relyingParty>
|
||||||
|
</openid>
|
||||||
|
</dotNetOpenAuth>
|
||||||
|
<uri>
|
||||||
|
<!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names),
|
||||||
|
which is necessary for OpenID urls with unicode characters in the domain/host name.
|
||||||
|
It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. -->
|
||||||
|
<idn enabled="All" />
|
||||||
|
<iriParsing enabled="true" />
|
||||||
|
</uri>
|
||||||
<authentication mode="Forms">
|
<authentication mode="Forms">
|
||||||
<forms loginUrl="~/Account/Login" timeout="30" name=".ASPXFORM$" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Index.aspx" enableCrossAppRedirects="false" />
|
<forms loginUrl="~/Account/Login" timeout="30" name=".ASPXFORM$" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Index.aspx" enableCrossAppRedirects="false" />
|
||||||
</authentication>
|
</authentication>
|
||||||
@ -227,7 +294,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||||||
<add key="Name" value="Psc" />
|
<add key="Name" value="Psc" />
|
||||||
<add key="DefaultAvatar" value="/images/noavatar.png;image/png" />
|
<add key="DefaultAvatar" value="/images/noavatar.png;image/png" />
|
||||||
<add key="RegistrationMessage" value="/RegistrationMail.txt" />
|
<add key="RegistrationMessage" value="/RegistrationMail.txt" />
|
||||||
<add key="ClientValidationEnabled" value="true"/>
|
<add key="ClientValidationEnabled" value="true" />
|
||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
@ -75,8 +75,6 @@
|
|||||||
<Reference Include="Mono.Posix" />
|
<Reference Include="Mono.Posix" />
|
||||||
<Reference Include="System.ServiceModel.Web" />
|
<Reference Include="System.ServiceModel.Web" />
|
||||||
<Reference Include="System.ServiceModel.Routing" />
|
<Reference Include="System.ServiceModel.Routing" />
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
|
||||||
<Reference Include="System.Configuration.Install" />
|
<Reference Include="System.Configuration.Install" />
|
||||||
<Reference Include="System.Web.Services" />
|
<Reference Include="System.Web.Services" />
|
||||||
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||||
@ -92,6 +90,12 @@
|
|||||||
<HintPath>..\..\..\..\..\usr\lib\mono\4.5\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\..\..\..\..\usr\lib\mono\4.5\System.Net.Http.Formatting.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Net" />
|
||||||
|
<Reference Include="log4net">
|
||||||
|
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\" />
|
<Folder Include="Models\" />
|
||||||
@ -119,6 +123,7 @@
|
|||||||
<Folder Include="Formatters\" />
|
<Folder Include="Formatters\" />
|
||||||
<Folder Include="install\" />
|
<Folder Include="install\" />
|
||||||
<Folder Include="App_GlobalResources\" />
|
<Folder Include="App_GlobalResources\" />
|
||||||
|
<Folder Include="Views\Google\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
@ -158,6 +163,10 @@
|
|||||||
<Compile Include="Formatters\EstimToPdfFormatter.cs" />
|
<Compile Include="Formatters\EstimToPdfFormatter.cs" />
|
||||||
<Compile Include="Formatters\SimpleFormatter.cs" />
|
<Compile Include="Formatters\SimpleFormatter.cs" />
|
||||||
<Compile Include="ValidateAjaxAttribute.cs" />
|
<Compile Include="ValidateAjaxAttribute.cs" />
|
||||||
|
<Compile Include="Controllers\IOrderInfo.cs" />
|
||||||
|
<Compile Include="Controllers\FormInputValue.cs" />
|
||||||
|
<Compile Include="Controllers\IValueProvider.cs" />
|
||||||
|
<Compile Include="Controllers\GoogleController.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
@ -241,6 +250,14 @@
|
|||||||
<Content Include="RegistrationMail.txt" />
|
<Content Include="RegistrationMail.txt" />
|
||||||
<Content Include="instdbws.sql" />
|
<Content Include="instdbws.sql" />
|
||||||
<Content Include="Views\FrontOffice\Writting.ascx" />
|
<Content Include="Views\FrontOffice\Writting.ascx" />
|
||||||
|
<Content Include="packages.config" />
|
||||||
|
<Content Include="Views\Account\OpenIDLogOn.aspx" />
|
||||||
|
<Content Include="Views\Google\Calendar.aspx" />
|
||||||
|
<Content Include="Views\Google\Login.aspx" />
|
||||||
|
<Content Include="Scripts\jquery-2.1.1-vsdoc.js" />
|
||||||
|
<Content Include="Scripts\jquery-2.1.1.js" />
|
||||||
|
<Content Include="Scripts\jquery-2.1.1.min.js" />
|
||||||
|
<Content Include="Views\Google\Auth.aspx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
@ -264,6 +281,7 @@
|
|||||||
<LastGenOutput>Estim.cs</LastGenOutput>
|
<LastGenOutput>Estim.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="install\instdb.sql" />
|
<None Include="install\instdb.sql" />
|
||||||
|
<None Include="Scripts\jquery-2.1.1.min.map" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NpgsqlMRPProviders\NpgsqlMRPProviders.csproj">
|
<ProjectReference Include="..\NpgsqlMRPProviders\NpgsqlMRPProviders.csproj">
|
||||||
|
@ -249,6 +249,7 @@ CREATE TABLE profiledata
|
|||||||
wicketcode character varying(5),
|
wicketcode character varying(5),
|
||||||
iban character varying(33),
|
iban character varying(33),
|
||||||
bic character varying(15),
|
bic character varying(15),
|
||||||
|
gcode character varying(512),
|
||||||
CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid)
|
CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid)
|
||||||
REFERENCES profiles (uniqueid) MATCH SIMPLE
|
REFERENCES profiles (uniqueid) MATCH SIMPLE
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE
|
ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
|
5
web/packages.config
Normal file
5
web/packages.config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="jQuery" version="2.1.1" targetFramework="net40" />
|
||||||
|
<package id="log4net" version="2.0.3" targetFramework="net40" />
|
||||||
|
</packages>
|
3
web/web.config
Normal file
3
web/web.config
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
</configuration>
|
12
yavscModel/LocalizedText.Designer.cs
generated
12
yavscModel/LocalizedText.Designer.cs
generated
@ -82,12 +82,24 @@ namespace Yavsc.Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string access_denied {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("access_denied", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string Product_reference {
|
public static string Product_reference {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Product_reference", resourceCulture);
|
return ResourceManager.GetString("Product_reference", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string Google_error {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Google_error", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string Welcome {
|
public static string Welcome {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Welcome", resourceCulture);
|
return ResourceManager.GetString("Welcome", resourceCulture);
|
||||||
|
@ -30,4 +30,6 @@
|
|||||||
<data name="Pdf_version"><value>Version Pdf</value></data>
|
<data name="Pdf_version"><value>Version Pdf</value></data>
|
||||||
<data name="Tex_version"><value>Version LaTeX</value></data>
|
<data name="Tex_version"><value>Version LaTeX</value></data>
|
||||||
<data name="User_name"><value>Nom d'utilisateur</value></data>
|
<data name="User_name"><value>Nom d'utilisateur</value></data>
|
||||||
|
<data name="Google_error"><value>Erreur Google : {0}</value></data>
|
||||||
|
<data name="access_denied"><value>Accès refusé</value></data>
|
||||||
</root>
|
</root>
|
||||||
|
@ -30,4 +30,6 @@
|
|||||||
<data name="Pdf_version"><value>Pdf version</value></data>
|
<data name="Pdf_version"><value>Pdf version</value></data>
|
||||||
<data name="Tex_version"><value>LaTeX version</value></data>
|
<data name="Tex_version"><value>LaTeX version</value></data>
|
||||||
<data name="User_name"><value>User name</value></data>
|
<data name="User_name"><value>User name</value></data>
|
||||||
|
<data name="Google_error"><value>Google error : {0}</value></data>
|
||||||
|
<data name="access_denied"><value>Access denied</value></data>
|
||||||
</root>
|
</root>
|
||||||
|
@ -9,10 +9,14 @@ namespace Yavsc.Model.WorkFlow
|
|||||||
/// Gets the unique Identifier for this order, in this application.
|
/// Gets the unique Identifier for this order, in this application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The unique I.</value>
|
/// <value>The unique I.</value>
|
||||||
string UniqueID {
|
long UniqueID {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
event EventHandler<OrderStatusChangedEventArgs> StatusChanged;
|
/// <summary>
|
||||||
|
/// Gets the actual status for this order.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The status.</returns>
|
||||||
|
string GetStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,41 +5,60 @@ namespace Yavsc.Model.WorkFlow
|
|||||||
{
|
{
|
||||||
public class WFOrder : IWFOrder
|
public class WFOrder : IWFOrder
|
||||||
{
|
{
|
||||||
private Product p;
|
public string GetStatus ()
|
||||||
private DateTime date;
|
|
||||||
private string catref;
|
|
||||||
private string id = null;
|
|
||||||
public WFOrder(Product prod,string catalogReference){
|
|
||||||
date = DateTime.Now;
|
|
||||||
catref=catalogReference;
|
|
||||||
p = prod;
|
|
||||||
id = Guid.NewGuid ().ToString();
|
|
||||||
}
|
|
||||||
public override string ToString ()
|
|
||||||
{
|
{
|
||||||
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,p.Reference,catref);
|
// TODO Manager.GetStatus(this.id);
|
||||||
|
throw new NotImplementedException ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<OrderStatusChangedEventArgs> StatusChanged;
|
private long prodid;
|
||||||
|
|
||||||
#region IWFCommand implementation
|
public long ProductId {
|
||||||
/// <summary>
|
get {
|
||||||
/// Gets the catalog reference, a unique id for the catalog (not a product id).
|
return prodid;
|
||||||
/// </summary>
|
}
|
||||||
/// <value>The catalog reference.</value>
|
}
|
||||||
public string UniqueID {
|
|
||||||
|
private long id = 0;
|
||||||
|
public long UniqueID {
|
||||||
get {
|
get {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DateTime date;
|
||||||
public DateTime OrderDate {
|
public DateTime OrderDate {
|
||||||
get {
|
get {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
private string catref;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the catalog reference, a unique id for the catalog (not a product id).
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The catalog reference.</value>
|
||||||
|
public string CatalogReference {
|
||||||
|
get {
|
||||||
|
return catref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WFOrder CreateOrder(long productId,string catalogReference){
|
||||||
|
return new WFOrder() {date = DateTime.Now,
|
||||||
|
catref=catalogReference,
|
||||||
|
prodid = productId};
|
||||||
|
//TODO id = Manager.Order(...)
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString ()
|
||||||
|
{
|
||||||
|
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,prodid,catref);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user