- a module for IT services business

- Mvc-like action binding in the WF web api ... ?

* Yavsc.sln:
* Web.csproj:
* MvcActionValueBinder.cs:
* yavscModel.csproj:
* WFOrder.cs:
* IWFOrder.cs:
* BasketImpact.cs:
* ProjectInfo.cs:
* IWFModule.cs:
* IWFCommand.cs:
* WorkFlowController.cs:
* NewProjectModel.cs:
* IContentProvider.cs:
* ITCPNpgsqlProvider.cs:
* WorkFlowProvider.csproj:
* ITContentProvider.csproj:
* AssemblyInfo.cs:
* OrderStatusChangedEventArgs.cs: 

* NpgsqlContentProvider.cs:
This commit is contained in:
Paul Schneider 2014-07-24 05:04:56 +02:00
commit fa93ce7fee
19 changed files with 412 additions and 122 deletions

View file

@ -0,0 +1,79 @@
using System;
using WorkFlowProvider;
using Npgsql;
namespace ITContentProvider
{
public class ITCPNpgsqlProvider :NpgsqlContentProvider
{
public ITCPNpgsqlProvider ()
{
}
public ProjectInfo GetProjectInfo(int projectid)
{
throw new NotImplementedException ();
}
public ProjectInfo[] SearchProject(ProjectInfo pi)
{
throw new NotImplementedException ();
}
public int NewTask (int projectId, string name, string desc)
{
throw new System.NotImplementedException ();
}
public void SetTaskName (int taskId, string name)
{
throw new System.NotImplementedException ();
}
public void SetStartDate (int taskId, DateTime d)
{
throw new System.NotImplementedException ();
}
public void SetEndDate (int taskId, DateTime d)
{
throw new System.NotImplementedException ();
}
public void RemoveProject (int prjId)
{
using (var cnx = CreateConnection()) {
cnx.Open ();
using (NpgsqlCommand cmd = cnx.CreateCommand()) {
cmd.CommandText = "delete from projets where id = @id";
cmd.Parameters.Add ("@id", prjId);
cmd.ExecuteNonQuery();
}
cnx.Close ();
}
}
public int NewProject (string name, string desc, string ownerId)
{
int id = 0;
using (var cnx = CreateConnection()) {
cnx.Open ();
using (NpgsqlCommand cmd = cnx.CreateCommand()) {
cmd.CommandText = "insert into projets (name,managerid,ApplicatonName,prdesc) values (@name,@mid,@appname,@pdesc)";
cmd.Parameters.Add ("@name", name);
cmd.Parameters.Add ("@mid", ownerId);
cmd.Parameters.Add ("@appname", ApplicationName);
cmd.Parameters.Add ("@desc", desc);
id = (int)cmd.ExecuteScalar ();
}
cnx.Close ();
}
return id;
}
}
}

View file

@ -0,0 +1,52 @@
<?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>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9D7D892E-9B77-4713-892D-C26E1E944119}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ITContentProvider</RootNamespace>
<AssemblyName>ITContentProvider</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>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Npgsql" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProjectInfo.cs" />
<Compile Include="ITCPNpgsqlProvider.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\WorkFlowProvider\WorkFlowProvider.csproj">
<Project>{821FF72D-9F4B-4A2C-B95C-7B965291F119}</Project>
<Name>WorkFlowProvider</Name>
</ProjectReference>
<ProjectReference Include="..\yavscModel\yavscModel.csproj">
<Project>{68F5B80A-616E-4C3C-91A0-828AA40000BD}</Project>
<Name>yavscModel</Name>
</ProjectReference>
</ItemGroup>
</Project>

View file

@ -0,0 +1,18 @@
using System;
using WorkFlowProvider;
namespace ITContentProvider
{
public class ProjectInfo
{
string Name { get; set; }
string Licence { get; set; }
string BBDescription { get; set; }
DateTime StartDate { get; set; }
string ProdVersion { get; set; }
string StableVersion { get; set; }
string TestingVersion { get; set; }
string WebSite { get; set; }
}
}

View file

@ -0,0 +1,22 @@
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 ("ITContentProvider")]
[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("")]