Zbiór zmian 970
- Data:
- 2009-12-23 11:26:06 (16 years ago)
- Lokalizacja:
- trunk
- Pliki:
-
- 9 dodane
- 19 zmodyfikowane
- 17 skopiowane
-
eCard.MVC.sln (zmodyfikowane) (3 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Platnosci.Tests.csproj (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Tests/Web/FakeDataContext.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslation.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Tests/Web/Function.cs (zmodyfikowane) (3 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/FunkcjePlatnosciTests.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Tests/Web/MerchantControllerTests.cs (zmodyfikowane) (3 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs (zmodyfikowane) (10 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/StatusTest.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci.Tests/Web/ValidationMerchantClassTests.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Tests/Web/eCardDataTests.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci/Controllers/AccountController.cs (zmodyfikowane) (4 diffs)
-
eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs (zmodyfikowane) (4 diffs)
-
eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs (zmodyfikowane) (6 diffs)
-
eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs (zmodyfikowane) (6 diffs)
-
eCard/eCardMVC/Platnosci/Models/InvoiceDetailsViewData.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci/Models/eCardData.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci/Platnosci.Web.csproj (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Data (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/DataContext.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/DataContext.cs) (5 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.cs)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.dbml) (2 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml.layout (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.dbml.layout) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.designer.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.designer.cs) (14 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/PlatnosciEcard.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/PlatnosciEcard.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/PotwierdzeniaEcard.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/PotwierdzeniaEcard.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Data/vPlatnosciEcard.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/vPlatnosciEcard.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Interfaces (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IDataContext.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Interface/IDataContext.cs) (2 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IIdentifiable.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Interface/IIdentifiable.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IRepository.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Interface/IRepository.cs) (2 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Interfaces/ITranslateManager.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Interface/ITranslateManager.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Merchant.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Merchant.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Payer.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Payer.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Properties (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Properties/AssemblyInfo.cs (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Properties/Settings.Designer.cs (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Properties/Settings.settings (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/Repository.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Repository.cs) (3 diffs)
-
eCard/eCardMVC/adMoto.Payments.Core/Translation.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Translation.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/Waluta.cs (skopiowane) (skopiowane from trunk/eCard/eCardMVC/Platnosci.Core/Linq/Waluta.cs) (1 diff)
-
eCard/eCardMVC/adMoto.Payments.Core/adMoto.Payments.Core.csproj (dodane)
-
eCard/eCardMVC/adMoto.Payments.Core/app.config (dodane)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard.MVC.sln
r866 r970 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 10.00 3 # Visual Web Developer Express 2008 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platnosci.Core", "eCard\eCardMVC\Platnosci.Core\Platnosci.Core.csproj", "{329506B5-F705-46AE-A31D-799141FEA70E}" 5 EndProject 3 # Visual Studio 2008 6 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platnosci.Web", "eCard\eCardMVC\Platnosci\Platnosci.Web.csproj", "{19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}" 7 5 EndProject 8 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platnosci.Tests", "eCard\eCardMVC\Platnosci.Tests\Platnosci.Tests.csproj", "{1FD307C6-4D2F-4013-BD60-DD36FFE08CD4}" 7 EndProject 8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "adMoto.Payments.Core", "eCard\eCardMVC\adMoto.Payments.Core\adMoto.Payments.Core.csproj", "{C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}" 9 9 EndProject 10 10 Global … … 14 14 EndGlobalSection 15 15 GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 {329506B5-F705-46AE-A31D-799141FEA70E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU17 {329506B5-F705-46AE-A31D-799141FEA70E}.Debug|Any CPU.Build.0 = Debug|Any CPU18 {329506B5-F705-46AE-A31D-799141FEA70E}.Release|Any CPU.ActiveCfg = Release|Any CPU19 {329506B5-F705-46AE-A31D-799141FEA70E}.Release|Any CPU.Build.0 = Release|Any CPU20 16 {19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 17 {19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}.Debug|Any CPU.Build.0 = Debug|Any CPU … … 26 22 {1FD307C6-4D2F-4013-BD60-DD36FFE08CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 23 {1FD307C6-4D2F-4013-BD60-DD36FFE08CD4}.Release|Any CPU.Build.0 = Release|Any CPU 24 {C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 {C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 {C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 {C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}.Release|Any CPU.Build.0 = Release|Any CPU 28 28 EndGlobalSection 29 29 GlobalSection(SolutionProperties) = preSolution -
trunk/eCard/eCardMVC/Platnosci.Tests/Platnosci.Tests.csproj
r963 r970 99 99 </ItemGroup> 100 100 <ItemGroup> 101 <ProjectReference Include="..\ Platnosci.Core\Platnosci.Core.csproj">102 <Project>{ 329506B5-F705-46AE-A31D-799141FEA70E}</Project>103 <Name> Platnosci.Core</Name>101 <ProjectReference Include="..\adMoto.Payments.Core\adMoto.Payments.Core.csproj"> 102 <Project>{C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}</Project> 103 <Name>adMoto.Payments.Core</Name> 104 104 </ProjectReference> 105 105 <ProjectReference Include="..\Platnosci\Platnosci.Web.csproj"> -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeDataContext.cs
r951 r970 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using Platnosci.Core.Interface;5 using Platnosci.Core.Linq;4 using adMoto.Payments.Core.Data; 5 using adMoto.Payments.Core.Interfaces; 6 6 7 7 namespace Platnosci.Tests.Web … … 47 47 { 48 48 } 49 public IQueryable< vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer)49 public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 50 50 { 51 51 throw new NotImplementedException(); -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslation.cs
r931 r970 1 using Platnosci.Core.Interface;1 using adMoto.Payments.Core.Interfaces; 2 2 3 3 namespace Platnosci.Tests.Web 4 4 { 5 public class FakeTranslation : ITranslateManager5 public class FakeTranslation : ITranslateManager 6 6 { 7 7 public string Translate(string className, string keyName) -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/Function.cs
r957 r970 1 1 using System; 2 using Platnosci.Core.Linq; 2 using adMoto.Payments.Core; 3 using adMoto.Payments.Core.Data; 3 4 using System.Web.Mvc; 4 5 using Moq; … … 8 9 public class Function 9 10 { 10 public vPlatnosciEcardCreateInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy)11 public Invoice CreateInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy) 11 12 { 12 var platnosc = new vPlatnosciEcard();13 var platnosc = new Invoice(); 13 14 platnosc.ID_faktury = id; 14 15 platnosc.nip = nip; … … 19 20 return platnosc; 20 21 } 21 public vPlatnosciEcardCreateForeignInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy, decimal walutaBrutto, string currency)22 public Invoice CreateForeignInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy, decimal walutaBrutto, string currency) 22 23 { 23 var platnosc = new vPlatnosciEcard();24 var platnosc = new Invoice(); 24 25 platnosc.ID_faktury = id; 25 26 platnosc.nip = nip; -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/FunkcjePlatnosciTests.cs
r969 r970 1 1 using System.Linq; 2 using adMoto.Payments.Core; 3 using adMoto.Payments.Core.Data; 4 using adMoto.Payments.Core.Interfaces; 2 5 using NUnit.Framework; 3 6 using Platnosci.Models; 4 using Platnosci.Core.Linq;5 using Platnosci.Core.Interface;6 7 7 8 8 namespace Platnosci.Tests.Web -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/MerchantControllerTests.cs
r969 r970 1 using NUnit.Framework; 2 using Platnosci.Core.Linq; 3 using Platnosci.Core.Interface; 1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 3 using adMoto.Payments.Core.Interfaces; 4 using NUnit.Framework; 4 5 using Platnosci.Controllers; 5 6 using Platnosci.Models; … … 19 20 { 20 21 //Arrange 21 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());22 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "", 0, 0);22 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 23 var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 23 24 repVPayment.Insert(platnosc); 24 25 25 Payer payer = _function.CreatePayer(123, "test", "test");26 var payer = _function.CreatePayer(123, "test", "test"); 26 27 27 28 var controller = new MerchantController(repVPayment, null, _translateManager); … … 42 43 { 43 44 //Arrange 44 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());45 v PlatnosciEcardplatnosc = _function.CreateInvoice(12, "nip1", "", 0, 0);45 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 46 var platnosc = _function.CreateInvoice(12, "nip1", "", 0, 0); 46 47 repVPayment.Insert(platnosc); 47 48 48 Payer payer = _function.CreatePayer(123, "test", "test");49 var payer = _function.CreatePayer(123, "test", "test"); 49 50 50 51 var controller = new MerchantController(repVPayment, null, _translateManager); -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs
r969 r970 1 1 using System; 2 using System.Linq;3 2 using System.Web.Mvc; 4 3 using adMoto.Payments.Core; 4 using adMoto.Payments.Core.Data; 5 using adMoto.Payments.Core.Interfaces; 5 6 using NUnit.Framework; 6 using MvcContrib.TestHelper;7 7 using Platnosci.Controllers; 8 9 using Platnosci.Core.Interface;10 using Platnosci.Core.Linq;11 8 using Platnosci.Models; 12 9 … … 141 138 { 142 139 //Arrange 143 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());140 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 144 141 var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 145 142 repVPayment.Insert(platnosc); … … 162 159 { 163 160 //Arrange 164 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());165 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip2", "", 0, 0);161 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 162 var platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 166 163 repVPayment.Insert(platnosc); 167 164 … … 185 182 //Arrange 186 183 //Tworzymy takie dane aby platnosc o danym id byla juz zaplacona 187 var repVPayment = new Repository< vPlatnosciEcard>(new FakeDataContext());184 var repVPayment = new Repository<Invoice>(new FakeDataContext()); 188 185 var invoice = _function.CreateInvoice(123, "nip1", "aaa", 0, 0); 189 186 repVPayment.Insert(invoice); … … 212 209 { 213 210 //Arrange 214 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());215 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);211 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 212 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 216 213 repVPayment.Insert(platnosc); 217 214 … … 240 237 { 241 238 //Arrange 242 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());243 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);239 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 240 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 244 241 repVPayment.Insert(platnosc); 245 242 … … 261 258 { 262 259 //Arrange 263 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());264 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);260 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 261 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 265 262 repVPayment.Insert(platnosc); 266 263 … … 282 279 { 283 280 //Arrange 284 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());285 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);286 repVPayment.Insert(platnosc); 287 288 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 289 controller.ControllerContext = _function.CreateControllerContext("nip1"); 290 stringname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";291 Payer payer = _function.CreatePayer(123, name, "test");281 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 282 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 283 repVPayment.Insert(platnosc); 284 285 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 286 controller.ControllerContext = _function.CreateControllerContext("nip1"); 287 var name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 288 var payer = _function.CreatePayer(123, name, "test"); 292 289 293 290 //Act … … 303 300 { 304 301 //Arrange 305 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());306 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);307 repVPayment.Insert(platnosc); 308 309 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 310 controller.ControllerContext = _function.CreateControllerContext("nip1"); 311 stringsurname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";312 Payer payer = _function.CreatePayer(123, "test", surname);302 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 303 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 304 repVPayment.Insert(platnosc); 305 306 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 307 controller.ControllerContext = _function.CreateControllerContext("nip1"); 308 var surname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 309 var payer = _function.CreatePayer(123, "test", surname); 313 310 314 311 //Act … … 324 321 { 325 322 //Arrange 326 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());327 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);323 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 324 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 328 325 repVPayment.Insert(platnosc); 329 326 -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/StatusTest.cs
r969 r970 1 using NUnit.Framework; 2 using Platnosci.Core.Linq; 3 using Platnosci.Core.Interface; 1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 3 using adMoto.Payments.Core.Interfaces; 4 using NUnit.Framework; 4 5 using MvcContrib.TestHelper; 5 6 using Platnosci.Controllers; … … 11 12 public class StatusTest 12 13 { 13 [Test]14 [Category("Unit")]15 public void FormatException_Ordernumber_Test()16 {17 IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext());18 var builder = new TestControllerBuilder();19 var controller = new PlatnoscController(null, null, repConfirm, null);20 builder.InitializeController(controller);21 builder.Form.Add("MERCHANTNUMBER", "132423");22 builder.Form.Add("ORDERNUMBER", "32hvhsvhv");14 //[Test] 15 //[Category("Unit")] 16 //public void FormatException_Ordernumber_Test() 17 //{ 18 // IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 19 // var builder = new TestControllerBuilder(); 20 // var controller = new PlatnoscController(null, null, repConfirm, null); 21 // builder.InitializeController(controller); 22 // builder.Form.Add("MERCHANTNUMBER", "132423"); 23 // builder.Form.Add("ORDERNUMBER", "32hvhsvhv"); 23 24 24 var result = controller.Status() as ContentResult;25 System.Diagnostics.Debug.WriteLine("1. Zły formt ordernumber.");26 System.Diagnostics.Debug.WriteLine("2. Count: " + repConfirm.Count());27 System.Diagnostics.Debug.WriteLine("3. Contetnt: " + result.Content);28 Assert.That(repConfirm.Count().Equals(0));29 Assert.That(result.Content.Contains("FormatException"));30 }31 [Test]32 [Category("Unit")]33 public void FormatException_Paymenttype_Test()34 {35 IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext());36 var builder = new TestControllerBuilder();37 var controller = new PlatnoscController(null, null, repConfirm, null);38 builder.InitializeController(controller);39 builder.Form.Add("MERCHANTNUMBER", "132423");40 builder.Form.Add("PAYMENTTYPE", "32hvhsvhv");25 // var result = controller.Status() as ContentResult; 26 // System.Diagnostics.Debug.WriteLine("1. Zły formt ordernumber."); 27 // System.Diagnostics.Debug.WriteLine("2. Count: " + repConfirm.Count()); 28 // System.Diagnostics.Debug.WriteLine("3. Contetnt: " + result.Content); 29 // Assert.That(repConfirm.Count().Equals(0)); 30 // Assert.That(result.Content.Contains("FormatException")); 31 //} 32 //[Test] 33 //[Category("Unit")] 34 //public void FormatException_Paymenttype_Test() 35 //{ 36 // IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 37 // var builder = new TestControllerBuilder(); 38 // var controller = new PlatnoscController(null, null, repConfirm, null); 39 // builder.InitializeController(controller); 40 // builder.Form.Add("MERCHANTNUMBER", "132423"); 41 // builder.Form.Add("PAYMENTTYPE", "32hvhsvhv"); 41 42 42 var result = controller.Status() as ContentResult;43 System.Diagnostics.Debug.WriteLine("Zły formt paymenttype. " + " Count: " + repConfirm.Count());44 Assert.That(repConfirm.Count().Equals(0));45 Assert.That(result.Content.Contains("FormatException"));46 }47 [Test]48 [Category("Unit")]49 public void FormatException_Eventtype_Test()50 {51 IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext());52 var builder = new TestControllerBuilder();53 var controller = new PlatnoscController(null, null, repConfirm, null);54 builder.InitializeController(controller);55 builder.Form.Add("MERCHANTNUMBER", "132423");56 builder.Form.Add("EVENTTYPE", "32hvhsvhv");43 // var result = controller.Status() as ContentResult; 44 // System.Diagnostics.Debug.WriteLine("Zły formt paymenttype. " + " Count: " + repConfirm.Count()); 45 // Assert.That(repConfirm.Count().Equals(0)); 46 // Assert.That(result.Content.Contains("FormatException")); 47 //} 48 //[Test] 49 //[Category("Unit")] 50 //public void FormatException_Eventtype_Test() 51 //{ 52 // IRepository<PotwierdzeniaEcard> repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 53 // var builder = new TestControllerBuilder(); 54 // var controller = new PlatnoscController(null, null, repConfirm, null); 55 // builder.InitializeController(controller); 56 // builder.Form.Add("MERCHANTNUMBER", "132423"); 57 // builder.Form.Add("EVENTTYPE", "32hvhsvhv"); 57 58 58 var result = controller.Status() as ContentResult;59 System.Diagnostics.Debug.WriteLine("Zły formt eventtype. " + " Count: " + repConfirm.Count());60 Assert.That(repConfirm.Count().Equals(0));61 Assert.That(result.Content.Contains("FormatException"));62 }63 [Test]64 [Category("Unit")]65 public void OverflowException_Ordernumber_Test()66 {67 var controller = new PlatnoscController();68 var builder = new TestControllerBuilder();69 builder.InitializeController(controller);70 builder.Form.Add("MERCHANTNUMBER", "132");71 builder.Form.Add("ORDERNUMBER", "12311111111111111");72 builder.Form.Add("VALIDATIONCODE", "AAA");59 // var result = controller.Status() as ContentResult; 60 // System.Diagnostics.Debug.WriteLine("Zły formt eventtype. " + " Count: " + repConfirm.Count()); 61 // Assert.That(repConfirm.Count().Equals(0)); 62 // Assert.That(result.Content.Contains("FormatException")); 63 //} 64 //[Test] 65 //[Category("Unit")] 66 //public void OverflowException_Ordernumber_Test() 67 //{ 68 // var controller = new PlatnoscController(); 69 // var builder = new TestControllerBuilder(); 70 // builder.InitializeController(controller); 71 // builder.Form.Add("MERCHANTNUMBER", "132"); 72 // builder.Form.Add("ORDERNUMBER", "12311111111111111"); 73 // builder.Form.Add("VALIDATIONCODE", "AAA"); 73 74 74 var result = controller.Status() as ContentResult;75 System.Diagnostics.Debug.WriteLine("1. Wartosc ordernumber jest za duza.");76 System.Diagnostics.Debug.WriteLine("2. Contetnt: " + result.Content);77 Assert.That(result.Content.Contains("OverflowException"));78 }79 [Test]80 [Category("Unit")]81 public void IncorrectLength_Validationcode_Test()82 {83 var controller = new PlatnoscController();84 var builder = new TestControllerBuilder();85 builder.InitializeController(controller);86 builder.Form.Add("MERCHANTNUMBER", "132");87 builder.Form.Add("ORDERNUMBER", "1234");88 builder.Form.Add("VALIDATIONCODE", "AAAaaa");75 // var result = controller.Status() as ContentResult; 76 // System.Diagnostics.Debug.WriteLine("1. Wartosc ordernumber jest za duza."); 77 // System.Diagnostics.Debug.WriteLine("2. Contetnt: " + result.Content); 78 // Assert.That(result.Content.Contains("OverflowException")); 79 //} 80 //[Test] 81 //[Category("Unit")] 82 //public void IncorrectLength_Validationcode_Test() 83 //{ 84 // var controller = new PlatnoscController(); 85 // var builder = new TestControllerBuilder(); 86 // builder.InitializeController(controller); 87 // builder.Form.Add("MERCHANTNUMBER", "132"); 88 // builder.Form.Add("ORDERNUMBER", "1234"); 89 // builder.Form.Add("VALIDATIONCODE", "AAAaaa"); 89 90 90 var result = controller.Status() as ContentResult;91 System.Diagnostics.Debug.WriteLine("1. Validationcode jest zbyt dlugi. Conajwyzej 3 znaki.");92 System.Diagnostics.Debug.WriteLine("2. Contetnt: " + result.Content);93 Assert.That(result.Content.Contains("SqlException"));94 }91 // var result = controller.Status() as ContentResult; 92 // System.Diagnostics.Debug.WriteLine("1. Validationcode jest zbyt dlugi. Conajwyzej 3 znaki."); 93 // System.Diagnostics.Debug.WriteLine("2. Contetnt: " + result.Content); 94 // Assert.That(result.Content.Contains("SqlException")); 95 //} 95 96 } 96 97 } -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs
r969 r970 1 using NUnit.Framework; 2 using Platnosci.Core.Linq; 1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 3 using NUnit.Framework; 3 4 4 5 namespace Platnosci.Tests.Web … … 14 15 { 15 16 var fake = new FakeDataContext(); 16 var vPlatnosciEcardRepository = new Repository< vPlatnosciEcard>(fake);17 var vPlatnosciEcardRepository = new Repository<Invoice>(fake); 17 18 18 19 var platnosc = _function.CreateInvoice(123, "nip", "", 0, 0); 19 20 vPlatnosciEcardRepository.Insert(platnosc); 20 21 21 System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count()); 22 System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count()); 22 23 var pl = vPlatnosciEcardRepository.FindOne(123); 23 24 System.Diagnostics.Debug.WriteLine("Wartosc nip ma byc 'nip'. Jest " + pl.nip); 24 25 Assert.That(pl.nip, Is.EqualTo("nip")); 25 } 26 26 } 27 27 } 28 28 } -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/ValidationMerchantClassTests.cs
r969 r970 1 using NUnit.Framework;2 using Platnosci.Core.Linq;1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 3 3 4 using NUnit.Framework; 4 5 5 6 namespace Platnosci.Tests.Web -
trunk/eCard/eCardMVC/Platnosci.Tests/Web/eCardDataTests.cs
r969 r970 1 1 using System; 2 using adMoto.Payments.Core; 3 using adMoto.Payments.Core.Data; 2 4 using NUnit.Framework; 3 5 using Platnosci.Models; 4 using Platnosci.Core.Linq;5 6 6 7 namespace Platnosci.Tests.Web … … 186 187 var amountEUR = 1300; 187 188 188 var repVPayment = new Repository< vPlatnosciEcard>(new FakeDataContext());189 var repVPayment = new Repository<Invoice>(new FakeDataContext()); 189 190 var invoice = _function.CreateForeignInvoice(idFaktury, "nip1", "abc/2009", amountPL, 0, amountEUR, "EUR"); 190 191 repVPayment.Insert(invoice); -
trunk/eCard/eCardMVC/Platnosci/Controllers/AccountController.cs
r950 r970 3 3 using System.Web.Mvc; 4 4 using System.Web.Security; 5 using Platnosci.Core.Linq; 5 using adMoto.Payments.Core; 6 using adMoto.Payments.Core.Data; 7 using adMoto.Payments.Core.Interfaces; 6 8 using Platnosci.Models; 7 using Platnosci.Core.Interface;8 9 9 10 namespace Platnosci.Controllers … … 12 13 public class AccountController : Controller 13 14 { 14 private readonly IRepository< vPlatnosciEcard> _repository;15 private readonly IRepository<Invoice> _repository; 15 16 private readonly FunkcjePlatnosci _funkcjePlatnosci; 16 17 … … 23 24 public AccountController() 24 25 { 25 _repository = new Repository< vPlatnosciEcard>(new DataContext());26 _repository = new Repository<Invoice>(new DataContext()); 26 27 FormsAuth = new FormsAuthenticationService(); 27 28 _funkcjePlatnosci = new FunkcjePlatnosci(); 28 29 } 29 30 30 public AccountController(IFormsAuthentication formsAuth, IRepository< vPlatnosciEcard> repository, FunkcjePlatnosci func)31 public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, FunkcjePlatnosci func) 31 32 { 32 33 _repository = repository; … … 50 51 { 51 52 _funkcjePlatnosci.SetLanguage(language); 52 var platnosc = new vPlatnosciEcard();53 var platnosc = new Invoice(); 53 54 if (!ValidateLogOn(nip, numerFaktury)) 54 55 { -
trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs
r959 r970 2 2 using System.Linq; 3 3 using System.Web.Mvc; 4 using adMoto.Payments.Core; 5 using adMoto.Payments.Core.Data; 6 using adMoto.Payments.Core.Interfaces; 4 7 using Platnosci.Models; 5 using Platnosci.Core.Linq;6 using Platnosci.Core.Interface;7 using System.Configuration;8 using System.Net;9 using System.IO;10 using System.Threading;11 8 12 9 namespace Platnosci.Controllers … … 15 12 public class MerchantController : Controller 16 13 { 17 private readonly IRepository< vPlatnosciEcard> _repVPayment;14 private readonly IRepository<Invoice> _repVPayment; 18 15 private readonly IRepository<PlatnosciEcard> _repPayment; 19 16 private readonly FunkcjePlatnosci _funkcjePlatnosci; … … 23 20 public MerchantController() 24 21 { 25 _repVPayment = new Repository< vPlatnosciEcard>(new DataContext());22 _repVPayment = new Repository<Invoice>(new DataContext()); 26 23 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 27 24 _funkcjePlatnosci = new FunkcjePlatnosci(_repPayment); … … 29 26 _eCardData = new eCardData(_repPayment); 30 27 } 31 public MerchantController(IRepository< vPlatnosciEcard> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate)28 public MerchantController(IRepository<Invoice> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate) 32 29 { 33 30 _repVPayment = repVPayment; -
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r969 r970 1 1 using System; 2 2 using System.Linq; 3 using System.Web;4 3 using System.Web.Mvc; 4 using adMoto.Payments.Core; 5 using adMoto.Payments.Core.Data; 6 using adMoto.Payments.Core.Interfaces; 5 7 using Elmah; 6 8 using Platnosci.Models; 7 using Platnosci.Core.Linq;8 using Platnosci.Core.Interface;9 using ApplicationException=Elmah.ApplicationException;10 9 11 10 namespace Platnosci.Controllers 12 11 { 13 14 //[Authorize]15 12 public class PlatnoscController : Controller 16 13 { 17 14 public const string ISPAID = "payment_deposited"; //transakcja potwierdzona do rozliczenia 18 private readonly IRepository< vPlatnosciEcard> _repVPayment;15 private readonly IRepository<Invoice> _repVPayment; 19 16 private readonly IRepository<PlatnosciEcard> _repPayment; 20 17 private readonly IRepository<PotwierdzeniaEcard> _repConfirm; … … 24 21 public PlatnoscController() 25 22 { 26 _repVPayment = new Repository< vPlatnosciEcard>(new DataContext());23 _repVPayment = new Repository<Invoice>(new DataContext()); 27 24 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 28 25 _repConfirm = new Repository<PotwierdzeniaEcard>(new DataContext()); … … 30 27 _translateManager = new Translation(); 31 28 } 32 public PlatnoscController(IRepository< vPlatnosciEcard> repVPayment, IRepository<PlatnosciEcard> repPayment, IRepository<PotwierdzeniaEcard> repConfirm, ITranslateManager translate)29 public PlatnoscController(IRepository<Invoice> repVPayment, IRepository<PlatnosciEcard> repPayment, IRepository<PotwierdzeniaEcard> repConfirm, ITranslateManager translate) 33 30 { 34 31 _repVPayment = repVPayment; … … 64 61 return View(invoiceDeatailsViewData); 65 62 } 63 66 64 [Authorize] 67 65 [AcceptVerbs(HttpVerbs.Post)] … … 139 137 public ActionResult Status() 140 138 { 141 ErrorSignal.FromCurrentContext().Raise(new Exception(), System.Web.HttpContext.Current); 139 if (System.Web.HttpContext.Current != null) 140 ErrorSignal.FromCurrentContext().Raise(new Exception(), System.Web.HttpContext.Current); 142 141 143 142 var potwierdzenie = new PotwierdzeniaEcard(); … … 201 200 } 202 201 203 private InvoiceDetailsViewData InitInvoiceDetailsViewData( vPlatnosciEcardplatnosc)202 private InvoiceDetailsViewData InitInvoiceDetailsViewData(Invoice platnosc) 204 203 { 205 204 var invoiceDeatailsViewData = new InvoiceDetailsViewData(); -
trunk/eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs
r966 r970 1 1 using System; 2 2 using System.Web; 3 using Platnosci.Core.Linq;4 3 using System.Threading; 5 4 using System.Globalization; 6 5 using System.Configuration; 7 6 using System.Security.Principal; 8 using Platnosci.Core.Interface; 7 using adMoto.Payments.Core; 8 using adMoto.Payments.Core.Data; 9 using adMoto.Payments.Core.Interfaces; 9 10 10 11 … … 50 51 } 51 52 52 public bool UserIdentity( vPlatnosciEcardplatnosc, string userName)53 public bool UserIdentity(Invoice platnosc, string userName) 53 54 { 54 55 return platnosc != null && platnosc.nip == userName; 55 56 } 56 57 57 public Waluta SetAmount( vPlatnosciEcardplatnosc)58 public Waluta SetAmount(Invoice platnosc) 58 59 { 59 60 var waluta = new Waluta(); … … 122 123 var css = ConfigurationManager.AppSettings["Css"]; 123 124 124 if (css == "truck") 125 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresTruck") + " - "; 126 else if (css == "admoto") 127 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresAdmoto") + " - "; 125 switch (css) 126 { 127 case "truck": 128 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresTruck") + " - "; 129 break; 130 case "admoto": 131 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresAdmoto") + " - "; 132 break; 133 } 128 134 129 135 return str; … … 142 148 return er; 143 149 } 144 public PlatnosciEcard CreateAndAddNewPyment( vPlatnosciEcardplatnosc, Waluta waluta, Payer payer, string sessionId)150 public PlatnosciEcard CreateAndAddNewPyment(Invoice platnosc, Waluta waluta, Payer payer, string sessionId) 145 151 { 146 152 var newPayment = new PlatnosciEcard(); … … 167 173 return newPayment; 168 174 } 169 public ErrorViewData IsError(vPlatnosciEcard platnosc, String UserName) 175 176 public ErrorViewData IsError(Invoice platnosc, String UserName) 170 177 { 171 178 var errortxt = ""; … … 178 185 return InitErrorViewData(errortxt, 0); 179 186 } 187 180 188 public string GetLanguage() 181 189 { 182 stringlanguage = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper();190 var language = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper(); 183 191 184 192 if (language != "PL" && language != "EN" && language != "DE") 185 193 return "PL"; //domyślny jezyk, w ktorym ma byc wyświetlony formularz na stronie eCard 186 else187 return language;194 195 return language; 188 196 } 189 197 } -
trunk/eCard/eCardMVC/Platnosci/Models/InvoiceDetailsViewData.cs
r951 r970 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.Mvc; 6 using Platnosci.Core.Linq; 7 1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 8 3 9 4 namespace Platnosci.Models … … 11 6 public class InvoiceDetailsViewData 12 7 { 13 public vPlatnosciEcardvPlatnosciEcard { get; set; }8 public Invoice vPlatnosciEcard { get; set; } 14 9 public Payer Payer {get; set;} 15 10 public string brutto { get; set; } -
trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
r968 r970 4 4 using System.Linq; 5 5 using System.Configuration; 6 using Platnosci.Core.Linq; 7 using Platnosci.Core.Interface; 6 using adMoto.Payments.Core; 7 using adMoto.Payments.Core.Data; 8 using adMoto.Payments.Core.Interfaces; 8 9 9 10 namespace Platnosci.Models … … 38 39 return dane; 39 40 } 40 public Merchant CreateMerchantData( vPlatnosciEcardinvoice, Payer payer, string lang, string sessionId)41 public Merchant CreateMerchantData(Invoice invoice, Payer payer, string lang, string sessionId) 41 42 { 42 43 var merchant = new Merchant(); -
trunk/eCard/eCardMVC/Platnosci/Platnosci.Web.csproj
r969 r970 129 129 </ItemGroup> 130 130 <ItemGroup> 131 <ProjectReference Include="..\Platnosci.Core\Platnosci.Core.csproj">132 <Project>{329506B5-F705-46AE-A31D-799141FEA70E}</Project>133 <Name>Platnosci.Core</Name>134 </ProjectReference>135 </ItemGroup>136 <ItemGroup>137 131 <Content Include="Content\admoto.css" /> 138 132 <Content Include="Content\truck.css" /> … … 187 181 <Content Include="Views\Platnosc\Paid.aspx" /> 188 182 <Content Include="Views\Platnosc\Status.aspx" /> 183 </ItemGroup> 184 <ItemGroup> 185 <ProjectReference Include="..\adMoto.Payments.Core\adMoto.Payments.Core.csproj"> 186 <Project>{C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}</Project> 187 <Name>adMoto.Payments.Core</Name> 188 </ProjectReference> 189 189 </ItemGroup> 190 190 <ItemGroup> -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/DataContext.cs
r954 r970 3 3 using System.Configuration; 4 4 using System.Linq; 5 using Platnosci.Core.Interface;5 using adMoto.Payments.Core.Interfaces; 6 6 7 namespace Platnosci.Core.Linq7 namespace adMoto.Payments.Core.Data 8 8 { 9 9 public class DataContext : IDataContext … … 44 44 } 45 45 46 public IQueryable< vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer)46 public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 47 47 { 48 var query = from i in _dataContext. vPlatnosciEcards48 var query = from i in _dataContext.Invoices 49 49 where (i.nip == nip && i.Faktura_Numer == numer) 50 50 select i; … … 52 52 } 53 53 54 public IQueryable< vPlatnosciEcard> FindInvoiceById(int id)54 public IQueryable<Invoice> FindInvoiceById(int id) 55 55 { 56 var query = from i in _dataContext. vPlatnosciEcards56 var query = from i in _dataContext.Invoices 57 57 where i.ID_faktury == id 58 58 select i; … … 63 63 { 64 64 var query = _dataContext.PlatnosciEcards 65 .Where(vp => vp.IDFaktury == idFaktury && vp.Status == true)66 .OrderByDescending(vp => vp.IDFaktury);65 .Where(vp => vp.IDFaktury == idFaktury && vp.Status == true) 66 .OrderByDescending(vp => vp.IDFaktury); 67 67 68 68 query.ToList(); … … 74 74 var ecard = pt; 75 75 var query2 = _dataContext.PotwierdzeniaEcards 76 .Where(ps => ps.ORDERNUMBER == ecard.ORDERNUMBER && ps.CURRENTSTATE == "payment_deposited")77 .OrderBy(ps => ps.id);76 .Where(ps => ps.ORDERNUMBER == ecard.ORDERNUMBER && ps.CURRENTSTATE == "payment_deposited") 77 .OrderBy(ps => ps.id); 78 78 79 79 for (var i = 0; i < query2.ToList().Count; i++) -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml
r866 r970 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Database Name="BAZA_REKLAM_TEST" Class="PlatnosciDataContext" Serialization="Unidirectional" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007"> 3 <Connection Mode=" WebSettings" ConnectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True;User ID=wwwadmin" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="BAZA_REKLAM_TESTConnectionString" Provider="System.Data.SqlClient" />3 <Connection Mode="AppSettings" ConnectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True;User ID=wwwadmin" SettingsObjectName="adMoto.Payments.Core.Properties.Settings" SettingsPropertyName="BAZA_REKLAM_TESTConnectionString" Provider="System.Data.SqlClient" /> 4 4 <Table Name="dbo.PlatnosciEcard" Member="PlatnosciEcards"> 5 5 <Type Name="PlatnosciEcard"> … … 124 124 <Association Name="FAKTURY_PlatnosciEcard" Member="PlatnosciEcards" ThisKey="ID_FAKTURY" OtherKey="IDFaktury" Type="PlatnosciEcard" /> 125 125 <Association Name="FAKTURY_FAKTURA_DETAIL" Member="FAKTURA_DETAILs" ThisKey="ID_FAKTURY" OtherKey="ID_FAKTURY" Type="FAKTURA_DETAIL" /> 126 <Association Name="FAKTURY_vPlatnosciEcard" Member=" vPlatnosciEcards" Storage="_vDanePlatnosciEcards" ThisKey="ID_FAKTURY" OtherKey="ID_faktury" Type="vPlatnosciEcard" />126 <Association Name="FAKTURY_vPlatnosciEcard" Member="Invoices" Storage="_vDanePlatnosciEcards" ThisKey="ID_FAKTURY" OtherKey="ID_faktury" Type="Invoice" /> 127 127 </Type> 128 128 </Table> 129 <Table Name="dbo.vDanePlatnosciEcard" Member=" vPlatnosciEcards">130 <Type Name=" vPlatnosciEcard">129 <Table Name="dbo.vDanePlatnosciEcard" Member="Invoices"> 130 <Type Name="Invoice"> 131 131 <Column Name="ID_faktury" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 132 132 <Column Name="Numer" Type="System.Int32" DbType="Int" CanBeNull="true" /> -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml.layout
r866 r970 49 49 </associationConnector> 50 50 <classShape Id="c6647e8d-66a1-44a6-9529-ad5c33238bb2" absoluteBounds="2.875, 5.625, 2, 4.8761417643229157"> 51 <DataClassMoniker Name="/PlatnosciDataContext/ vPlatnosciEcard" />51 <DataClassMoniker Name="/PlatnosciDataContext/Invoice" /> 52 52 <nestedChildShapes> 53 53 <elementListCompartment Id="b17d6419-1b48-4a53-8b33-c4e4c101f28c" absoluteBounds="2.8899999999999997, 6.0850000000000009, 1.9700000000000002, 4.3161417643229161" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 54 54 </nestedChildShapes> 55 55 </classShape> 56 <associationConnector edgePoints="[(2.5 : 7.20654418945313); (2.875 : 7.20654418945313)]" fixedFrom=" Algorithm" fixedTo="Algorithm">56 <associationConnector edgePoints="[(2.5 : 7.20654418945313); (2.875 : 7.20654418945313)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 57 57 <AssociationMoniker Name="/PlatnosciDataContext/FAKTURY/FAKTURY_vPlatnosciEcard" /> 58 58 <nodes> -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.designer.cs
r949 r970 3 3 // <auto-generated> 4 4 // This code was generated by a tool. 5 // Runtime Version:2.0.50727.3 0825 // Runtime Version:2.0.50727.3603 6 6 // 7 7 // Changes to this file may cause incorrect behavior and will be lost if … … 10 10 //------------------------------------------------------------------------------ 11 11 12 namespace Platnosci.Core.Linq12 namespace adMoto.Payments.Core.Data 13 13 { 14 14 using System.Data.Linq; … … 22 22 using System.ComponentModel; 23 23 using System; 24 using Platnosci.Core.Interface; 24 25 25 26 26 [System.Data.Linq.Mapping.DatabaseAttribute(Name="BAZA_REKLAM_TEST")] 27 27 public partial class PlatnosciDataContext : System.Data.Linq.DataContext 28 28 { 29 private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 29 30 private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 30 31 31 32 #region Extensibility Method Definitions … … 43 44 partial void UpdateFAKTURY(FAKTURY instance); 44 45 partial void DeleteFAKTURY(FAKTURY instance); 45 partial void Insert vPlatnosciEcard(vPlatnosciEcardinstance);46 partial void Update vPlatnosciEcard(vPlatnosciEcardinstance);47 partial void Delete vPlatnosciEcard(vPlatnosciEcardinstance);46 partial void InsertInvoice(Invoice instance); 47 partial void UpdateInvoice(Invoice instance); 48 partial void DeleteInvoice(Invoice instance); 48 49 #endregion 49 public PlatnosciDataContext() :base(global::Platnosci.Core.Properties.Settings.Default.BAZA_REKLAM_TESTConnectionString, mappingSource) 50 { 51 OnCreated(); 52 } 53 54 public PlatnosciDataContext(string connection) : base(connection, mappingSource) 55 { 56 OnCreated(); 57 } 58 59 public PlatnosciDataContext(System.Data.IDbConnection connection) : base(connection, mappingSource) 60 { 61 OnCreated(); 62 } 63 64 public PlatnosciDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :base(connection, mappingSource) 65 { 66 OnCreated(); 67 } 68 69 public PlatnosciDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :base(connection, mappingSource) 70 { 71 OnCreated(); 72 } 50 51 public PlatnosciDataContext() : 52 base(global::adMoto.Payments.Core.Properties.Settings.Default.BAZA_REKLAM_TESTConnectionString, mappingSource) 53 { 54 OnCreated(); 55 } 56 57 public PlatnosciDataContext(string connection) : 58 base(connection, mappingSource) 59 { 60 OnCreated(); 61 } 62 63 public PlatnosciDataContext(System.Data.IDbConnection connection) : 64 base(connection, mappingSource) 65 { 66 OnCreated(); 67 } 68 69 public PlatnosciDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 70 base(connection, mappingSource) 71 { 72 OnCreated(); 73 } 74 75 public PlatnosciDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 76 base(connection, mappingSource) 77 { 78 OnCreated(); 79 } 80 73 81 public System.Data.Linq.Table<PlatnosciEcard> PlatnosciEcards 74 82 { … … 103 111 } 104 112 105 public System.Data.Linq.Table< vPlatnosciEcard> vPlatnosciEcards106 { 107 get 108 { 109 return this.GetTable< vPlatnosciEcard>();113 public System.Data.Linq.Table<Invoice> Invoices 114 { 115 get 116 { 117 return this.GetTable<Invoice>(); 110 118 } 111 119 } … … 235 243 [Column(Storage="_IDFaktury", DbType="Int")] 236 244 [DataMember(Order=2)] 237 public System.Nullable<int> IDFaktury 245 public System.Nullable<int> IDFaktury 238 246 { 239 247 get … … 1964 1972 private EntitySet<FAKTURA_DETAIL> _FAKTURA_DETAILs; 1965 1973 1966 private EntitySet< vPlatnosciEcard> _vDanePlatnosciEcards;1974 private EntitySet<Invoice> _vDanePlatnosciEcards; 1967 1975 1968 1976 private bool serializing; … … 3054 3062 [Association(Name="FAKTURY_vPlatnosciEcard", Storage="_vDanePlatnosciEcards", ThisKey="ID_FAKTURY", OtherKey="ID_faktury")] 3055 3063 [DataMember(Order=48, EmitDefaultValue=false)] 3056 public EntitySet< vPlatnosciEcard> vPlatnosciEcards3064 public EntitySet<Invoice> Invoices 3057 3065 { 3058 3066 get … … 3115 3123 } 3116 3124 3117 private void attach_vDanePlatnosciEcards( vPlatnosciEcardentity)3125 private void attach_vDanePlatnosciEcards(Invoice entity) 3118 3126 { 3119 3127 this.SendPropertyChanging(); … … 3121 3129 } 3122 3130 3123 private void detach_vDanePlatnosciEcards( vPlatnosciEcardentity)3131 private void detach_vDanePlatnosciEcards(Invoice entity) 3124 3132 { 3125 3133 this.SendPropertyChanging(); … … 3131 3139 this._PlatnosciEcards = new EntitySet<PlatnosciEcard>(new Action<PlatnosciEcard>(this.attach_PlatnosciEcards), new Action<PlatnosciEcard>(this.detach_PlatnosciEcards)); 3132 3140 this._FAKTURA_DETAILs = new EntitySet<FAKTURA_DETAIL>(new Action<FAKTURA_DETAIL>(this.attach_FAKTURA_DETAILs), new Action<FAKTURA_DETAIL>(this.detach_FAKTURA_DETAILs)); 3133 this._vDanePlatnosciEcards = new EntitySet< vPlatnosciEcard>(new Action<vPlatnosciEcard>(this.attach_vDanePlatnosciEcards), new Action<vPlatnosciEcard>(this.detach_vDanePlatnosciEcards));3141 this._vDanePlatnosciEcards = new EntitySet<Invoice>(new Action<Invoice>(this.attach_vDanePlatnosciEcards), new Action<Invoice>(this.detach_vDanePlatnosciEcards)); 3134 3142 OnCreated(); 3135 3143 } … … 3159 3167 [Table(Name="dbo.vDanePlatnosciEcard")] 3160 3168 [DataContract()] 3161 public partial class vPlatnosciEcard: INotifyPropertyChanging, INotifyPropertyChanged3169 public partial class Invoice : INotifyPropertyChanging, INotifyPropertyChanged 3162 3170 { 3163 3171 … … 3272 3280 #endregion 3273 3281 3274 public vPlatnosciEcard()3282 public Invoice() 3275 3283 { 3276 3284 this.Initialize(); … … 3823 3831 { 3824 3832 this._FAKTURY.Entity = null; 3825 previousValue. vPlatnosciEcards.Remove(this);3833 previousValue.Invoices.Remove(this); 3826 3834 } 3827 3835 this._FAKTURY.Entity = value; 3828 3836 if ((value != null)) 3829 3837 { 3830 value. vPlatnosciEcards.Add(this);3838 value.Invoices.Add(this); 3831 3839 this._ID_faktury = value.ID_FAKTURY; 3832 3840 } -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/PlatnosciEcard.cs
r949 r970 1 using Platnosci.Core.Interface;1 using adMoto.Payments.Core.Interfaces; 2 2 3 namespace Platnosci.Core.Linq3 namespace adMoto.Payments.Core.Data 4 4 { 5 5 public partial class PlatnosciEcard : IIdentifiable -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/PotwierdzeniaEcard.cs
r949 r970 1 using Platnosci.Core.Interface;1 using adMoto.Payments.Core.Interfaces; 2 2 3 namespace Platnosci.Core.Linq3 namespace adMoto.Payments.Core.Data 4 4 { 5 5 public partial class PotwierdzeniaEcard : IIdentifiable -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/vPlatnosciEcard.cs
r949 r970 1 using Platnosci.Core.Interface;1 using adMoto.Payments.Core.Interfaces; 2 2 3 namespace Platnosci.Core.Linq3 namespace adMoto.Payments.Core.Data 4 4 { 5 public partial class vPlatnosciEcard: IIdentifiable5 public partial class Invoice : IIdentifiable 6 6 { 7 7 public string FullName -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IDataContext.cs
r949 r970 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using Platnosci.Core.Linq;4 using adMoto.Payments.Core.Data; 5 5 6 namespace Platnosci.Core.Interface6 namespace adMoto.Payments.Core.Interfaces 7 7 { 8 8 public interface IDataContext … … 12 12 void Insert<T>(T item) where T : class; 13 13 void Delete<T>(T item) where T : class; 14 IQueryable< vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer);14 IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer); 15 15 List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury); 16 16 int GetOrdernumber(string description, int? idfaktury, DateTime? data); -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IIdentifiable.cs
r949 r970 1 namespace Platnosci.Core.Interface1 namespace adMoto.Payments.Core.Interfaces 2 2 { 3 3 public interface IIdentifiable -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IRepository.cs
r949 r970 3 3 using System.Linq; 4 4 using System.Linq.Expressions; 5 using Platnosci.Core.Linq;5 using adMoto.Payments.Core.Data; 6 6 7 namespace Platnosci.Core.Interface7 namespace adMoto.Payments.Core.Interfaces 8 8 { 9 9 public interface IRepository<T> where T : IIdentifiable … … 37 37 IQueryable<T> Find(Expression<Func<T, bool>> expression); 38 38 39 IQueryable< vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer);39 IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer); 40 40 41 41 List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury); -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/ITranslateManager.cs
r949 r970 1 namespace Platnosci.Core.Interface1 namespace adMoto.Payments.Core.Interfaces 2 2 { 3 3 public interface ITranslateManager -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Merchant.cs
r952 r970 1 1 using System; 2 namespace Platnosci.Core.Linq 2 using adMoto.Payments.Core.Data; 3 4 namespace adMoto.Payments.Core 3 5 { 4 6 public class Merchant -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Payer.cs
r949 r970 1 namespace Platnosci.Core.Linq1 namespace adMoto.Payments.Core 2 2 { 3 3 public class Payer -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Repository.cs
r949 r970 3 3 using System.Linq; 4 4 using System.Linq.Expressions; 5 using Platnosci.Core.Interface; 5 using adMoto.Payments.Core.Data; 6 using adMoto.Payments.Core.Interfaces; 6 7 7 8 8 namespace Platnosci.Core.Linq9 namespace adMoto.Payments.Core 9 10 { 10 11 /// <summary> … … 59 60 } 60 61 public void Insert(T entity) 61 {62 DataContext.Insert(entity);63 }62 { 63 DataContext.Insert(entity); 64 } 64 65 public void Delete(T entity) 65 66 { … … 82 83 return DataContext.GetTable<T>(); 83 84 } 84 public IQueryable< vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer)85 public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 85 86 { 86 87 return DataContext.FindInvoiceByNipNumber(nip, numer); -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Translation.cs
r949 r970 1 1 using System.Web; 2 using Platnosci.Core.Interface;2 using adMoto.Payments.Core.Interfaces; 3 3 4 namespace Platnosci.Core.Linq4 namespace adMoto.Payments.Core 5 5 { 6 6 public class Translation: ITranslateManager -
trunk/eCard/eCardMVC/adMoto.Payments.Core/Waluta.cs
r949 r970 1 namespace Platnosci.Core.Linq1 namespace adMoto.Payments.Core 2 2 { 3 3 public class Waluta
