Zbiór zmian 949 dla trunk/eCard
- Data:
- 2009-12-11 16:57:08 (16 years ago)
- Lokalizacja:
- trunk/eCard/eCardMVC
- Pliki:
-
- 19 zmodyfikowane
- 1 przeniesione
-
Platnosci.Core/Interface/IDataContext.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Interface/IIdentifiable.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Interface/IRepository.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Interface/ITranslateManager.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/DataContext.cs (przeniesione) (przeniesione from trunk/eCard/eCardMVC/Platnosci.Core/Linq/DataContext1.cs) (1 diff)
-
Platnosci.Core/Linq/Merchant.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/Payer.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/Platnosci.designer.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/PlatnosciDataContext.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/PlatnosciEcard.cs (zmodyfikowane) (2 diffs)
-
Platnosci.Core/Linq/PotwierdzeniaEcard.cs (zmodyfikowane) (2 diffs)
-
Platnosci.Core/Linq/Repository.cs (zmodyfikowane) (4 diffs)
-
Platnosci.Core/Linq/Translation.cs (zmodyfikowane) (2 diffs)
-
Platnosci.Core/Linq/Waluta.cs (zmodyfikowane) (1 diff)
-
Platnosci.Core/Linq/vPlatnosciEcard.cs (zmodyfikowane) (2 diffs)
-
Platnosci.Core/Platnosci.Core.csproj (zmodyfikowane) (1 diff)
-
Platnosci/Controllers/AccountController.cs (zmodyfikowane) (1 diff)
-
Platnosci/Controllers/MerchantController.cs (zmodyfikowane) (5 diffs)
-
Platnosci/Controllers/PlatnoscController.cs (zmodyfikowane) (1 diff)
-
Platnosci/Views/Platnosc/Form.aspx (zmodyfikowane) (1 diff)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci.Core/Interface/IDataContext.cs
r918 r949 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Web;5 4 using Platnosci.Core.Linq; 6 using System.Text;7 5 8 6 namespace Platnosci.Core.Interface -
trunk/eCard/eCardMVC/Platnosci.Core/Interface/IIdentifiable.cs
r867 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace Platnosci.Core.Interface 1 namespace Platnosci.Core.Interface 7 2 { 8 3 public interface IIdentifiable -
trunk/eCard/eCardMVC/Platnosci.Core/Interface/IRepository.cs
r918 r949 3 3 using System.Linq; 4 4 using System.Linq.Expressions; 5 using System.Text;6 5 using Platnosci.Core.Linq; 7 6 -
trunk/eCard/eCardMVC/Platnosci.Core/Interface/ITranslateManager.cs
r927 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace Platnosci.Core.Interface 1 namespace Platnosci.Core.Interface 7 2 { 8 3 public interface ITranslateManager -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/DataContext.cs
r918 r949 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Web;5 4 using Platnosci.Core.Interface; 6 using System.Data.Linq;7 5 8 6 namespace Platnosci.Core.Linq 9 7 { 10 public class DataContext1 : IDataContext 11 { 12 private readonly PlatnosciDataContext _dataContext; 13 private List<object> listaPlatnosci = new List<object>(); 14 public DataContext1() 15 { 16 _dataContext = new PlatnosciDataContext(); 17 } 18 public IQueryable<T> GetTable<T>() where T : class 19 { 20 return _dataContext.GetTable<T>(); 21 } 22 public void Insert<T>(T item) where T : class 23 { 24 _dataContext.GetTable<T>().InsertOnSubmit(item); 25 _dataContext.SubmitChanges(); 26 } 27 public void Delete<T>(T item) where T : class 8 public class DataContext : IDataContext 9 { 10 private readonly PlatnosciDataContext _dataContext; 11 private readonly List<object> _listaPlatnosci = new List<object>(); 12 13 public DataContext() 14 { 15 _dataContext = new PlatnosciDataContext(); 16 } 17 18 public IQueryable<T> GetTable<T>() where T : class 19 { 20 return _dataContext.GetTable<T>(); 21 } 22 23 public void Insert<T>(T item) where T : class 24 { 25 _dataContext.GetTable<T>().InsertOnSubmit(item); 26 _dataContext.SubmitChanges(); 27 } 28 29 public void Delete<T>(T item) where T : class 30 { 31 if (item == null) return; 32 33 _dataContext.GetTable<T>().DeleteOnSubmit(item); 34 _dataContext.SubmitChanges(); 35 } 36 37 public void SubmitChanges() 38 { 39 _dataContext.SubmitChanges(); 40 } 41 42 public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 43 { 44 var query = from i in _dataContext.vPlatnosciEcards 45 where (i.nip == nip && i.Faktura_Numer == numer) 46 select i; 47 return query; 48 } 49 50 public IQueryable<vPlatnosciEcard> FindInvoiceById(int id) 51 { 52 var query = from i in _dataContext.vPlatnosciEcards 53 where i.ID_faktury == id 54 select i; 55 return query; 56 } 57 58 public List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury) 59 { 60 var query = _dataContext.PlatnosciEcards 61 .Where(vp => vp.IDFaktury == idFaktury && vp.Status == true) 62 .OrderByDescending(vp => vp.IDFaktury); 63 64 query.ToList(); 65 66 var tablica = new List<PotwierdzeniaEcard>(); 67 68 foreach (var pt in query) 28 69 { 29 if (item != null) 70 var ecard = pt; 71 var query2 = _dataContext.PotwierdzeniaEcards 72 .Where(ps => ps.ORDERNUMBER == ecard.ORDERNUMBER && ps.CURRENTSTATE == "payment_deposited") 73 .OrderBy(ps => ps.id); 74 75 for (var i = 0; i < query2.ToList().Count; i++) 30 76 { 31 _dataContext.GetTable<T>().DeleteOnSubmit(item); 32 _dataContext.SubmitChanges(); 77 tablica.Add(query2.ToList()[i]); 33 78 } 34 79 } 35 public void SubmitChanges()36 {37 _dataContext.SubmitChanges();38 }39 public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer)40 {41 var query = from i in _dataContext.vPlatnosciEcards42 where (i.nip == nip && i.Faktura_Numer == numer)43 select i;44 return query;45 }46 public IQueryable<vPlatnosciEcard> FindInvoiceById(int id)47 {48 var query = from i in _dataContext.vPlatnosciEcards49 where i.ID_faktury == id50 select i;51 return query;52 }53 public List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury)54 {55 var query = from vp in _dataContext.PlatnosciEcards56 where vp.IDFaktury == idFaktury && vp.Status == true57 orderby vp.IDFaktury descending58 select vp;59 80 60 query.ToList();61 var tablica = new List<PotwierdzeniaEcard>();81 return tablica; 82 } 62 83 63 foreach (var pt in query) 64 { 65 var query2 = from ps in _dataContext.PotwierdzeniaEcards 66 where ps.ORDERNUMBER == pt.ORDERNUMBER && ps.CURRENTSTATE == "payment_deposited" 67 orderby ps.id 68 select ps; 84 public List<object> Getlista() 85 { 86 return _listaPlatnosci; 87 } 69 88 70 for (var i = 0; i < query2.ToList().Count; i++) 71 { 72 tablica.Add(query2.ToList()[i]); 73 } 74 } 75 return tablica; 76 } 77 public List<object> getlista() 78 { 79 return listaPlatnosci; 80 } 81 public IQueryable<PlatnosciEcard> FindPaymentByOrdernumber(int ordernumber) 82 { 83 var query = from l in _dataContext.PlatnosciEcards 84 where l.ORDERNUMBER == ordernumber 85 select l; 89 public IQueryable<PlatnosciEcard> FindPaymentByOrdernumber(int ordernumber) 90 { 91 var query = from l in _dataContext.PlatnosciEcards 92 where l.ORDERNUMBER == ordernumber 93 select l; 86 94 87 return query; 88 } 89 public int GetOrdernumber(string description, int? idfaktury, DateTime? data) 90 { 91 int ordernumber = 0; 95 return query; 96 } 92 97 93 var query = from l in _dataContext.PlatnosciEcards 94 where l.ORDERDESCRIPTION == description && l.IDFaktury == idfaktury && l.Data == data 95 select l; 96 97 List<PlatnosciEcard> pl = query.ToList(); 98 if (pl.Count > 0 && pl[0].ORDERNUMBER > 0) ordernumber = pl[0].ORDERNUMBER; 99 return ordernumber; 100 } 98 public int GetOrdernumber(string description, int? idfaktury, DateTime? data) 99 { 100 var ordernumber = 0; 101 102 var query = from l in _dataContext.PlatnosciEcards 103 where l.ORDERDESCRIPTION == description && l.IDFaktury == idfaktury && l.Data == data 104 select l; 105 106 var pl = query.ToList(); 107 108 if (pl.Count > 0 && pl[0].ORDERNUMBER > 0) ordernumber = pl[0].ORDERNUMBER; 109 110 return ordernumber; 111 } 101 112 } 102 113 } -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Merchant.cs
r934 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace Platnosci.Core.Linq 1 namespace Platnosci.Core.Linq 7 2 { 8 3 public class Merchant 9 4 { 10 public string merchntId { get; set; }11 public string merchantPassword { get; set; }5 public string Id { get; set; } 6 public string Password { get; set; } 12 7 } 13 8 } -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Payer.cs
r915 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace Platnosci.Core.Linq 1 namespace Platnosci.Core.Linq 7 2 { 8 3 public class Payer -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Platnosci.designer.cs
r870 r949 25 25 26 26 [System.Data.Linq.Mapping.DatabaseAttribute(Name="BAZA_REKLAM_TEST")] 27 public partial class PlatnosciDataContext : DataContext27 public partial class PlatnosciDataContext : System.Data.Linq.DataContext 28 28 { 29 29 private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/PlatnosciDataContext.cs
r870 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using Platnosci.Core.Interface; 5 6 namespace Platnosci.Core.Linq 1 namespace Platnosci.Core.Linq 7 2 { 8 3 -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/PlatnosciEcard.cs
r867 r949 1 using System; 2 using System.Collections.Generic; 3 using Platnosci.Core.Interface; 1 using Platnosci.Core.Interface; 4 2 5 3 namespace Platnosci.Core.Linq … … 9 7 public int Id 10 8 { 11 get 12 { 13 return this.ORDERNUMBER; 14 } 9 get { return ORDERNUMBER; } 15 10 } 16 11 17 12 } 18 13 } 19 -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/PotwierdzeniaEcard.cs
r872 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using Platnosci.Core.Interface; 1 using Platnosci.Core.Interface; 6 2 7 3 namespace Platnosci.Core.Linq … … 11 7 public int Id 12 8 { 13 get 14 { 15 return this.id; 16 } 9 get { return id; } 17 10 } 18 11 } -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Repository.cs
r918 r949 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Data.Linq;4 3 using System.Linq; 5 4 using System.Linq.Expressions; 6 using System.Text;7 5 using Platnosci.Core.Interface; 8 6 … … 17 15 public class Repository<T> : IRepository<T> where T : class, IIdentifiable 18 16 { 19 protected readonly IDataContext _dataContext;17 protected readonly IDataContext DataContext; 20 18 21 19 public Repository(IDataContext dataContext) 22 20 { 23 _dataContext = dataContext;21 DataContext = dataContext; 24 22 } 25 23 public int Count() 26 24 { 27 return _dataContext.GetTable<T>().Count();25 return DataContext.GetTable<T>().Count(); 28 26 } 29 27 public int Count(Expression<Func<T, bool>> expression) 30 28 { 31 return _dataContext.GetTable<T>().Count(expression);29 return DataContext.GetTable<T>().Count(expression); 32 30 } 33 31 public T FindOne(int id) … … 37 35 public T FindOne(Expression<Func<T, bool>> expression) 38 36 { 39 return _dataContext.GetTable<T>().Where(expression).SingleOrDefault();37 return DataContext.GetTable<T>().Where(expression).SingleOrDefault(); 40 38 } 41 39 … … 54 52 public IList<T> FindAll() 55 53 { 56 return _dataContext.GetTable<T>().ToList();54 return DataContext.GetTable<T>().ToList(); 57 55 } 58 56 public IList<T> FindAll(Expression<Func<T, bool>> expression) 59 57 { 60 return _dataContext.GetTable<T>().Where(expression).ToList();58 return DataContext.GetTable<T>().Where(expression).ToList(); 61 59 } 62 60 public void Insert(T entity) 63 61 { 64 _dataContext.Insert(entity);62 DataContext.Insert(entity); 65 63 } 66 64 public void Delete(T entity) 67 65 { 68 _dataContext.Delete(entity);66 DataContext.Delete(entity); 69 67 } 70 68 public void SubmitChanges() 71 69 { 72 _dataContext.SubmitChanges();70 DataContext.SubmitChanges(); 73 71 } 74 72 public IQueryable<T> Find(int id) 75 73 { 76 return _dataContext.GetTable<T>().Where(t => t.Id == id);74 return DataContext.GetTable<T>().Where(t => t.Id == id); 77 75 } 78 76 public IQueryable<T> Find(Expression<Func<T, bool>> expression) 79 77 { 80 return _dataContext.GetTable<T>().Where(expression);78 return DataContext.GetTable<T>().Where(expression); 81 79 } 82 80 public IQueryable<T> Find() 83 81 { 84 return _dataContext.GetTable<T>();82 return DataContext.GetTable<T>(); 85 83 } 86 84 public IQueryable<vPlatnosciEcard> FindInvoiceByNipNumber(string nip, string numer) 87 85 { 88 return _dataContext.FindInvoiceByNipNumber(nip, numer);86 return DataContext.FindInvoiceByNipNumber(nip, numer); 89 87 } 90 88 public List<PotwierdzeniaEcard> FindItemsByIdFaktury(int idFaktury) 91 89 { 92 return _dataContext.FindItemsByIdFaktury(idFaktury);90 return DataContext.FindItemsByIdFaktury(idFaktury); 93 91 } 94 92 public int GetOrdernumber(string description, int? idfaktury, DateTime? data) 95 93 { 96 return _dataContext.GetOrdernumber(description, idfaktury, data);94 return DataContext.GetOrdernumber(description, idfaktury, data); 97 95 } 98 96 } -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Translation.cs
r927 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 1 using System.Web; 5 2 using Platnosci.Core.Interface; 6 3 … … 11 8 public string Translate(string className, string keyName) 12 9 { 13 stringstrName = HttpContext.GetGlobalResourceObject(className, keyName).ToString();10 var strName = HttpContext.GetGlobalResourceObject(className, keyName).ToString(); 14 11 return strName; 15 12 } 16 17 18 13 } 19 14 } -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/Waluta.cs
r866 r949 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace Platnosci.Core.Linq 1 namespace Platnosci.Core.Linq 7 2 { 8 3 public class Waluta -
trunk/eCard/eCardMVC/Platnosci.Core/Linq/vPlatnosciEcard.cs
r867 r949 1 using System; 2 using System.Collections.Generic; 3 using Platnosci.Core.Interface; 1 using Platnosci.Core.Interface; 4 2 5 3 namespace Platnosci.Core.Linq … … 7 5 public partial class vPlatnosciEcard : IIdentifiable 8 6 { 9 public string FullName 10 { 11 get 12 { 13 return LastName + " " + FirstName; 14 } 7 public string FullName 8 { 9 get { return LastName + " " + FirstName; } 15 10 } 16 11 17 public int Id 18 { 19 get { return this.ID_faktury; } 20 } 12 public int Id { get { return ID_faktury; } } 21 13 } 22 14 } 23 24 -
trunk/eCard/eCardMVC/Platnosci.Core/Platnosci.Core.csproj
r934 r949 71 71 <Compile Include="Interface\IRepository.cs" /> 72 72 <Compile Include="Interface\ITranslateManager.cs" /> 73 <Compile Include="Linq\DataContext 1.cs" />73 <Compile Include="Linq\DataContext.cs" /> 74 74 <Compile Include="Linq\Merchant.cs" /> 75 75 <Compile Include="Linq\Payer.cs" /> -
trunk/eCard/eCardMVC/Platnosci/Controllers/AccountController.cs
r948 r949 23 23 public AccountController() 24 24 { 25 _repository = new Repository<vPlatnosciEcard>(new DataContext 1());25 _repository = new Repository<vPlatnosciEcard>(new DataContext()); 26 26 FormsAuth = new FormsAuthenticationService(); 27 27 _funkcjePlatnosci = new FunkcjePlatnosci(); -
trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs
r948 r949 28 28 public MerchantController() 29 29 { 30 _repVPayment = new Repository<vPlatnosciEcard>(new DataContext 1());31 _repPayment = new Repository<PlatnosciEcard>(new DataContext 1());30 _repVPayment = new Repository<vPlatnosciEcard>(new DataContext()); 31 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 32 32 _funkcjePlatnosci = new FunkcjePlatnosci(); 33 33 _translateManager = new Translation(); … … 79 79 linkOk += "/" + newPayment.IDFaktury + "?o=" + orderek; 80 80 81 if (merchant != null && !String.IsNullOrEmpty(merchant. merchntId))81 if (merchant != null && !String.IsNullOrEmpty(merchant.Id)) 82 82 SendRequest(newPayment, hash, merchant, linkFail, linkOk); 83 83 else … … 130 130 var dane = "&orderDescription=&amount=" + platnosc.AMOUNT; 131 131 dane += "¤cy=" + platnosc.CURRENCY; 132 dane += string.Format("&merchantId={0}&password={1}", merchant. merchntId, merchant.merchantPassword);132 dane += string.Format("&merchantId={0}&password={1}", merchant.Id, merchant.Password); 133 133 134 134 var bdata = System.Text.Encoding.ASCII.GetBytes(dane); … … 154 154 var dane = "&AMOUNT=" + m.AMOUNT + "&CURRENCY=" + m.CURRENCY + "&ORDERNUMBER=" + m.ORDERNUMBER; 155 155 dane += "&NAME=" + m.NAME + "&SURNAME=" + m.SURNAME + "&LANGUAGE=" + m.LANGUAGE + "&CHARSET=ISO-8859-2"; 156 dane += "&COUNTRY=616&PAYMENTTYPE=CARDS&JS=1&HASH=" + hash + "&MERCHANTID=" + merchant. merchntId + "&AUTODEPOSIT=" + m.AUTODEPOSIT;156 dane += "&COUNTRY=616&PAYMENTTYPE=CARDS&JS=1&HASH=" + hash + "&MERCHANTID=" + merchant.Id + "&AUTODEPOSIT=" + m.AUTODEPOSIT; 157 157 dane += "&LINKFAIL=" + linkfail + "&LINKOK=" + linkok + "&SESSIONID=" + m.SESSIONID; 158 158 Response.Redirect(adres + dane); … … 174 174 if (systemKs == "2") 175 175 { 176 merchant. merchntId = "171485000";177 merchant. merchantPassword = "ashSeth2";176 merchant.Id = "171485000"; 177 merchant.Password = "ashSeth2"; 178 178 } 179 179 else 180 180 { 181 merchant. merchntId = "170906000";182 merchant. merchantPassword = "JaYpqfs0";181 merchant.Id = "170906000"; 182 merchant.Password = "JaYpqfs0"; 183 183 } 184 184 return merchant; -
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r948 r949 21 21 public PlatnoscController() 22 22 { 23 _repVPayment = new Repository<vPlatnosciEcard>(new DataContext 1());24 _repPayment = new Repository<PlatnosciEcard>(new DataContext 1());25 _repConfirm = new Repository<PotwierdzeniaEcard>(new DataContext 1());23 _repVPayment = new Repository<vPlatnosciEcard>(new DataContext()); 24 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 25 _repConfirm = new Repository<PotwierdzeniaEcard>(new DataContext()); 26 26 _funkcjePlatnosci = new FunkcjePlatnosci(); 27 27 _translateManager = new Translation(); -
trunk/eCard/eCardMVC/Platnosci/Views/Platnosc/Form.aspx
r911 r949 13 13 <br/> 4. ValidationCode: <%=Html.TextBox("VALIDATIONCODE","000")%> 14 14 <br/> 5. APPROVALCODE: <%=Html.TextBox("APPROVALCODE","123")%> 15 <br/> 6. AUTHTIME: <%=Html.TextBox("AUTHTIME" )%>15 <br/> 6. AUTHTIME: <%=Html.TextBox("AUTHTIME", DateTime.Now)%> 16 16 <br/> 7. BIN: <%=Html.TextBox("BIN","1234")%> 17 17 <br/> 8. COMMTYPE: <%=Html.TextBox("COMMTYPE","anbjbj")%>
