Zbiór zmian 970

Pokaż
Ignoruj:
Data:
2009-12-23 11:26:06 (16 years ago)
Autor:
marek
Opis:

re #215 - dodanie nowego projektu z lepsza nazwa i typem projektu

Lokalizacja:
trunk
Pliki:
9 dodane
19 zmodyfikowane
17 skopiowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard.MVC.sln

    r866 r970  
    11 
    22Microsoft 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 
    64Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platnosci.Web", "eCard\eCardMVC\Platnosci\Platnosci.Web.csproj", "{19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}" 
    75EndProject 
    86Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platnosci.Tests", "eCard\eCardMVC\Platnosci.Tests\Platnosci.Tests.csproj", "{1FD307C6-4D2F-4013-BD60-DD36FFE08CD4}" 
     7EndProject 
     8Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "adMoto.Payments.Core", "eCard\eCardMVC\adMoto.Payments.Core\adMoto.Payments.Core.csproj", "{C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}" 
    99EndProject 
    1010Global 
     
    1414        EndGlobalSection 
    1515        GlobalSection(ProjectConfigurationPlatforms) = postSolution 
    16                 {329506B5-F705-46AE-A31D-799141FEA70E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 
    17                 {329506B5-F705-46AE-A31D-799141FEA70E}.Debug|Any CPU.Build.0 = Debug|Any CPU 
    18                 {329506B5-F705-46AE-A31D-799141FEA70E}.Release|Any CPU.ActiveCfg = Release|Any CPU 
    19                 {329506B5-F705-46AE-A31D-799141FEA70E}.Release|Any CPU.Build.0 = Release|Any CPU 
    2016                {19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 
    2117                {19B73EC2-0D53-4F8C-91E1-A08FCC0174E5}.Debug|Any CPU.Build.0 = Debug|Any CPU 
     
    2622                {1FD307C6-4D2F-4013-BD60-DD36FFE08CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU 
    2723                {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 
    2828        EndGlobalSection 
    2929        GlobalSection(SolutionProperties) = preSolution 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Platnosci.Tests.csproj

    r963 r970  
    9999  </ItemGroup> 
    100100  <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> 
    104104    </ProjectReference> 
    105105    <ProjectReference Include="..\Platnosci\Platnosci.Web.csproj"> 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeDataContext.cs

    r951 r970  
    22using System.Collections.Generic; 
    33using System.Linq; 
    4 using Platnosci.Core.Interface; 
    5 using Platnosci.Core.Linq; 
     4using adMoto.Payments.Core.Data; 
     5using adMoto.Payments.Core.Interfaces; 
    66 
    77namespace Platnosci.Tests.Web 
     
    4747        { 
    4848        } 
    49         public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 
     49        public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 
    5050        { 
    5151            throw new NotImplementedException(); 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslation.cs

    r931 r970  
    1 using Platnosci.Core.Interface; 
     1using adMoto.Payments.Core.Interfaces; 
    22 
    33namespace Platnosci.Tests.Web 
    44{ 
    5     public class FakeTranslation: ITranslateManager 
     5    public class FakeTranslation : ITranslateManager 
    66    { 
    77        public string Translate(string className, string keyName) 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/Function.cs

    r957 r970  
    11using System; 
    2 using Platnosci.Core.Linq; 
     2using adMoto.Payments.Core; 
     3using adMoto.Payments.Core.Data; 
    34using System.Web.Mvc; 
    45using Moq; 
     
    89    public class Function 
    910    { 
    10         public vPlatnosciEcard CreateInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy) 
     11        public Invoice CreateInvoice(int id, string nip, string invoiceNumber, decimal brutto, byte systemKsiegowy) 
    1112        { 
    12             var platnosc = new vPlatnosciEcard(); 
     13            var platnosc = new Invoice(); 
    1314            platnosc.ID_faktury = id; 
    1415            platnosc.nip = nip; 
     
    1920            return platnosc; 
    2021        } 
    21         public vPlatnosciEcard CreateForeignInvoice(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) 
    2223        { 
    23             var platnosc = new vPlatnosciEcard(); 
     24            var platnosc = new Invoice(); 
    2425            platnosc.ID_faktury = id; 
    2526            platnosc.nip = nip; 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/FunkcjePlatnosciTests.cs

    r969 r970  
    11using System.Linq; 
     2using adMoto.Payments.Core; 
     3using adMoto.Payments.Core.Data; 
     4using adMoto.Payments.Core.Interfaces; 
    25using NUnit.Framework; 
    36using Platnosci.Models; 
    4 using Platnosci.Core.Linq; 
    5 using Platnosci.Core.Interface; 
    6  
    77 
    88namespace 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; 
     1using adMoto.Payments.Core; 
     2using adMoto.Payments.Core.Data; 
     3using adMoto.Payments.Core.Interfaces; 
     4using NUnit.Framework; 
    45using Platnosci.Controllers; 
    56using Platnosci.Models; 
     
    1920        { 
    2021            //Arrange 
    21             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    22             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 
     22            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     23            var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 
    2324            repVPayment.Insert(platnosc); 
    2425             
    25             Payer payer = _function.CreatePayer(123, "test", "test"); 
     26            var payer = _function.CreatePayer(123, "test", "test"); 
    2627             
    2728            var controller = new MerchantController(repVPayment, null, _translateManager); 
     
    4243        { 
    4344            //Arrange 
    44             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    45             vPlatnosciEcard platnosc = _function.CreateInvoice(12, "nip1", "", 0, 0); 
     45            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     46            var platnosc = _function.CreateInvoice(12, "nip1", "", 0, 0); 
    4647            repVPayment.Insert(platnosc); 
    4748 
    48             Payer payer = _function.CreatePayer(123, "test", "test"); 
     49            var payer = _function.CreatePayer(123, "test", "test"); 
    4950 
    5051            var controller = new MerchantController(repVPayment, null, _translateManager); 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs

    r969 r970  
    11using System; 
    2 using System.Linq; 
    32using System.Web.Mvc; 
    4  
     3using adMoto.Payments.Core; 
     4using adMoto.Payments.Core.Data; 
     5using adMoto.Payments.Core.Interfaces; 
    56using NUnit.Framework; 
    6 using MvcContrib.TestHelper; 
    77using Platnosci.Controllers; 
    8  
    9 using Platnosci.Core.Interface; 
    10 using Platnosci.Core.Linq; 
    118using Platnosci.Models; 
    129 
     
    141138        { 
    142139            //Arrange 
    143             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
     140            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
    144141            var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 
    145142            repVPayment.Insert(platnosc); 
     
    162159        { 
    163160            //Arrange 
    164             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    165             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 
     161            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     162            var platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 
    166163            repVPayment.Insert(platnosc); 
    167164 
     
    185182            //Arrange 
    186183            //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()); 
    188185            var invoice = _function.CreateInvoice(123, "nip1", "aaa", 0, 0); 
    189186            repVPayment.Insert(invoice); 
     
    212209        { 
    213210            //Arrange 
    214             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    215             vPlatnosciEcard platnosc = _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); 
    216213            repVPayment.Insert(platnosc); 
    217214 
     
    240237        { 
    241238            //Arrange 
    242             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    243             vPlatnosciEcard platnosc = _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); 
    244241            repVPayment.Insert(platnosc); 
    245242 
     
    261258        { 
    262259            //Arrange 
    263             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    264             vPlatnosciEcard platnosc = _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); 
    265262            repVPayment.Insert(platnosc); 
    266263 
     
    282279        { 
    283280            //Arrange 
    284             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    285             vPlatnosciEcard platnosc = _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             string name = "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"); 
    292289 
    293290            //Act 
     
    303300        { 
    304301            //Arrange 
    305             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    306             vPlatnosciEcard platnosc = _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             string surname = "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); 
    313310 
    314311            //Act 
     
    324321        { 
    325322            //Arrange 
    326             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    327             vPlatnosciEcard platnosc = _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); 
    328325            repVPayment.Insert(platnosc); 
    329326 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/StatusTest.cs

    r969 r970  
    1 using NUnit.Framework; 
    2 using Platnosci.Core.Linq; 
    3 using Platnosci.Core.Interface; 
     1using adMoto.Payments.Core; 
     2using adMoto.Payments.Core.Data; 
     3using adMoto.Payments.Core.Interfaces; 
     4using NUnit.Framework; 
    45using MvcContrib.TestHelper; 
    56using Platnosci.Controllers; 
     
    1112    public class StatusTest 
    1213    { 
    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"); 
    2324 
    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"); 
    4142 
    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"); 
    5758 
    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"); 
    7374             
    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"); 
    8990             
    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        //} 
    9596    } 
    9697} 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs

    r969 r970  
    1 using NUnit.Framework; 
    2 using Platnosci.Core.Linq; 
     1using adMoto.Payments.Core; 
     2using adMoto.Payments.Core.Data; 
     3using NUnit.Framework; 
    34 
    45namespace Platnosci.Tests.Web 
     
    1415        { 
    1516            var fake = new FakeDataContext(); 
    16             var vPlatnosciEcardRepository = new Repository<vPlatnosciEcard>(fake); 
     17            var vPlatnosciEcardRepository = new Repository<Invoice>(fake); 
    1718 
    1819            var platnosc = _function.CreateInvoice(123, "nip", "", 0, 0); 
    1920            vPlatnosciEcardRepository.Insert(platnosc); 
    2021 
    21             System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count());             
     22            System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count()); 
    2223            var pl = vPlatnosciEcardRepository.FindOne(123); 
    2324            System.Diagnostics.Debug.WriteLine("Wartosc nip ma byc 'nip'. Jest " + pl.nip); 
    2425            Assert.That(pl.nip, Is.EqualTo("nip")); 
    25         }         
    26  
     26        } 
    2727    } 
    2828} 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/ValidationMerchantClassTests.cs

    r969 r970  
    1 using NUnit.Framework; 
    2 using Platnosci.Core.Linq; 
     1using adMoto.Payments.Core; 
     2using adMoto.Payments.Core.Data; 
    33 
     4using NUnit.Framework; 
    45 
    56namespace Platnosci.Tests.Web 
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/eCardDataTests.cs

    r969 r970  
    11using System; 
     2using adMoto.Payments.Core; 
     3using adMoto.Payments.Core.Data; 
    24using NUnit.Framework; 
    35using Platnosci.Models; 
    4 using Platnosci.Core.Linq; 
    56 
    67namespace Platnosci.Tests.Web 
     
    186187            var amountEUR = 1300; 
    187188 
    188             var repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
     189            var repVPayment = new Repository<Invoice>(new FakeDataContext()); 
    189190            var invoice = _function.CreateForeignInvoice(idFaktury, "nip1", "abc/2009", amountPL, 0, amountEUR, "EUR"); 
    190191            repVPayment.Insert(invoice); 
  • trunk/eCard/eCardMVC/Platnosci/Controllers/AccountController.cs

    r950 r970  
    33using System.Web.Mvc; 
    44using System.Web.Security; 
    5 using Platnosci.Core.Linq; 
     5using adMoto.Payments.Core; 
     6using adMoto.Payments.Core.Data; 
     7using adMoto.Payments.Core.Interfaces; 
    68using Platnosci.Models; 
    7 using Platnosci.Core.Interface; 
    89 
    910namespace Platnosci.Controllers 
     
    1213    public class AccountController : Controller 
    1314    { 
    14         private readonly IRepository<vPlatnosciEcard> _repository; 
     15        private readonly IRepository<Invoice> _repository; 
    1516        private readonly FunkcjePlatnosci _funkcjePlatnosci; 
    1617 
     
    2324        public AccountController() 
    2425        { 
    25             _repository = new Repository<vPlatnosciEcard>(new DataContext()); 
     26            _repository = new Repository<Invoice>(new DataContext()); 
    2627            FormsAuth = new FormsAuthenticationService(); 
    2728            _funkcjePlatnosci = new FunkcjePlatnosci(); 
    2829        } 
    2930 
    30         public AccountController(IFormsAuthentication formsAuth, IRepository<vPlatnosciEcard> repository, FunkcjePlatnosci func) 
     31        public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, FunkcjePlatnosci func) 
    3132        { 
    3233            _repository = repository; 
     
    5051        { 
    5152            _funkcjePlatnosci.SetLanguage(language); 
    52             var platnosc = new vPlatnosciEcard(); 
     53            var platnosc = new Invoice(); 
    5354            if (!ValidateLogOn(nip, numerFaktury)) 
    5455            { 
  • trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs

    r959 r970  
    22using System.Linq; 
    33using System.Web.Mvc; 
     4using adMoto.Payments.Core; 
     5using adMoto.Payments.Core.Data; 
     6using adMoto.Payments.Core.Interfaces; 
    47using 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; 
    118 
    129namespace Platnosci.Controllers 
     
    1512    public class MerchantController : Controller 
    1613    { 
    17         private readonly IRepository<vPlatnosciEcard> _repVPayment; 
     14        private readonly IRepository<Invoice> _repVPayment; 
    1815        private readonly IRepository<PlatnosciEcard> _repPayment;  
    1916        private readonly FunkcjePlatnosci _funkcjePlatnosci; 
     
    2320        public MerchantController() 
    2421        { 
    25             _repVPayment = new Repository<vPlatnosciEcard>(new DataContext()); 
     22            _repVPayment = new Repository<Invoice>(new DataContext()); 
    2623            _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 
    2724            _funkcjePlatnosci = new FunkcjePlatnosci(_repPayment); 
     
    2926            _eCardData = new eCardData(_repPayment); 
    3027        } 
    31         public MerchantController(IRepository<vPlatnosciEcard> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate) 
     28        public MerchantController(IRepository<Invoice> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate) 
    3229        { 
    3330            _repVPayment = repVPayment; 
  • trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs

    r969 r970  
    11using System; 
    22using System.Linq; 
    3 using System.Web; 
    43using System.Web.Mvc; 
     4using adMoto.Payments.Core; 
     5using adMoto.Payments.Core.Data; 
     6using adMoto.Payments.Core.Interfaces; 
    57using Elmah; 
    68using Platnosci.Models; 
    7 using Platnosci.Core.Linq; 
    8 using Platnosci.Core.Interface; 
    9 using ApplicationException=Elmah.ApplicationException; 
    109 
    1110namespace Platnosci.Controllers 
    1211{ 
    13  
    14     //[Authorize] 
    1512    public class PlatnoscController : Controller 
    1613    { 
    1714        public const string ISPAID = "payment_deposited";       //transakcja potwierdzona do rozliczenia 
    18         private readonly IRepository<vPlatnosciEcard> _repVPayment; 
     15        private readonly IRepository<Invoice> _repVPayment; 
    1916        private readonly IRepository<PlatnosciEcard> _repPayment; 
    2017        private readonly IRepository<PotwierdzeniaEcard> _repConfirm; 
     
    2421        public PlatnoscController() 
    2522        { 
    26             _repVPayment = new Repository<vPlatnosciEcard>(new DataContext()); 
     23            _repVPayment = new Repository<Invoice>(new DataContext()); 
    2724            _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 
    2825            _repConfirm = new Repository<PotwierdzeniaEcard>(new DataContext()); 
     
    3027            _translateManager = new Translation(); 
    3128        } 
    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) 
    3330        { 
    3431            _repVPayment = repVPayment; 
     
    6461            return View(invoiceDeatailsViewData); 
    6562        } 
     63 
    6664        [Authorize] 
    6765        [AcceptVerbs(HttpVerbs.Post)] 
     
    139137        public ActionResult Status() 
    140138        { 
    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); 
    142141 
    143142            var potwierdzenie = new PotwierdzeniaEcard(); 
     
    201200        } 
    202201 
    203         private InvoiceDetailsViewData InitInvoiceDetailsViewData(vPlatnosciEcard platnosc) 
     202        private InvoiceDetailsViewData InitInvoiceDetailsViewData(Invoice platnosc) 
    204203        { 
    205204            var invoiceDeatailsViewData = new InvoiceDetailsViewData(); 
  • trunk/eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs

    r966 r970  
    11using System; 
    22using System.Web; 
    3 using Platnosci.Core.Linq; 
    43using System.Threading; 
    54using System.Globalization; 
    65using System.Configuration; 
    76using System.Security.Principal; 
    8 using Platnosci.Core.Interface; 
     7using adMoto.Payments.Core; 
     8using adMoto.Payments.Core.Data; 
     9using adMoto.Payments.Core.Interfaces; 
    910 
    1011 
     
    5051        } 
    5152 
    52         public bool UserIdentity(vPlatnosciEcard platnosc, string userName) 
     53        public bool UserIdentity(Invoice platnosc, string userName) 
    5354        { 
    5455            return platnosc != null && platnosc.nip == userName; 
    5556        } 
    5657 
    57         public Waluta SetAmount(vPlatnosciEcard platnosc) 
     58        public Waluta SetAmount(Invoice platnosc) 
    5859        { 
    5960            var waluta = new Waluta(); 
     
    122123            var css = ConfigurationManager.AppSettings["Css"]; 
    123124 
    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            } 
    128134 
    129135            return str; 
     
    142148            return er; 
    143149        } 
    144         public PlatnosciEcard CreateAndAddNewPyment(vPlatnosciEcard platnosc, Waluta waluta, Payer payer, string sessionId) 
     150        public PlatnosciEcard CreateAndAddNewPyment(Invoice platnosc, Waluta waluta, Payer payer, string sessionId) 
    145151        { 
    146152            var newPayment = new PlatnosciEcard(); 
     
    167173            return newPayment; 
    168174        } 
    169         public ErrorViewData IsError(vPlatnosciEcard platnosc, String UserName) 
     175 
     176        public ErrorViewData IsError(Invoice platnosc, String UserName) 
    170177        { 
    171178            var errortxt = ""; 
     
    178185            return InitErrorViewData(errortxt, 0); 
    179186        } 
     187 
    180188        public string GetLanguage() 
    181189        { 
    182             string language = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper(); 
     190            var language = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper(); 
    183191             
    184192            if (language != "PL" && language != "EN" && language != "DE") 
    185193                return "PL";  //domyślny jezyk, w ktorym ma byc wyświetlony formularz na stronie eCard 
    186             else  
    187                 return language; 
     194             
     195            return language; 
    188196        } 
    189197    } 
  • 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  
     1using adMoto.Payments.Core; 
     2using adMoto.Payments.Core.Data; 
    83 
    94namespace Platnosci.Models 
     
    116    public class InvoiceDetailsViewData 
    127    { 
    13         public vPlatnosciEcard vPlatnosciEcard { get; set; } 
     8        public Invoice vPlatnosciEcard { get; set; } 
    149        public Payer Payer {get; set;} 
    1510        public string brutto { get; set; } 
  • trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs

    r968 r970  
    44using System.Linq; 
    55using System.Configuration; 
    6 using Platnosci.Core.Linq; 
    7 using Platnosci.Core.Interface; 
     6using adMoto.Payments.Core; 
     7using adMoto.Payments.Core.Data; 
     8using adMoto.Payments.Core.Interfaces; 
    89 
    910namespace Platnosci.Models 
     
    3839            return dane; 
    3940        } 
    40         public Merchant CreateMerchantData(vPlatnosciEcard invoice, Payer payer, string lang, string sessionId) 
     41        public Merchant CreateMerchantData(Invoice invoice, Payer payer, string lang, string sessionId) 
    4142        { 
    4243            var merchant = new Merchant(); 
  • trunk/eCard/eCardMVC/Platnosci/Platnosci.Web.csproj

    r969 r970  
    129129  </ItemGroup> 
    130130  <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> 
    137131    <Content Include="Content\admoto.css" /> 
    138132    <Content Include="Content\truck.css" /> 
     
    187181    <Content Include="Views\Platnosc\Paid.aspx" /> 
    188182    <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> 
    189189  </ItemGroup> 
    190190  <ItemGroup> 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/DataContext.cs

    r954 r970  
    33using System.Configuration; 
    44using System.Linq; 
    5 using Platnosci.Core.Interface; 
     5using adMoto.Payments.Core.Interfaces; 
    66 
    7 namespace Platnosci.Core.Linq 
     7namespace adMoto.Payments.Core.Data 
    88{ 
    99    public class DataContext : IDataContext 
     
    4444        } 
    4545 
    46         public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 
     46        public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 
    4747        { 
    48             var query = from i in _dataContext.vPlatnosciEcards 
     48            var query = from i in _dataContext.Invoices 
    4949                        where (i.nip == nip && i.Faktura_Numer == numer) 
    5050                        select i; 
     
    5252        } 
    5353 
    54         public IQueryable<vPlatnosciEcard> FindInvoiceById(int id) 
     54        public IQueryable<Invoice> FindInvoiceById(int id) 
    5555        { 
    56             var query = from i in _dataContext.vPlatnosciEcards 
     56            var query = from i in _dataContext.Invoices 
    5757                        where i.ID_faktury == id 
    5858                        select i; 
     
    6363        { 
    6464            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); 
    6767 
    6868            query.ToList(); 
     
    7474                var ecard = pt; 
    7575                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); 
    7878 
    7979                for (var i = 0; i < query2.ToList().Count; i++) 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml

    r866 r970  
    11<?xml version="1.0" encoding="utf-8"?> 
    22<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" /> 
    44  <Table Name="dbo.PlatnosciEcard" Member="PlatnosciEcards"> 
    55    <Type Name="PlatnosciEcard"> 
     
    124124      <Association Name="FAKTURY_PlatnosciEcard" Member="PlatnosciEcards" ThisKey="ID_FAKTURY" OtherKey="IDFaktury" Type="PlatnosciEcard" /> 
    125125      <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" /> 
    127127    </Type> 
    128128  </Table> 
    129   <Table Name="dbo.vDanePlatnosciEcard" Member="vPlatnosciEcards"> 
    130     <Type Name="vPlatnosciEcard"> 
     129  <Table Name="dbo.vDanePlatnosciEcard" Member="Invoices"> 
     130    <Type Name="Invoice"> 
    131131      <Column Name="ID_faktury" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 
    132132      <Column Name="Numer" Type="System.Int32" DbType="Int" CanBeNull="true" /> 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.dbml.layout

    r866 r970  
    4949    </associationConnector> 
    5050    <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" /> 
    5252      <nestedChildShapes> 
    5353        <elementListCompartment Id="b17d6419-1b48-4a53-8b33-c4e4c101f28c" absoluteBounds="2.8899999999999997, 6.0850000000000009, 1.9700000000000002, 4.3161417643229161" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 
    5454      </nestedChildShapes> 
    5555    </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"> 
    5757      <AssociationMoniker Name="/PlatnosciDataContext/FAKTURY/FAKTURY_vPlatnosciEcard" /> 
    5858      <nodes> 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/Platnosci.designer.cs

    r949 r970  
    33// <auto-generated> 
    44//     This code was generated by a tool. 
    5 //     Runtime Version:2.0.50727.3082 
     5//     Runtime Version:2.0.50727.3603 
    66// 
    77//     Changes to this file may cause incorrect behavior and will be lost if 
     
    1010//------------------------------------------------------------------------------ 
    1111 
    12 namespace Platnosci.Core.Linq 
     12namespace adMoto.Payments.Core.Data 
    1313{ 
    1414        using System.Data.Linq; 
     
    2222        using System.ComponentModel; 
    2323        using System; 
    24     using Platnosci.Core.Interface; 
     24         
    2525         
    2626        [System.Data.Linq.Mapping.DatabaseAttribute(Name="BAZA_REKLAM_TEST")] 
    2727        public partial class PlatnosciDataContext : System.Data.Linq.DataContext 
    2828        { 
    29         private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 
     29                 
     30                private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 
    3031                 
    3132    #region Extensibility Method Definitions 
     
    4344    partial void UpdateFAKTURY(FAKTURY instance); 
    4445    partial void DeleteFAKTURY(FAKTURY instance); 
    45     partial void InsertvPlatnosciEcard(vPlatnosciEcard instance); 
    46     partial void UpdatevPlatnosciEcard(vPlatnosciEcard instance); 
    47     partial void DeletevPlatnosciEcard(vPlatnosciEcard instance); 
     46    partial void InsertInvoice(Invoice instance); 
     47    partial void UpdateInvoice(Invoice instance); 
     48    partial void DeleteInvoice(Invoice instance); 
    4849    #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                 
    7381                public System.Data.Linq.Table<PlatnosciEcard> PlatnosciEcards 
    7482                { 
     
    103111                } 
    104112                 
    105                 public System.Data.Linq.Table<vPlatnosciEcard> vPlatnosciEcards 
    106                 { 
    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>(); 
    110118                        } 
    111119                } 
     
    235243                [Column(Storage="_IDFaktury", DbType="Int")] 
    236244                [DataMember(Order=2)] 
    237         public System.Nullable<int> IDFaktury    
     245                public System.Nullable<int> IDFaktury 
    238246                { 
    239247                        get 
     
    19641972                private EntitySet<FAKTURA_DETAIL> _FAKTURA_DETAILs; 
    19651973                 
    1966                 private EntitySet<vPlatnosciEcard> _vDanePlatnosciEcards; 
     1974                private EntitySet<Invoice> _vDanePlatnosciEcards; 
    19671975                 
    19681976                private bool serializing; 
     
    30543062                [Association(Name="FAKTURY_vPlatnosciEcard", Storage="_vDanePlatnosciEcards", ThisKey="ID_FAKTURY", OtherKey="ID_faktury")] 
    30553063                [DataMember(Order=48, EmitDefaultValue=false)] 
    3056                 public EntitySet<vPlatnosciEcard> vPlatnosciEcards 
     3064                public EntitySet<Invoice> Invoices 
    30573065                { 
    30583066                        get 
     
    31153123                } 
    31163124                 
    3117                 private void attach_vDanePlatnosciEcards(vPlatnosciEcard entity) 
     3125                private void attach_vDanePlatnosciEcards(Invoice entity) 
    31183126                { 
    31193127                        this.SendPropertyChanging(); 
     
    31213129                } 
    31223130                 
    3123                 private void detach_vDanePlatnosciEcards(vPlatnosciEcard entity) 
     3131                private void detach_vDanePlatnosciEcards(Invoice entity) 
    31243132                { 
    31253133                        this.SendPropertyChanging(); 
     
    31313139                        this._PlatnosciEcards = new EntitySet<PlatnosciEcard>(new Action<PlatnosciEcard>(this.attach_PlatnosciEcards), new Action<PlatnosciEcard>(this.detach_PlatnosciEcards)); 
    31323140                        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)); 
    31343142                        OnCreated(); 
    31353143                } 
     
    31593167        [Table(Name="dbo.vDanePlatnosciEcard")] 
    31603168        [DataContract()] 
    3161         public partial class vPlatnosciEcard : INotifyPropertyChanging, INotifyPropertyChanged 
     3169        public partial class Invoice : INotifyPropertyChanging, INotifyPropertyChanged 
    31623170        { 
    31633171                 
     
    32723280    #endregion 
    32733281                 
    3274                 public vPlatnosciEcard() 
     3282                public Invoice() 
    32753283                { 
    32763284                        this.Initialize(); 
     
    38233831                                        { 
    38243832                                                this._FAKTURY.Entity = null; 
    3825                                                 previousValue.vPlatnosciEcards.Remove(this); 
     3833                                                previousValue.Invoices.Remove(this); 
    38263834                                        } 
    38273835                                        this._FAKTURY.Entity = value; 
    38283836                                        if ((value != null)) 
    38293837                                        { 
    3830                                                 value.vPlatnosciEcards.Add(this); 
     3838                                                value.Invoices.Add(this); 
    38313839                                                this._ID_faktury = value.ID_FAKTURY; 
    38323840                                        } 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/PlatnosciEcard.cs

    r949 r970  
    1 using Platnosci.Core.Interface; 
     1using adMoto.Payments.Core.Interfaces; 
    22 
    3 namespace Platnosci.Core.Linq 
     3namespace adMoto.Payments.Core.Data 
    44{ 
    55    public partial class PlatnosciEcard : IIdentifiable 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/PotwierdzeniaEcard.cs

    r949 r970  
    1 using Platnosci.Core.Interface; 
     1using adMoto.Payments.Core.Interfaces; 
    22 
    3 namespace Platnosci.Core.Linq 
     3namespace adMoto.Payments.Core.Data 
    44{ 
    55    public partial class PotwierdzeniaEcard : IIdentifiable 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Data/vPlatnosciEcard.cs

    r949 r970  
    1 using Platnosci.Core.Interface; 
     1using adMoto.Payments.Core.Interfaces; 
    22 
    3 namespace Platnosci.Core.Linq 
     3namespace adMoto.Payments.Core.Data 
    44{ 
    5     public partial class vPlatnosciEcard : IIdentifiable 
     5    public partial class Invoice : IIdentifiable 
    66    { 
    77        public string FullName 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IDataContext.cs

    r949 r970  
    22using System.Collections.Generic; 
    33using System.Linq; 
    4 using Platnosci.Core.Linq; 
     4using adMoto.Payments.Core.Data; 
    55 
    6 namespace Platnosci.Core.Interface 
     6namespace adMoto.Payments.Core.Interfaces 
    77{ 
    88    public interface IDataContext 
     
    1212        void Insert<T>(T item) where T : class; 
    1313        void Delete<T>(T item) where T : class; 
    14         IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer); 
     14        IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer); 
    1515        List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury); 
    1616        int GetOrdernumber(string description, int? idfaktury, DateTime? data); 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IIdentifiable.cs

    r949 r970  
    1 namespace Platnosci.Core.Interface 
     1namespace adMoto.Payments.Core.Interfaces 
    22{ 
    33    public interface IIdentifiable 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/IRepository.cs

    r949 r970  
    33using System.Linq; 
    44using System.Linq.Expressions; 
    5 using Platnosci.Core.Linq; 
     5using adMoto.Payments.Core.Data; 
    66 
    7 namespace Platnosci.Core.Interface 
     7namespace adMoto.Payments.Core.Interfaces 
    88{ 
    99    public interface IRepository<T> where T : IIdentifiable 
     
    3737        IQueryable<T> Find(Expression<Func<T, bool>> expression); 
    3838 
    39         IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer); 
     39        IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer); 
    4040 
    4141        List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury); 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Interfaces/ITranslateManager.cs

    r949 r970  
    1 namespace Platnosci.Core.Interface 
     1namespace adMoto.Payments.Core.Interfaces 
    22{ 
    33    public interface ITranslateManager 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Merchant.cs

    r952 r970  
    11using System; 
    2 namespace Platnosci.Core.Linq 
     2using adMoto.Payments.Core.Data; 
     3 
     4namespace adMoto.Payments.Core 
    35{ 
    46    public class Merchant 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Payer.cs

    r949 r970  
    1 namespace Platnosci.Core.Linq 
     1namespace adMoto.Payments.Core 
    22{ 
    33    public class Payer 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Repository.cs

    r949 r970  
    33using System.Linq; 
    44using System.Linq.Expressions; 
    5 using Platnosci.Core.Interface; 
     5using adMoto.Payments.Core.Data; 
     6using adMoto.Payments.Core.Interfaces; 
    67 
    78 
    8 namespace Platnosci.Core.Linq 
     9namespace adMoto.Payments.Core 
    910{ 
    1011    /// <summary> 
     
    5960        } 
    6061        public void Insert(T entity) 
    61             { 
    62                 DataContext.Insert(entity);             
    63             } 
     62        { 
     63            DataContext.Insert(entity);             
     64        } 
    6465        public void Delete(T entity) 
    6566        { 
     
    8283            return DataContext.GetTable<T>(); 
    8384        } 
    84         public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 
     85        public IQueryable<Invoice> FindInvoiceByNipNumber(string nip, string numer) 
    8586        { 
    8687            return DataContext.FindInvoiceByNipNumber(nip, numer); 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Translation.cs

    r949 r970  
    11using System.Web; 
    2 using Platnosci.Core.Interface; 
     2using adMoto.Payments.Core.Interfaces; 
    33 
    4 namespace Platnosci.Core.Linq 
     4namespace adMoto.Payments.Core 
    55{ 
    66    public class Translation: ITranslateManager 
  • trunk/eCard/eCardMVC/adMoto.Payments.Core/Waluta.cs

    r949 r970  
    1 namespace Platnosci.Core.Linq 
     1namespace adMoto.Payments.Core 
    22{ 
    33    public class Waluta