Zbiór zmian 895 dla branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq
- Data:
- 2009-11-24 12:21:39 (16 years ago)
- Lokalizacja:
- branches/Emisje
- Pliki:
-
- 2 usunięte
- 6 zmodyfikowane
-
. (zmodyfikowane) (1 prop)
-
eCard/eCardMVC/Platnosci.Core/Linq/Payer.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.designer.cs (zmodyfikowane) (2 diffs)
-
eCard/eCardMVC/Platnosci.Core/Linq/PlatnosciDataContext.cs (zmodyfikowane) (1 diff)
-
eCard/eCardMVC/Platnosci.Core/Linq/Repository.cs (zmodyfikowane) (3 diffs)
-
eCard/eCardMVC/Platnosci.Core/Linq/RepositoryPlatnosciEcard.cs (usunięte)
-
eCard/eCardMVC/Platnosci.Core/Linq/RepositoryPotwierdzeniaEcard.cs (usunięte)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/Emisje
- Property svn:mergeinfo
-
old new 1 /branches/Abonament:701-884 1 2 /branches/AutoShopper:815-818 2 3 /branches/ReklamaReorganizacja:568-731 3 4 /tags/BazaReklam_1.1.28:831 4 /trunk:774-8 685 /trunk:774-893
-
- Property svn:mergeinfo
-
branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq/Payer.cs
r866 r895 11 11 public string LastName { get; set; } 12 12 public int Id_faktury { get; set; } 13 public string Jezyk{ get; set; }13 public int status { get; set; } 14 14 } 15 15 } -
branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.cs
r866 r895 1 namespace Platnosci.Core 1 namespace Platnosci.Core 2 2 { 3 partial class PlatnosciDataContext 3 partial class PlatnosciDataContext 4 4 { 5 5 } -
branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.designer.cs
r866 r895 22 22 using System.ComponentModel; 23 23 using System; 24 24 using Platnosci.Core.Interface; 25 25 26 26 [System.Data.Linq.Mapping.DatabaseAttribute(Name="BAZA_REKLAM_TEST")] 27 public partial class PlatnosciDataContext : System.Data.Linq.DataContext27 public partial class PlatnosciDataContext : DataContext 28 28 { 29 30 private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 29 private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); 31 30 32 31 #region Extensibility Method Definitions … … 48 47 partial void DeletevPlatnosciEcard(vPlatnosciEcard instance); 49 48 #endregion 50 public PlatnosciDataContext() : 51 base(global::Platnosci.Core.Properties.Settings.Default.BAZA_REKLAM_TESTConnectionString, mappingSource) 52 { 53 OnCreated(); 54 } 55 56 public PlatnosciDataContext(string connection) : 57 base(connection, mappingSource) 58 { 59 OnCreated(); 60 } 61 62 public PlatnosciDataContext(System.Data.IDbConnection connection) : 63 base(connection, mappingSource) 64 { 65 OnCreated(); 66 } 67 68 public PlatnosciDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 69 base(connection, mappingSource) 70 { 71 OnCreated(); 72 } 73 74 public PlatnosciDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 75 base(connection, mappingSource) 76 { 77 OnCreated(); 78 } 79 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 } 80 73 public System.Data.Linq.Table<PlatnosciEcard> PlatnosciEcards 81 74 { -
branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq/PlatnosciDataContext.cs
r866 r895 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using Platnosci.Core.Interface; 4 5 5 6 namespace Platnosci.Core.Linq 6 7 { 8 7 9 public partial class PlatnosciDataContext 8 10 { 9 public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 10 { 11 var query = from i in vPlatnosciEcards 12 where (i.nip == nip && i.Faktura_Numer == numer) 13 select i; 14 return query; 15 } 16 public IQueryable<vPlatnosciEcard> FindInvoiceById(int id) 17 { 18 var query = from i in vPlatnosciEcards 19 where i.ID_faktury == id 20 select i; 21 return query; 22 } 23 public List<PotwierdzeniaEcard>FindItemsByIdFaktury(int idFaktury) 24 { 25 var query = from vp in PlatnosciEcards 26 where vp.IDFaktury == idFaktury && vp.Status == true 27 orderby vp.IDFaktury descending 28 select vp; 29 30 query.ToList(); 31 var tablica = new List<PotwierdzeniaEcard>(); 32 33 foreach (var pt in query) 34 { 35 var query2 = from ps in PotwierdzeniaEcards 36 where ps.ORDERNUMBER == pt.ORDERNUMBER && ps.VALIDATIONCODE == "000" 37 orderby ps.id 38 select ps; 39 40 for (var i = 0; i < query2.ToList().Count; i++) 41 { 42 tablica.Add(query2.ToList()[i]); 43 } 44 } 45 return tablica; 46 } 11 47 12 } 48 13 } -
branches/Emisje/eCard/eCardMVC/Platnosci.Core/Linq/Repository.cs
r867 r895 15 15 /// <typeparam name="T">The generic type representing the entity we are dealing with</typeparam> 16 16 /// <remarks>We use a 1 to 1 mapping of entity -> SQL table</remarks> 17 public sealed class Repository<T> : IRepository<T> 18 where T : class, IIdentifiable 17 public class Repository<T> : IRepository<T> where T : class, IIdentifiable 19 18 { 20 pr ivate readonly PlatnosciDataContext _dataContext = new PlatnosciDataContext();19 protected readonly IDataContext _dataContext; 21 20 21 public Repository(IDataContext dataContext) 22 { 23 _dataContext = dataContext; 24 } 22 25 public int Count() 23 26 { … … 57 60 return _dataContext.GetTable<T>().Where(expression).ToList(); 58 61 } 59 60 62 public void Insert(T entity) 61 { 62 //DataContext.GetTable<T>().InsertOnSubmit(entity); 63 //DataContext.SubmitChanges(); 64 65 //using (DataContext dc = new WierszowkiDataContext()) 66 //{ 67 _dataContext.GetTable<T>().InsertOnSubmit(entity); 68 _dataContext.SubmitChanges(); 69 //} 70 } 63 { 64 _dataContext.Insert(entity); 65 } 71 66 public void Delete(T entity) 72 67 { 73 if (entity != null) 74 { 75 _dataContext.GetTable<T>().DeleteOnSubmit(entity); 76 _dataContext.SubmitChanges(); 77 } 68 throw new NotImplementedException(); 78 69 } 79 public void Update(T entity)70 public void SubmitChanges() 80 71 { 81 72 _dataContext.SubmitChanges(); … … 92 83 { 93 84 return _dataContext.GetTable<T>(); 94 } 85 } 86 public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 87 { 88 return _dataContext.FindInvoiceByNipNumber(nip, numer); 89 } 90 public IQueryable<vPlatnosciEcard> FindInvoiceById(int id) 91 { 92 return _dataContext.FindInvoiceById(id); 93 } 94 public List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury) 95 { 96 return _dataContext.FindItemsByIdFaktury(idFaktury); 97 } 98 public IQueryable<PlatnosciEcard> FindPaymentByOrdernumber(int ordernumber) 99 { 100 return _dataContext.FindPaymentByOrdernumber(ordernumber); 101 } 95 102 } 96 103 }
