Index: branches/Abonament/BazaReklam/AddClient.cs
===================================================================
--- branches/Abonament/BazaReklam/AddClient.cs (revision 660)
+++ branches/Abonament/BazaReklam/AddClient.cs (revision 702)
@@ -13,4 +13,6 @@
     public partial class AddClient : Form
     {
+        private readonly string _connectionString = ConnString.getConnString().Value;
+
         private readonly int _clientId;
         private REKLAMADataSet.KLIENCIRow _client;
@@ -61,9 +63,9 @@
             cbState.ValueMember = "Name";
 
-            BindComboBox(new AgentRepository().FindAllActive(), cbUserName);
+            BindComboBox(new AgentRepository(_connectionString).FindAllActive(), cbUserName);
             cbUserName.DisplayMember = "LoginName";
             cbUserName.ValueMember = "LoginName";
 
-            BindComboBox(new AgentRepository().FindAllActive(), cbAgentExpo);
+            BindComboBox(new AgentRepository(_connectionString).FindAllActive(), cbAgentExpo);
             cbAgentExpo.DisplayMember = "LoginName";
             cbAgentExpo.ValueMember = "LoginName";
Index: branches/Abonament/BazaReklam/Baza Reklam.csproj
===================================================================
--- branches/Abonament/BazaReklam/Baza Reklam.csproj (revision 678)
+++ branches/Abonament/BazaReklam/Baza Reklam.csproj (revision 702)
@@ -143,4 +143,5 @@
     <Compile Include="Classes\Model\Agent.cs" />
     <Compile Include="Classes\Model\Country.cs" />
+    <Compile Include="Classes\Model\Customer.cs" />
     <Compile Include="Classes\Model\Invoice.cs" />
     <Compile Include="Classes\InvoiceProvider.cs" />
@@ -156,4 +157,5 @@
     <Compile Include="Classes\Repositories\AgentRepository.cs" />
     <Compile Include="Classes\Repositories\CountryRepository.cs" />
+    <Compile Include="Classes\Repositories\CustomerRepository.cs" />
     <Compile Include="Classes\Repositories\IRepository.cs" />
     <Compile Include="Classes\Repositories\Repository.cs" />
@@ -204,4 +206,10 @@
       <DependentUpon>FacturesFormNew.cs</DependentUpon>
     </Compile>
+    <Compile Include="Subscription.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Subscription.Designer.cs">
+      <DependentUpon>Subscription.cs</DependentUpon>
+    </Compile>
     <Compile Include="ZestawienieZamowienForm.cs">
       <SubType>Form</SubType>
@@ -601,4 +609,8 @@
     <EmbeddedResource Include="Raporty\fakturaKatowicePoznan.rdlc" />
     <EmbeddedResource Include="Raporty\fakturaKorekta.rdlc" />
+    <EmbeddedResource Include="Subscription.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>Subscription.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="ZestawienieZamowienForm.resx">
       <DependentUpon>ZestawienieZamowienForm.cs</DependentUpon>
Index: branches/Abonament/BazaReklam/Subscription.resx
===================================================================
--- branches/Abonament/BazaReklam/Subscription.resx (revision 702)
+++ branches/Abonament/BazaReklam/Subscription.resx (revision 702)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/Abonament/BazaReklam/Facturer.cs
===================================================================
--- branches/Abonament/BazaReklam/Facturer.cs (revision 676)
+++ branches/Abonament/BazaReklam/Facturer.cs (revision 702)
@@ -14,4 +14,5 @@
         private int reklamaId;
         private int customerId;
+        private readonly string _connectionString = ConnString.getConnString().Value;
 
         public Facturer(int rekId)
@@ -70,5 +71,5 @@
                 else
                 {
-                    Agent agent = new AgentRepository().FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());
+                    Agent agent = new AgentRepository(_connectionString).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());
 
                     IInvoiceProvider invoiceProvider = InvoiceProviderFactory.GetInvoiceProviderById(agent.InvoiceProvider);
