- Data:
- 2009-06-10 18:00:05 (17 years ago)
- Lokalizacja:
- branches/Abonament/BazaReklam
- Pliki:
-
- 5 dodane
- 5 zmodyfikowane
-
AddClient.cs (zmodyfikowane) (2 diffs)
-
Baza Reklam.csproj (zmodyfikowane) (4 diffs)
-
Classes/Model/Customer.cs (dodane)
-
Classes/Repositories/AgentRepository.cs (zmodyfikowane) (1 diff)
-
Classes/Repositories/CustomerRepository.cs (dodane)
-
Classes/Repositories/Repository.cs (zmodyfikowane) (3 diffs)
-
Facturer.cs (zmodyfikowane) (3 diffs)
-
Subscription.Designer.cs (dodane)
-
Subscription.cs (dodane)
-
Subscription.resx (dodane)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/Abonament/BazaReklam/AddClient.cs
r660 r702 13 13 public partial class AddClient : Form 14 14 { 15 private readonly string _connectionString = ConnString.getConnString().Value; 16 15 17 private readonly int _clientId; 16 18 private REKLAMADataSet.KLIENCIRow _client; … … 61 63 cbState.ValueMember = "Name"; 62 64 63 BindComboBox(new AgentRepository( ).FindAllActive(), cbUserName);65 BindComboBox(new AgentRepository(_connectionString).FindAllActive(), cbUserName); 64 66 cbUserName.DisplayMember = "LoginName"; 65 67 cbUserName.ValueMember = "LoginName"; 66 68 67 BindComboBox(new AgentRepository( ).FindAllActive(), cbAgentExpo);69 BindComboBox(new AgentRepository(_connectionString).FindAllActive(), cbAgentExpo); 68 70 cbAgentExpo.DisplayMember = "LoginName"; 69 71 cbAgentExpo.ValueMember = "LoginName"; -
branches/Abonament/BazaReklam/Baza Reklam.csproj
r678 r702 143 143 <Compile Include="Classes\Model\Agent.cs" /> 144 144 <Compile Include="Classes\Model\Country.cs" /> 145 <Compile Include="Classes\Model\Customer.cs" /> 145 146 <Compile Include="Classes\Model\Invoice.cs" /> 146 147 <Compile Include="Classes\InvoiceProvider.cs" /> … … 156 157 <Compile Include="Classes\Repositories\AgentRepository.cs" /> 157 158 <Compile Include="Classes\Repositories\CountryRepository.cs" /> 159 <Compile Include="Classes\Repositories\CustomerRepository.cs" /> 158 160 <Compile Include="Classes\Repositories\IRepository.cs" /> 159 161 <Compile Include="Classes\Repositories\Repository.cs" /> … … 204 206 <DependentUpon>FacturesFormNew.cs</DependentUpon> 205 207 </Compile> 208 <Compile Include="Subscription.cs"> 209 <SubType>Form</SubType> 210 </Compile> 211 <Compile Include="Subscription.Designer.cs"> 212 <DependentUpon>Subscription.cs</DependentUpon> 213 </Compile> 206 214 <Compile Include="ZestawienieZamowienForm.cs"> 207 215 <SubType>Form</SubType> … … 601 609 <EmbeddedResource Include="Raporty\fakturaKatowicePoznan.rdlc" /> 602 610 <EmbeddedResource Include="Raporty\fakturaKorekta.rdlc" /> 611 <EmbeddedResource Include="Subscription.resx"> 612 <SubType>Designer</SubType> 613 <DependentUpon>Subscription.cs</DependentUpon> 614 </EmbeddedResource> 603 615 <EmbeddedResource Include="ZestawienieZamowienForm.resx"> 604 616 <DependentUpon>ZestawienieZamowienForm.cs</DependentUpon> -
branches/Abonament/BazaReklam/Classes/Repositories/AgentRepository.cs
r621 r702 7 7 public class AgentRepository : Repository<Agent> 8 8 { 9 public AgentRepository(string connectionString) : base(connectionString) 10 { 11 } 12 9 13 public List<Agent> FindAllActive() 10 14 { -
branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs
r614 r702 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Data.SqlClient; 3 4 4 5 namespace Baza_Reklam.Classes.Repositories … … 6 7 public class Repository<T> : IRepository<T> 7 8 { 9 protected SqlConnection _connection; 10 protected SqlCommand _command; 11 protected SqlDataReader _reader; 12 protected SqlTransaction _transaction; 13 14 public Repository(string connectionString) 15 { 16 _connection = new SqlConnection(connectionString); 17 } 18 8 19 public virtual T Find(int id) 9 20 { … … 11 22 } 12 23 13 public List<T> FindAll()24 public virtual List<T> FindAll() 14 25 { 15 26 throw new NotImplementedException(); 16 27 } 17 28 18 public v oid Save()29 public virtual void Save() 19 30 { 20 31 throw new NotImplementedException(); 21 32 } 22 33 23 public v oid Delete()34 public virtual void Delete() 24 35 { 25 36 throw new NotImplementedException(); 26 37 } 27 38 } 39 40 public class SqlRepository<T> : Repository<T> 41 { 42 public SqlRepository(string connectionString) : base(connectionString) 43 { 44 } 45 } 28 46 } -
branches/Abonament/BazaReklam/Facturer.cs
r676 r702 14 14 private int reklamaId; 15 15 private int customerId; 16 private readonly string _connectionString = ConnString.getConnString().Value; 16 17 17 18 public Facturer(int rekId) … … 70 71 else 71 72 { 72 Agent agent = new AgentRepository( ).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());73 Agent agent = new AgentRepository(_connectionString).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString()); 73 74 74 75 IInvoiceProvider invoiceProvider = InvoiceProviderFactory.GetInvoiceProviderById(agent.InvoiceProvider); … … 410 411 //ustawienie pól formularza na dodanie nowej faktury 411 412 412 Agent agent = new AgentRepository( ).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());413 Agent agent = new AgentRepository(_connectionString).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString()); 413 414 IInvoiceProvider invoiceProvider = InvoiceProviderFactory.GetInvoiceProviderById(agent.InvoiceProvider); 414 415