@@ -410,5 +411,5 @@
                 //ustawienie pól formularza na dodanie nowej faktury
                 
-                Agent agent = new AgentRepository().FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());
+                Agent agent = new AgentRepository(_connectionString).FindByShortName(row["SYMBOL AKWIZYTORA"].ToString());
                 IInvoiceProvider invoiceProvider = InvoiceProviderFactory.GetInvoiceProviderById(agent.InvoiceProvider);
                 
Index: branches/Abonament/BazaReklam/Classes/Repositories/AgentRepository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/AgentRepository.cs (revision 621)
+++ branches/Abonament/BazaReklam/Classes/Repositories/AgentRepository.cs (revision 702)
@@ -7,4 +7,8 @@
     public class AgentRepository : Repository<Agent>
     {
+        public AgentRepository(string connectionString) : base(connectionString)
+        {
+        }
+        
         public List<Agent> FindAllActive()
         {
Index: branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs (revision 614)
+++ branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs (revision 702)
@@ -1,4 +1,5 @@
 using System;
 using System.Collections.Generic;
+using System.Data.SqlClient;
 
 namespace Baza_Reklam.Classes.Repositories
@@ -6,4 +7,14 @@
     public class Repository<T> : IRepository<T>
     {
+        protected SqlConnection _connection;
+        protected SqlCommand _command;
+        protected SqlDataReader _reader;
+        protected SqlTransaction _transaction;
+
+        public Repository(string connectionString)
+        {
+            _connection = new SqlConnection(connectionString);
+        }
+
         public virtual T Find(int id)
         {
@@ -11,18 +22,25 @@
         }
 
-        public List<T> FindAll()
+        public virtual List<T> FindAll()
         {
             throw new NotImplementedException();
         }
 
-        public void Save()
+        public virtual void Save()
         {
             throw new NotImplementedException();
         }
 
-        public void Delete()
+        public virtual void Delete()
         {
             throw new NotImplementedException();
         }
     }
+
+    public class SqlRepository<T> : Repository<T>
+    {
+        public SqlRepository(string connectionString) : base(connectionString)
+        {
+        }
+    }
 }
Index: branches/Abonament/BazaReklam/Classes/Repositories/CustomerRepository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/CustomerRepository.cs (revision 702)
+++ branches/Abonament/BazaReklam/Classes/Repositories/CustomerRepository.cs (revision 702)
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Text;
+using Baza_Reklam.Classes.Model;
+
+namespace Baza_Reklam.Classes.Repositories
+{
+    public class CustomerRepository : Repository<Customer>
+    {
+        public CustomerRepository(string connectionString)
+            : base(connectionString)
+        {
+        }
+
+        public override Customer Find(int id)
+        {
+            string query = "SELECT * FROM Klienci WHERE CustomerId={0}";
+            query = string.Format(query, id);
+
+            try
+            {
+                _connection.Open();
+                _command = new SqlCommand(query, _connection);
+
+                _reader = _command.ExecuteReader();
+                if (_reader != null && _reader.Read())
+                    return new Customer(_reader.GetInt32(0), _reader.GetString(1));
+            }
+            finally
+            {
+                _connection.Close();
+            }
+
+            return null;
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Model/Customer.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Model/Customer.cs (revision 702)
+++ branches/Abonament/BazaReklam/Classes/Model/Customer.cs (revision 702)
@@ -0,0 +1,24 @@
+namespace Baza_Reklam.Classes.Model
+{
+    public class Customer
+    {
+        private readonly int _id;
+        private readonly string _name;
+
+        public Customer(int id, string name)
+        {
+            _id = id;
+            _name = name;
+        }
+
+        public int Id
+        {
+            get { return _id; }
+        }
+
+        public string Name
+        {
+            get { return _name; }
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Subscription.Designer.cs
===================================================================
--- branches/Abonament/BazaReklam/Subscription.Designer.cs (revision 702)
+++ branches/Abonament/BazaReklam/Subscription.Designer.cs (revision 702)
@@ -0,0 +1,177 @@
+namespace Baza_Reklam
+{
+    partial class Subscription
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.lblSubscriptionType = new System.Windows.Forms.Label();
+            this.cbSubscriptionType = new System.Windows.Forms.ComboBox();
+            this.lblCustomer = new System.Windows.Forms.Label();
+            this.lblCustomerName = new System.Windows.Forms.Label();
+            this.lblPrice = new System.Windows.Forms.Label();
+            this.txtPrice = new System.Windows.Forms.TextBox();
+            this.lblSubscriptionsCount = new System.Windows.Forms.Label();
+            this.txtSubscriptionCount = new System.Windows.Forms.TextBox();
+            this.dateStartDate = new System.Windows.Forms.DateTimePicker();
+            this.lblStartDate = new System.Windows.Forms.Label();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // lblSubscriptionType
+            // 
+            this.lblSubscriptionType.AutoSize = true;
+            this.lblSubscriptionType.Location = new System.Drawing.Point(12, 70);
+            this.lblSubscriptionType.Name = "lblSubscriptionType";
+            this.lblSubscriptionType.Size = new System.Drawing.Size(90, 13);
+            this.lblSubscriptionType.TabIndex = 0;
+            this.lblSubscriptionType.Text = "Typ abonamentu:";
+            // 
+            // cbSubscriptionType
+            // 
+            this.cbSubscriptionType.FormattingEnabled = true;
+            this.cbSubscriptionType.Location = new System.Drawing.Point(148, 62);
+            this.cbSubscriptionType.Name = "cbSubscriptionType";
+            this.cbSubscriptionType.Size = new System.Drawing.Size(121, 21);
+            this.cbSubscriptionType.TabIndex = 1;
+            // 
+            // lblCustomer
+            // 
+            this.lblCustomer.AutoSize = true;
+            this.lblCustomer.Location = new System.Drawing.Point(12, 20);
+            this.lblCustomer.Name = "lblCustomer";
+            this.lblCustomer.Size = new System.Drawing.Size(36, 13);
+            this.lblCustomer.TabIndex = 2;
+            this.lblCustomer.Text = "Klient:";
+            // 
+            // lblCustomerName
+            // 
+            this.lblCustomerName.AutoSize = true;
+            this.lblCustomerName.Location = new System.Drawing.Point(145, 20);
+            this.lblCustomerName.Name = "lblCustomerName";
+            this.lblCustomerName.Size = new System.Drawing.Size(85, 13);
+            this.lblCustomerName.TabIndex = 3;
+            this.lblCustomerName.Text = "[CustomerName]";
+            // 
+            // lblPrice
+            // 
+            this.lblPrice.AutoSize = true;
+            this.lblPrice.Location = new System.Drawing.Point(13, 114);
+            this.lblPrice.Name = "lblPrice";
+            this.lblPrice.Size = new System.Drawing.Size(98, 13);
+            this.lblPrice.TabIndex = 4;
+            this.lblPrice.Text = "Cena jednostkowa:";
+            // 
+            // txtPrice
+            // 
+            this.txtPrice.Location = new System.Drawing.Point(148, 111);
+            this.txtPrice.Name = "txtPrice";
+            this.txtPrice.Size = new System.Drawing.Size(121, 20);
+            this.txtPrice.TabIndex = 5;
+            // 
+            // lblSubscriptionsCount
+            // 
+            this.lblSubscriptionsCount.AutoSize = true;
+            this.lblSubscriptionsCount.Location = new System.Drawing.Point(13, 165);
+            this.lblSubscriptionsCount.Name = "lblSubscriptionsCount";
+            this.lblSubscriptionsCount.Size = new System.Drawing.Size(32, 13);
+            this.lblSubscriptionsCount.TabIndex = 6;
+            this.lblSubscriptionsCount.Text = "Iloæ:";
+            // 
+            // txtSubscriptionCount
+            // 
+            this.txtSubscriptionCount.Location = new System.Drawing.Point(148, 158);
+            this.txtSubscriptionCount.Name = "txtSubscriptionCount";
+            this.txtSubscriptionCount.Size = new System.Drawing.Size(121, 20);
+            this.txtSubscriptionCount.TabIndex = 7;
+            // 
+            // dateStartDate
+            // 
+            this.dateStartDate.Location = new System.Drawing.Point(148, 213);
+            this.dateStartDate.Name = "dateStartDate";
+            this.dateStartDate.Size = new System.Drawing.Size(121, 20);
+            this.dateStartDate.TabIndex = 8;
+            // 
+            // lblStartDate
+            // 
+            this.lblStartDate.AutoSize = true;
+            this.lblStartDate.Location = new System.Drawing.Point(12, 220);
+            this.lblStartDate.Name = "lblStartDate";
+            this.lblStartDate.Size = new System.Drawing.Size(48, 13);
+            this.lblStartDate.TabIndex = 9;
+            this.lblStartDate.Text = "Data od:";
+            // 
+            // btnSave
+            // 
+            this.btnSave.Location = new System.Drawing.Point(326, 261);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(75, 23);
+            this.btnSave.TabIndex = 10;
+            this.btnSave.Text = "Zapisz";
+            this.btnSave.UseVisualStyleBackColor = true;
+            // 
+            // Subscription
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(449, 300);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.lblStartDate);
+            this.Controls.Add(this.dateStartDate);
+            this.Controls.Add(this.txtSubscriptionCount);
+            this.Controls.Add(this.lblSubscriptionsCount);
+            this.Controls.Add(this.txtPrice);
+            this.Controls.Add(this.lblPrice);
+            this.Controls.Add(this.lblCustomerName);
+            this.Controls.Add(this.lblCustomer);
+            this.Controls.Add(this.cbSubscriptionType);
+            this.Controls.Add(this.lblSubscriptionType);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "Subscription";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Abonament";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label lblSubscriptionType;
+        private System.Windows.Forms.ComboBox cbSubscriptionType;
+        private System.Windows.Forms.Label lblCustomer;
+        private System.Windows.Forms.Label lblCustomerName;
+        private System.Windows.Forms.Label lblPrice;
+        private System.Windows.Forms.TextBox txtPrice;
+        private System.Windows.Forms.Label lblSubscriptionsCount;
+        private System.Windows.Forms.TextBox txtSubscriptionCount;
+        private System.Windows.Forms.DateTimePicker dateStartDate;
+        private System.Windows.Forms.Label lblStartDate;
+        private System.Windows.Forms.Button btnSave;
+    }
+}
Index: branches/Abonament/BazaReklam/Subscription.cs
===================================================================
--- branches/Abonament/BazaReklam/Subscription.cs (revision 702)
+++ branches/Abonament/BazaReklam/Subscription.cs (revision 702)
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using Baza_Reklam.Classes.Model;
+using Baza_Reklam.Classes.Repositories;
+
+namespace Baza_Reklam
+{
+    public partial class Subscription : Form
+    {
+        //TODO: Create BaseClass for all forms and inherit from it - there can be defined stuff like connection strings and other dependecies...
+        private readonly string _connectionString = ConnString.getConnString().Value;
+        
+        private readonly IRepository<Customer> _customerRepository;
+        private readonly Customer _customer;
+
+        public Subscription(int customerId)
+        {
+            InitializeComponent();
+
+            _customerRepository = new CustomerRepository(_connectionString);
+
+            _customer = _customerRepository.Find(customerId);
+
+            lblCustomerName.Text = _customer.Name;
+        }
+    }
+}
