Index: branches/Abonament/BazaReklam/ClientsForm.Designer.cs
===================================================================
--- branches/Abonament/BazaReklam/ClientsForm.Designer.cs (revision 699)
+++ branches/Abonament/BazaReklam/ClientsForm.Designer.cs (revision 703)
@@ -242,4 +242,7 @@
             this.vIEWKOREKTYBindingSource = new System.Windows.Forms.BindingSource(this.components);
             this.btnKorekta = new System.Windows.Forms.Button();
+            this.tabAbonamenty = new System.Windows.Forms.TabPage();
+            this.btnAddSubscription = new System.Windows.Forms.Button();
+            this.gridSubscriptions = new System.Windows.Forms.DataGridView();
             this.klasyfikacjaTabPage = new System.Windows.Forms.TabPage();
             this.usunKlButton = new System.Windows.Forms.Button();
@@ -564,4 +567,16 @@
             this.agenciExpoTableAdapter = new Baza_Reklam.SLOWNIKDataSetTableAdapters.AGENCITableAdapter();
             this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+            this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Guid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CustomerId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SubscriptionTypeId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TotalPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Currency = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OrderId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CreatedOn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CreatedBy = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.UpdatedOn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.UpdatedBy = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.StartDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             modify_UserLabel = new System.Windows.Forms.Label();
             last_ModifyLabel = new System.Windows.Forms.Label();
@@ -624,4 +639,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.gridKorekty)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.vIEWKOREKTYBindingSource)).BeginInit();
+            this.tabAbonamenty.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.gridSubscriptions)).BeginInit();
             this.klasyfikacjaTabPage.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.klasyfikacjaDataGridView)).BeginInit();
@@ -950,4 +967,5 @@
             this.tabs.Controls.Add(this.fakturyTab);
             this.tabs.Controls.Add(this.tabKorekty);
+            this.tabs.Controls.Add(this.tabAbonamenty);
             this.tabs.Controls.Add(this.klasyfikacjaTabPage);
             this.tabs.Controls.Add(this.kontaktyTabPage);
@@ -2747,4 +2765,50 @@
             this.btnKorekta.Click += new System.EventHandler(this.btnKorekta_Click);
             // 
+            // tabAbonamenty
+            // 
+            this.tabAbonamenty.Controls.Add(this.btnAddSubscription);
+            this.tabAbonamenty.Controls.Add(this.gridSubscriptions);
+            this.tabAbonamenty.Location = new System.Drawing.Point(4, 22);
+            this.tabAbonamenty.Name = "tabAbonamenty";
+            this.tabAbonamenty.Padding = new System.Windows.Forms.Padding(3);
+            this.tabAbonamenty.Size = new System.Drawing.Size(955, 351);
+            this.tabAbonamenty.TabIndex = 9;
+            this.tabAbonamenty.Text = "Abonamenty";
+            this.tabAbonamenty.UseVisualStyleBackColor = true;
+            // 
+            // btnAddSubscription
+            // 
+            this.btnAddSubscription.Location = new System.Drawing.Point(751, 9);
+            this.btnAddSubscription.Name = "btnAddSubscription";
+            this.btnAddSubscription.Size = new System.Drawing.Size(101, 23);
+            this.btnAddSubscription.TabIndex = 1;
+            this.btnAddSubscription.Text = "Dodaj abonament";
+            this.btnAddSubscription.UseVisualStyleBackColor = true;
+            this.btnAddSubscription.Click += new System.EventHandler(this.btnAddSubscription_Click);
+            // 
+            // gridSubscriptions
+            // 
+            this.gridSubscriptions.AllowUserToAddRows = false;
+            this.gridSubscriptions.AllowUserToDeleteRows = false;
+            this.gridSubscriptions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.gridSubscriptions.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Id,
+            this.Guid,
+            this.CustomerId,
+            this.SubscriptionTypeId,
+            this.TotalPrice,
+            this.Currency,
+            this.OrderId,
+            this.CreatedOn,
+            this.CreatedBy,
+            this.UpdatedOn,
+            this.UpdatedBy,
+            this.StartDate});
+            this.gridSubscriptions.Location = new System.Drawing.Point(0, 0);
+            this.gridSubscriptions.Name = "gridSubscriptions";
+            this.gridSubscriptions.ReadOnly = true;
+            this.gridSubscriptions.Size = new System.Drawing.Size(738, 345);
+            this.gridSubscriptions.TabIndex = 0;
+            // 
             // klasyfikacjaTabPage
             // 
@@ -6258,4 +6322,89 @@
             this.errorProvider.ContainerControl = this;
             // 
+            // Id
+            // 
+            this.Id.HeaderText = "Id";
+            this.Id.Name = "Id";
+            this.Id.ReadOnly = true;
+            this.Id.Visible = false;
+            // 
+            // Guid
+            // 
+            this.Guid.HeaderText = "Guid";
+            this.Guid.Name = "Guid";
+            this.Guid.ReadOnly = true;
+            this.Guid.Visible = false;
+            // 
+            // CustomerId
+            // 
+            this.CustomerId.HeaderText = "CustomerId";
+            this.CustomerId.Name = "CustomerId";
+            this.CustomerId.ReadOnly = true;
+            this.CustomerId.Visible = false;
+            // 
+            // SubscriptionTypeId
+            // 
+            this.SubscriptionTypeId.HeaderText = "SubscriptionTypeId";
+            this.SubscriptionTypeId.Name = "SubscriptionTypeId";
+            this.SubscriptionTypeId.ReadOnly = true;
+            this.SubscriptionTypeId.Visible = false;
+            // 
+            // TotalPrice
+            // 
+            this.TotalPrice.DataPropertyName = "TotalPrice";
+            this.TotalPrice.HeaderText = "Cena ca³kowita";
+            this.TotalPrice.Name = "TotalPrice";
+            this.TotalPrice.ReadOnly = true;
+            // 
+            // Currency
+            // 
+            this.Currency.DataPropertyName = "Currency";
+            this.Currency.HeaderText = "Waluta";
+            this.Currency.Name = "Currency";
+            this.Currency.ReadOnly = true;
+            // 
+            // OrderId
+            // 
+            this.OrderId.HeaderText = "OrderId";
+            this.OrderId.Name = "OrderId";
+            this.OrderId.ReadOnly = true;
+            this.OrderId.Visible = false;
+            // 
+            // CreatedOn
+            // 
+            this.CreatedOn.DataPropertyName = "CreatedOn";
+            this.CreatedOn.HeaderText = "Utworzono";
+            this.CreatedOn.Name = "CreatedOn";
+            this.CreatedOn.ReadOnly = true;
+            // 
+            // CreatedBy
+            // 
+            this.CreatedBy.DataPropertyName = "CreatedBy";
+            this.CreatedBy.HeaderText = "CreatedBy";
+            this.CreatedBy.Name = "CreatedBy";
+            this.CreatedBy.ReadOnly = true;
+            this.CreatedBy.Visible = false;
+            // 
+            // UpdatedOn
+            // 
+            this.UpdatedOn.DataPropertyName = "UpdatedOn";
+            this.UpdatedOn.HeaderText = "Modyfikowano";
+            this.UpdatedOn.Name = "UpdatedOn";
+            this.UpdatedOn.ReadOnly = true;
+            // 
+            // UpdatedBy
+            // 
+            this.UpdatedBy.HeaderText = "UpdatedBy";
+            this.UpdatedBy.Name = "UpdatedBy";
+            this.UpdatedBy.ReadOnly = true;
+            this.UpdatedBy.Visible = false;
+            // 
+            // StartDate
+            // 
+            this.StartDate.DataPropertyName = "StartDate";
+            this.StartDate.HeaderText = "Data od";
+            this.StartDate.Name = "StartDate";
+            this.StartDate.ReadOnly = true;
+            // 
             // ClientsForm
             // 
@@ -6319,4 +6468,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.gridKorekty)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.vIEWKOREKTYBindingSource)).EndInit();
+            this.tabAbonamenty.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.gridSubscriptions)).EndInit();
             this.klasyfikacjaTabPage.ResumeLayout(false);
             this.klasyfikacjaTabPage.PerformLayout();
@@ -6892,4 +7043,20 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn data;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Aktywny;
+        private System.Windows.Forms.TabPage tabAbonamenty;
+        private System.Windows.Forms.Button btnAddSubscription;
+        private System.Windows.Forms.DataGridView gridSubscriptions;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Price;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Guid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CustomerId;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SubscriptionTypeId;
+        private System.Windows.Forms.DataGridViewTextBoxColumn TotalPrice;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Currency;
+        private System.Windows.Forms.DataGridViewTextBoxColumn OrderId;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CreatedOn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CreatedBy;
+        private System.Windows.Forms.DataGridViewTextBoxColumn UpdatedOn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn UpdatedBy;
+        private System.Windows.Forms.DataGridViewTextBoxColumn StartDate;
     }
 }
Index: branches/Abonament/BazaReklam/ZamowieniaForm.cs
===================================================================
--- branches/Abonament/BazaReklam/ZamowieniaForm.cs (revision 676)
+++ branches/Abonament/BazaReklam/ZamowieniaForm.cs (revision 703)
@@ -7,4 +7,6 @@
 using Baza_Reklam.Classes.Helpers;
 using Baza_Reklam.Classes.Interfaces;
+using Baza_Reklam.Classes.Model;
+using Baza_Reklam.Classes.Repositories;
 
 namespace Baza_Reklam
@@ -96,4 +98,11 @@
         private void ZamowieniaForm_Load(object sender, EventArgs e)
         {
+            CustomerRepository customerRepository = new CustomerRepository(ConnString.getConnString().Value);
+
+            
+            rEKLAMADataGridView1.AutoGenerateColumns = false;
+            rEKLAMADataGridView1.DataSource = customerRepository.FindProductsWithoutOrders(klient.CustomerID);
+            
+            
             usunFaktureButton.Enabled = User.Instance().IsKierownik;
             dtpZmianaDaty.Enabled = User.Instance().IsKierownik;
Index: branches/Abonament/BazaReklam/SubscriptionForm.Designer.cs
===================================================================
--- branches/Abonament/BazaReklam/SubscriptionForm.Designer.cs (revision 703)
+++ branches/Abonament/BazaReklam/SubscriptionForm.Designer.cs (revision 703)
@@ -0,0 +1,359 @@
+namespace Baza_Reklam
+{
+    partial class SubscriptionForm
+    {
+        /// <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.components = new System.ComponentModel.Container();
+            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.txtPricePln = new System.Windows.Forms.TextBox();
+            this.lblSubscriptionsCount = new System.Windows.Forms.Label();
+            this.dateStartDate = new System.Windows.Forms.DateTimePicker();
+            this.lblStartDate = new System.Windows.Forms.Label();
+            this.btnAdd = new System.Windows.Forms.Button();
+            this.txtPriceEur = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.txtTotalPricePln = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.txtTotalPriceEur = new System.Windows.Forms.TextBox();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.numSubscriptionCount = new System.Windows.Forms.NumericUpDown();
+            this.lblCurrency = new System.Windows.Forms.Label();
+            this.cbCurrency = new System.Windows.Forms.ComboBox();
+            this.numDiscount = new System.Windows.Forms.NumericUpDown();
+            this.lblDiscount = new System.Windows.Forms.Label();
+            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+            ((System.ComponentModel.ISupportInitialize)(this.numSubscriptionCount)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.numDiscount)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // lblSubscriptionType
+            // 
+            this.lblSubscriptionType.AutoSize = true;
+            this.lblSubscriptionType.Location = new System.Drawing.Point(49, 52);
+            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.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbSubscriptionType.FormattingEnabled = true;
+            this.cbSubscriptionType.Location = new System.Drawing.Point(145, 44);
+            this.cbSubscriptionType.Name = "cbSubscriptionType";
+            this.cbSubscriptionType.Size = new System.Drawing.Size(395, 21);
+            this.cbSubscriptionType.TabIndex = 1;
+            this.cbSubscriptionType.Validating += new System.ComponentModel.CancelEventHandler(this.cbSubscriptionType_Validating);
+            this.cbSubscriptionType.SelectedIndexChanged += new System.EventHandler(this.cbSubscriptionType_SelectedIndexChanged);
+            // 
+            // lblCustomer
+            // 
+            this.lblCustomer.AutoSize = true;
+            this.lblCustomer.Location = new System.Drawing.Point(103, 20);
+            this.lblCustomer.Name = "lblCustomer";
+            this.lblCustomer.Size = new System.Drawing.Size(36, 13);
+            this.lblCustomer.TabIndex = 0;
+            this.lblCustomer.Text = "Klient:";
+            // 
+            // lblCustomerName
+            // 
+            this.lblCustomerName.AutoSize = true;
+            this.lblCustomerName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+            this.lblCustomerName.Location = new System.Drawing.Point(145, 20);
+            this.lblCustomerName.Name = "lblCustomerName";
+            this.lblCustomerName.Size = new System.Drawing.Size(99, 13);
+            this.lblCustomerName.TabIndex = 0;
+            this.lblCustomerName.Text = "[CustomerName]";
+            // 
+            // lblPrice
+            // 
+            this.lblPrice.AutoSize = true;
+            this.lblPrice.Location = new System.Drawing.Point(11, 142);
+            this.lblPrice.Name = "lblPrice";
+            this.lblPrice.Size = new System.Drawing.Size(128, 13);
+            this.lblPrice.TabIndex = 0;
+            this.lblPrice.Text = "Cena jednostkowa (PLN):";
+            // 
+            // txtPricePln
+            // 
+            this.txtPricePln.Location = new System.Drawing.Point(145, 135);
+            this.txtPricePln.Name = "txtPricePln";
+            this.txtPricePln.ReadOnly = true;
+            this.txtPricePln.Size = new System.Drawing.Size(121, 20);
+            this.txtPricePln.TabIndex = 6;
+            // 
+            // lblSubscriptionsCount
+            // 
+            this.lblSubscriptionsCount.AutoSize = true;
+            this.lblSubscriptionsCount.Location = new System.Drawing.Point(338, 82);
+            this.lblSubscriptionsCount.Name = "lblSubscriptionsCount";
+            this.lblSubscriptionsCount.Size = new System.Drawing.Size(75, 13);
+            this.lblSubscriptionsCount.TabIndex = 0;
+            this.lblSubscriptionsCount.Text = "Iloæ miesiêcy:";
+            // 
+            // dateStartDate
+            // 
+            this.dateStartDate.CustomFormat = "yyyy-MM";
+            this.dateStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.dateStartDate.Location = new System.Drawing.Point(145, 75);
+            this.dateStartDate.Name = "dateStartDate";
+            this.dateStartDate.Size = new System.Drawing.Size(121, 20);
+            this.dateStartDate.TabIndex = 2;
+            // 
+            // lblStartDate
+            // 
+            this.lblStartDate.AutoSize = true;
+            this.lblStartDate.Location = new System.Drawing.Point(30, 82);
+            this.lblStartDate.Name = "lblStartDate";
+            this.lblStartDate.Size = new System.Drawing.Size(109, 13);
+            this.lblStartDate.TabIndex = 0;
+            this.lblStartDate.Text = "Start abonamentu od:";
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.btnAdd.Location = new System.Drawing.Point(419, 197);
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(75, 23);
+            this.btnAdd.TabIndex = 10;
+            this.btnAdd.Text = "Dodaj";
+            this.btnAdd.UseVisualStyleBackColor = true;
+            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+            // 
+            // txtPriceEur
+            // 
+            this.txtPriceEur.Location = new System.Drawing.Point(145, 165);
+            this.txtPriceEur.Name = "txtPriceEur";
+            this.txtPriceEur.ReadOnly = true;
+            this.txtPriceEur.Size = new System.Drawing.Size(121, 20);
+            this.txtPriceEur.TabIndex = 8;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(9, 172);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(130, 13);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "Cena jednostkowa (EUR):";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(298, 142);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(115, 13);
+            this.label2.TabIndex = 0;
+            this.label2.Text = "Cena ca³kowita (PLN):";
+            // 
+            // txtTotalPricePln
+            // 
+            this.txtTotalPricePln.Location = new System.Drawing.Point(419, 135);
+            this.txtTotalPricePln.Name = "txtTotalPricePln";
+            this.txtTotalPricePln.ReadOnly = true;
+            this.txtTotalPricePln.Size = new System.Drawing.Size(121, 20);
+            this.txtTotalPricePln.TabIndex = 7;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(296, 172);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(117, 13);
+            this.label3.TabIndex = 0;
+            this.label3.Text = "Cena ca³kowita (EUR):";
+            // 
+            // txtTotalPriceEur
+            // 
+            this.txtTotalPriceEur.Location = new System.Drawing.Point(419, 165);
+            this.txtTotalPriceEur.Name = "txtTotalPriceEur";
+            this.txtTotalPriceEur.ReadOnly = true;
+            this.txtTotalPriceEur.Size = new System.Drawing.Size(121, 20);
+            this.txtTotalPriceEur.TabIndex = 9;
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.CausesValidation = false;
+            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.btnCancel.Location = new System.Drawing.Point(106, 197);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(75, 23);
+            this.btnCancel.TabIndex = 11;
+            this.btnCancel.Text = "Anuluj";
+            this.btnCancel.UseVisualStyleBackColor = true;
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // numSubscriptionCount
+            // 
+            this.numSubscriptionCount.Location = new System.Drawing.Point(419, 75);
+            this.numSubscriptionCount.Maximum = new decimal(new int[] {
+            12,
+            0,
+            0,
+            0});
+            this.numSubscriptionCount.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.numSubscriptionCount.Name = "numSubscriptionCount";
+            this.numSubscriptionCount.Size = new System.Drawing.Size(91, 20);
+            this.numSubscriptionCount.TabIndex = 3;
+            this.numSubscriptionCount.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.numSubscriptionCount.ValueChanged += new System.EventHandler(this.numSubscriptionCount_ValueChanged);
+            // 
+            // lblCurrency
+            // 
+            this.lblCurrency.AutoSize = true;
+            this.lblCurrency.Location = new System.Drawing.Point(95, 112);
+            this.lblCurrency.Name = "lblCurrency";
+            this.lblCurrency.Size = new System.Drawing.Size(44, 13);
+            this.lblCurrency.TabIndex = 0;
+            this.lblCurrency.Text = "Waluta:";
+            // 
+            // cbCurrency
+            // 
+            this.cbCurrency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbCurrency.FormattingEnabled = true;
+            this.cbCurrency.Items.AddRange(new object[] {
+            "PLN",
+            "EUR"});
+            this.cbCurrency.Location = new System.Drawing.Point(145, 105);
+            this.cbCurrency.Name = "cbCurrency";
+            this.cbCurrency.Size = new System.Drawing.Size(121, 21);
+            this.cbCurrency.TabIndex = 4;
+            // 
+            // numDiscount
+            // 
+            this.numDiscount.Location = new System.Drawing.Point(419, 105);
+            this.numDiscount.Maximum = new decimal(new int[] {
+            99,
+            0,
+            0,
+            0});
+            this.numDiscount.Name = "numDiscount";
+            this.numDiscount.Size = new System.Drawing.Size(91, 20);
+            this.numDiscount.TabIndex = 5;
+            this.numDiscount.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.numDiscount.ValueChanged += new System.EventHandler(this.numDiscount_ValueChanged);
+            // 
+            // lblDiscount
+            // 
+            this.lblDiscount.AutoSize = true;
+            this.lblDiscount.Location = new System.Drawing.Point(357, 112);
+            this.lblDiscount.Name = "lblDiscount";
+            this.lblDiscount.Size = new System.Drawing.Size(56, 13);
+            this.lblDiscount.TabIndex = 0;
+            this.lblDiscount.Text = "Rabat (%):";
+            // 
+            // errorProvider
+            // 
+            this.errorProvider.ContainerControl = this;
+            // 
+            // SubscriptionForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(555, 228);
+            this.Controls.Add(this.numDiscount);
+            this.Controls.Add(this.lblDiscount);
+            this.Controls.Add(this.cbCurrency);
+            this.Controls.Add(this.lblCurrency);
+            this.Controls.Add(this.numSubscriptionCount);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.txtTotalPriceEur);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.txtTotalPricePln);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.txtPriceEur);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.btnAdd);
+            this.Controls.Add(this.lblStartDate);
+            this.Controls.Add(this.dateStartDate);
+            this.Controls.Add(this.lblSubscriptionsCount);
+            this.Controls.Add(this.txtPricePln);
+            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 = "SubscriptionForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Abonament";
+            ((System.ComponentModel.ISupportInitialize)(this.numSubscriptionCount)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.numDiscount)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+            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 txtPricePln;
+        private System.Windows.Forms.Label lblSubscriptionsCount;
+        private System.Windows.Forms.DateTimePicker dateStartDate;
+        private System.Windows.Forms.Label lblStartDate;
+        private System.Windows.Forms.Button btnAdd;
+        private System.Windows.Forms.TextBox txtPriceEur;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox txtTotalPricePln;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox txtTotalPriceEur;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.NumericUpDown numSubscriptionCount;
+        private System.Windows.Forms.Label lblCurrency;
+        private System.Windows.Forms.ComboBox cbCurrency;
+        private System.Windows.Forms.NumericUpDown numDiscount;
+        private System.Windows.Forms.Label lblDiscount;
+        private System.Windows.Forms.ErrorProvider errorProvider;
+    }
+}
Index: branches/Abonament/BazaReklam/Baza Reklam.csproj
===================================================================
--- branches/Abonament/BazaReklam/Baza Reklam.csproj (revision 702)
+++ branches/Abonament/BazaReklam/Baza Reklam.csproj (revision 703)
@@ -141,4 +141,6 @@
     <Compile Include="Classes\Interfaces\IInvoiceProvider.cs" />
     <Compile Include="Classes\Interfaces\IForm.cs" />
+    <Compile Include="Classes\Interfaces\IProduct.cs" />
+    <Compile Include="Classes\Model\Product.cs" />
     <Compile Include="Classes\Model\Agent.cs" />
     <Compile Include="Classes\Model\Country.cs" />
@@ -151,4 +153,7 @@
     <Compile Include="Classes\Logger.cs" />
     <Compile Include="Classes\Model\State.cs" />
+    <Compile Include="Classes\Model\Subscription.cs" />
+    <Compile Include="Classes\Model\SubscriptionDetail.cs" />
+    <Compile Include="Classes\Model\SubscriptionType.cs" />
     <Compile Include="Classes\Model\UserAgency.cs" />
     <Compile Include="Classes\PrintDGV.cs" />
@@ -161,4 +166,5 @@
     <Compile Include="Classes\Repositories\Repository.cs" />
     <Compile Include="Classes\Repositories\StateRepository.cs" />
+    <Compile Include="Classes\Repositories\SubscriptionTypeRepository.cs" />
     <Compile Include="Classes\Repositories\UserAgencyRepository.cs" />
     <Compile Include="Classes\User.cs" />
@@ -206,9 +212,9 @@
       <DependentUpon>FacturesFormNew.cs</DependentUpon>
     </Compile>
-    <Compile Include="Subscription.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="Subscription.Designer.cs">
-      <DependentUpon>Subscription.cs</DependentUpon>
+    <Compile Include="SubscriptionForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="SubscriptionForm.Designer.cs">
+      <DependentUpon>SubscriptionForm.cs</DependentUpon>
     </Compile>
     <Compile Include="ZestawienieZamowienForm.cs">
@@ -609,7 +615,7 @@
     <EmbeddedResource Include="Raporty\fakturaKatowicePoznan.rdlc" />
     <EmbeddedResource Include="Raporty\fakturaKorekta.rdlc" />
-    <EmbeddedResource Include="Subscription.resx">
-      <SubType>Designer</SubType>
-      <DependentUpon>Subscription.cs</DependentUpon>
+    <EmbeddedResource Include="SubscriptionForm.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>SubscriptionForm.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="ZestawienieZamowienForm.resx">
Index: branches/Abonament/BazaReklam/SubscriptionForm.resx
===================================================================
--- branches/Abonament/BazaReklam/SubscriptionForm.resx (revision 703)
+++ branches/Abonament/BazaReklam/SubscriptionForm.resx (revision 703)
@@ -0,0 +1,123 @@
+<?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>
+  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: branches/Abonament/BazaReklam/ZamowieniaForm.Designer.cs
===================================================================
--- branches/Abonament/BazaReklam/ZamowieniaForm.Designer.cs (revision 597)
+++ branches/Abonament/BazaReklam/ZamowieniaForm.Designer.cs (revision 703)
@@ -36,7 +36,7 @@
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ZamowieniaForm));
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
             this.zamowieniaDataGridView = new System.Windows.Forms.DataGridView();
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -56,11 +56,4 @@
             this.rEKLAMABindingSource = new System.Windows.Forms.BindingSource(this.components);
             this.rEKLAMADataGridView1 = new System.Windows.Forms.DataGridView();
-            this.dataGridViewTextBoxColumn72 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Data1Emisji = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn90 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn43 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn44 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ZATWIERDZONO_DO_DRUKU2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.rEKLAMABindingSource1 = new System.Windows.Forms.BindingSource(this.components);
             this.dodajButton = new System.Windows.Forms.Button();
@@ -101,5 +94,9 @@
             this.toolTip = new System.Windows.Forms.ToolTip(this.components);
             this.KlientLabel = new System.Windows.Forms.Label();
-            this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
+            this.Data1Emisji = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn43 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn44 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ZATWIERDZONO_DO_DRUKU2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.zamowieniaDataGridView)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.zamowieniaBindingSource)).BeginInit();
@@ -114,5 +111,4 @@
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
             this.SuspendLayout();
             // 
@@ -226,5 +222,5 @@
             this.ZATWIERDZONO_DO_DRUKU});
             this.rEKLAMADataGridView.DataSource = this.rEKLAMABindingSource;
-            this.rEKLAMADataGridView.Location = new System.Drawing.Point(6, 39);
+            this.rEKLAMADataGridView.Location = new System.Drawing.Point(6, 33);
             this.rEKLAMADataGridView.MultiSelect = false;
             this.rEKLAMADataGridView.Name = "rEKLAMADataGridView";
@@ -232,5 +228,5 @@
             this.rEKLAMADataGridView.RowHeadersWidth = 10;
             this.rEKLAMADataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.rEKLAMADataGridView.Size = new System.Drawing.Size(379, 167);
+            this.rEKLAMADataGridView.Size = new System.Drawing.Size(379, 173);
             this.rEKLAMADataGridView.TabIndex = 1;
             // 
@@ -295,5 +291,4 @@
             dataGridViewCellStyle5.BackColor = System.Drawing.Color.MintCream;
             this.rEKLAMADataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
-            this.rEKLAMADataGridView1.AutoGenerateColumns = false;
             this.rEKLAMADataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
             this.rEKLAMADataGridView1.BackgroundColor = System.Drawing.Color.White;
@@ -308,13 +303,10 @@
             this.rEKLAMADataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
             this.rEKLAMADataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.dataGridViewTextBoxColumn72,
             this.Data1Emisji,
             this.dataGridViewTextBoxColumn1,
-            this.dataGridViewTextBoxColumn90,
             this.dataGridViewTextBoxColumn43,
             this.dataGridViewTextBoxColumn44,
             this.ZATWIERDZONO_DO_DRUKU2});
-            this.rEKLAMADataGridView1.DataSource = this.rEKLAMABindingSource1;
-            this.rEKLAMADataGridView1.Location = new System.Drawing.Point(465, 39);
+            this.rEKLAMADataGridView1.Location = new System.Drawing.Point(465, 33);
             this.rEKLAMADataGridView1.MultiSelect = false;
             this.rEKLAMADataGridView1.Name = "rEKLAMADataGridView1";
@@ -322,62 +314,6 @@
             this.rEKLAMADataGridView1.RowHeadersWidth = 10;
             this.rEKLAMADataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.rEKLAMADataGridView1.Size = new System.Drawing.Size(401, 167);
+            this.rEKLAMADataGridView1.Size = new System.Drawing.Size(379, 173);
             this.rEKLAMADataGridView1.TabIndex = 2;
-            // 
-            // dataGridViewTextBoxColumn72
-            // 
-            this.dataGridViewTextBoxColumn72.DataPropertyName = "ID REKLAMY";
-            this.dataGridViewTextBoxColumn72.HeaderText = "Symbol";
-            this.dataGridViewTextBoxColumn72.Name = "dataGridViewTextBoxColumn72";
-            this.dataGridViewTextBoxColumn72.ReadOnly = true;
-            // 
-            // Data1Emisji
-            // 
-            this.Data1Emisji.DataPropertyName = "Data1Emisji";
-            this.Data1Emisji.HeaderText = "1 Emisja";
-            this.Data1Emisji.Name = "Data1Emisji";
-            this.Data1Emisji.ReadOnly = true;
-            // 
-            // dataGridViewTextBoxColumn1
-            // 
-            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.dataGridViewTextBoxColumn1.DataPropertyName = "TYP";
-            this.dataGridViewTextBoxColumn1.HeaderText = "TYP";
-            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
-            this.dataGridViewTextBoxColumn1.ReadOnly = true;
-            this.dataGridViewTextBoxColumn1.Width = 50;
-            // 
-            // dataGridViewTextBoxColumn90
-            // 
-            this.dataGridViewTextBoxColumn90.DataPropertyName = "NETTO";
-            this.dataGridViewTextBoxColumn90.HeaderText = "NETTO";
-            this.dataGridViewTextBoxColumn90.Name = "dataGridViewTextBoxColumn90";
-            this.dataGridViewTextBoxColumn90.ReadOnly = true;
-            // 
-            // dataGridViewTextBoxColumn43
-            // 
-            this.dataGridViewTextBoxColumn43.DataPropertyName = "VAT";
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.Format = "P";
-            this.dataGridViewTextBoxColumn43.DefaultCellStyle = dataGridViewCellStyle7;
-            this.dataGridViewTextBoxColumn43.HeaderText = "VAT";
-            this.dataGridViewTextBoxColumn43.Name = "dataGridViewTextBoxColumn43";
-            this.dataGridViewTextBoxColumn43.ReadOnly = true;
-            // 
-            // dataGridViewTextBoxColumn44
-            // 
-            this.dataGridViewTextBoxColumn44.DataPropertyName = "Brutto_Euro_Miano";
-            this.dataGridViewTextBoxColumn44.HeaderText = "Waluta";
-            this.dataGridViewTextBoxColumn44.Name = "dataGridViewTextBoxColumn44";
-            this.dataGridViewTextBoxColumn44.ReadOnly = true;
-            // 
-            // ZATWIERDZONO_DO_DRUKU2
-            // 
-            this.ZATWIERDZONO_DO_DRUKU2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.ZATWIERDZONO_DO_DRUKU2.DataPropertyName = "ZATWIERDZONO DO DRUKU";
-            this.ZATWIERDZONO_DO_DRUKU2.HeaderText = "ZD";
-            this.ZATWIERDZONO_DO_DRUKU2.Name = "ZATWIERDZONO_DO_DRUKU2";
-            this.ZATWIERDZONO_DO_DRUKU2.ReadOnly = true;
-            this.ZATWIERDZONO_DO_DRUKU2.Width = 25;
             // 
             // rEKLAMABindingSource1
@@ -625,5 +561,5 @@
             this.groupBox1.TabIndex = 12;
             this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Dodawanie reklam do zamówienia";
+            this.groupBox1.Text = "Dodawanie produktów do zamówienia";
             // 
             // reklama2Button
@@ -641,5 +577,5 @@
             // 
             this.reklama1Button.Image = ((System.Drawing.Image)(resources.GetObject("reklama1Button.Image")));
-            this.reklama1Button.Location = new System.Drawing.Point(9, 212);
+            this.reklama1Button.Location = new System.Drawing.Point(6, 212);
             this.reklama1Button.Name = "reklama1Button";
             this.reklama1Button.Size = new System.Drawing.Size(37, 38);
@@ -652,18 +588,18 @@
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(462, 23);
+            this.label2.Location = new System.Drawing.Point(465, 17);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(104, 13);
+            this.label2.Size = new System.Drawing.Size(105, 13);
             this.label2.TabIndex = 7;
-            this.label2.Text = "Reklamy do dodania";
+            this.label2.Text = "Produkty do dodania";
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(23, 23);
+            this.label1.Location = new System.Drawing.Point(6, 17);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(117, 13);
+            this.label1.Size = new System.Drawing.Size(118, 13);
             this.label1.TabIndex = 6;
-            this.label1.Text = "Reklamy w zamówieniu";
+            this.label1.Text = "Produkty w zamówieniu";
             // 
             // groupBox2
@@ -772,7 +708,45 @@
             this.KlientLabel.Text = "----";
             // 
-            // errorProvider1
-            // 
-            this.errorProvider1.ContainerControl = this;
+            // Data1Emisji
+            // 
+            this.Data1Emisji.DataPropertyName = "StartDate";
+            this.Data1Emisji.HeaderText = "1 Emisja";
+            this.Data1Emisji.Name = "Data1Emisji";
+            this.Data1Emisji.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "Type";
+            this.dataGridViewTextBoxColumn1.HeaderText = "Typ";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.Width = 50;
+            // 
+            // dataGridViewTextBoxColumn43
+            // 
+            this.dataGridViewTextBoxColumn43.DataPropertyName = "Vat";
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.Format = "P";
+            this.dataGridViewTextBoxColumn43.DefaultCellStyle = dataGridViewCellStyle7;
+            this.dataGridViewTextBoxColumn43.HeaderText = "Vat";
+            this.dataGridViewTextBoxColumn43.Name = "dataGridViewTextBoxColumn43";
+            this.dataGridViewTextBoxColumn43.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn44
+            // 
+            this.dataGridViewTextBoxColumn44.DataPropertyName = "Currency";
+            this.dataGridViewTextBoxColumn44.HeaderText = "Waluta";
+            this.dataGridViewTextBoxColumn44.Name = "dataGridViewTextBoxColumn44";
+            this.dataGridViewTextBoxColumn44.ReadOnly = true;
+            // 
+            // ZATWIERDZONO_DO_DRUKU2
+            // 
+            this.ZATWIERDZONO_DO_DRUKU2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ZATWIERDZONO_DO_DRUKU2.DataPropertyName = "IsActivated";
+            this.ZATWIERDZONO_DO_DRUKU2.HeaderText = "ZD";
+            this.ZATWIERDZONO_DO_DRUKU2.Name = "ZATWIERDZONO_DO_DRUKU2";
+            this.ZATWIERDZONO_DO_DRUKU2.ReadOnly = true;
+            this.ZATWIERDZONO_DO_DRUKU2.Width = 25;
             // 
             // ZamowieniaForm
@@ -802,5 +776,4 @@
             this.groupBox2.ResumeLayout(false);
             this.groupBox3.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -868,9 +841,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn kodAgenta;
         private System.Windows.Forms.Button proformaButton;
-        private System.Windows.Forms.ErrorProvider errorProvider1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn72;
         private System.Windows.Forms.DataGridViewTextBoxColumn Data1Emisji;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn90;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn43;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn44;
Index: branches/Abonament/BazaReklam/ZamowieniaForm.resx
===================================================================
--- branches/Abonament/BazaReklam/ZamowieniaForm.resx (revision 349)
+++ branches/Abonament/BazaReklam/ZamowieniaForm.resx (revision 703)
@@ -131,5 +131,5 @@
   </metadata>
   <metadata name="zamowieniaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>162, 17</value>
+    <value>153, 17</value>
   </metadata>
   <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -149,5 +149,5 @@
   </metadata>
   <metadata name="rEKLAMABindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>431, 54</value>
+    <value>1087, 17</value>
   </metadata>
   <metadata name="Data1Emisji.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -167,5 +167,5 @@
   </metadata>
   <metadata name="rEKLAMABindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>598, 54</value>
+    <value>17, 54</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
@@ -203,5 +203,5 @@
   </data>
   <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 54</value>
+    <value>673, 17</value>
   </metadata>
   <data name="dodajDoZamButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -316,5 +316,5 @@
   </metadata>
   <metadata name="fAKTURYBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>102, 54</value>
+    <value>758, 17</value>
   </metadata>
   <data name="WydrukButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -349,11 +349,11 @@
   </data>
   <metadata name="zamowieniaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>357, 17</value>
+    <value>334, 17</value>
   </metadata>
   <metadata name="rEKLAMATableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>543, 17</value>
+    <value>510, 17</value>
   </metadata>
   <metadata name="fAKTURYTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>269, 54</value>
+    <value>925, 17</value>
   </metadata>
   <data name="edytujButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -539,7 +539,4 @@
 </value>
   </data>
-  <metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 91</value>
-  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>183</value>
Index: branches/Abonament/BazaReklam/Classes/Interfaces/IProduct.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Interfaces/IProduct.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Interfaces/IProduct.cs (revision 703)
@@ -0,0 +1,17 @@
+using System;
+
+namespace Baza_Reklam.Classes.Interfaces
+{
+    public interface IProduct
+    {
+        int Id { get; set; }
+        string Type { get; set; }
+        string ShortName { get; set; }
+        DateTime StartDate { get; set; }
+        decimal Price { get; set; }
+        decimal TotalPrice { get; set; }
+        decimal Vat { get; set; }
+        string Currency { get; set; }
+        bool IsActivated { get; set; }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs (revision 702)
+++ branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs (revision 703)
@@ -1,9 +1,10 @@
 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.Data.SqlClient;
 
 namespace Baza_Reklam.Classes.Repositories
 {
-    public class Repository<T> : IRepository<T>
+    public class Repository<T> : IRepository<T>, IDisposable
     {
         protected SqlConnection _connection;
@@ -27,19 +28,32 @@
         }
 
-        public virtual void Save()
+        public virtual void Save(T entity)
         {
             throw new NotImplementedException();
         }
 
-        public virtual void Delete()
+        public virtual void Delete(T entity)
         {
             throw new NotImplementedException();
         }
-    }
 
-    public class SqlRepository<T> : Repository<T>
-    {
-        public SqlRepository(string connectionString) : base(connectionString)
+        public void Dispose()
         {
+            if (_connection == null) return;
+            
+            if (_connection.State == ConnectionState.Open)
+                _connection.Close();
+                
+            _connection.Dispose();
+        }
+
+        protected void CleanUp()
+        {
+            if (_reader != null) _reader.Close();
+
+            if (_command != null) _command.Dispose();
+
+            if (_connection != null && _connection.State == ConnectionState.Open)
+                _connection.Close();
         }
     }
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 703)
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.Data.SqlClient;
-using System.Text;
+using Baza_Reklam.Classes.Interfaces;
 using Baza_Reklam.Classes.Model;
 
@@ -16,5 +17,5 @@
         public override Customer Find(int id)
         {
-            string query = "SELECT * FROM Klienci WHERE CustomerId={0}";
+            string query = "SELECT CustomerId, FirstName FROM Klienci WHERE CustomerId={0}";
             query = string.Format(query, id);
 
@@ -30,9 +31,169 @@
             finally
             {
-                _connection.Close();
+                CleanUp();
             }
 
             return null;
         }
+
+        public override void Save(Customer customer)
+        {
+            const string insertSubscriptionQuery = "INSERT INTO Subscription(Guid, CustomerId, SubscriptionTypeId, SubscriptionItems, BasePrice, TotalPrice, Discount, Currency, OrderId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy, StartDate) "
+                                 + "VALUES(@guid, @customerId, @subscriptionTypeId, @subscriptionItems, @basePrice, @totalPrice, @discount, @currency, @orderId, @createdOn, @createdBy, @updatedOn, @updatedBy, @startDate) "
+                                 + "SELECT SCOPE_IDENTITY();";
+
+            const string insertSubscriptionDetailQuery = "INSERT INTO SubscriptionDetail(SubscriptionId, Price, PricePln, Vat, [Year], [Month]) "
+                                                         + "VALUES(@subscriptionId, @price, @pricePln, @vat, @year, @month) "
+                                                         + "SELECT SCOPE_IDENTITY();";
+
+            try
+            {
+                _connection.Open();
+                _transaction = _connection.BeginTransaction();
+                _command = new SqlCommand(insertSubscriptionQuery, _connection);
+                _command.Transaction = _transaction;
+
+                foreach (Subscription subscription in customer.Subscriptions)
+                {
+                    _command.Parameters.Clear();
+
+                    _command.Parameters.AddWithValue("@guid", subscription.Guid);
+                    _command.Parameters.AddWithValue("@customerId", customer.Id);
+                    _command.Parameters.AddWithValue("@subscriptionTypeId", subscription.SubscriptionTypeId);
+                    _command.Parameters.AddWithValue("@subscriptionItems", subscription.SubscriptionItems);
+                    _command.Parameters.AddWithValue("@basePrice", subscription.BasePrice);
+                    _command.Parameters.AddWithValue("@totalPrice", subscription.TotalPrice);
+                    _command.Parameters.AddWithValue("@discount", subscription.Discount);
+                    _command.Parameters.AddWithValue("@currency", subscription.Currency);
+                    if (subscription.OrderId > 0)
+                        _command.Parameters.AddWithValue("@orderId", subscription.OrderId);
+                    else
+                        _command.Parameters.AddWithValue("@orderId", DBNull.Value);
+
+                    _command.Parameters.AddWithValue("@createdOn", subscription.CreatedOn);
+                    _command.Parameters.AddWithValue("@createdBy", subscription.CreatedBy);
+                    _command.Parameters.AddWithValue("@updatedOn", subscription.UpdatedOn);
+                    _command.Parameters.AddWithValue("@updatedBy", subscription.UpdatedBy);
+                    _command.Parameters.AddWithValue("@startDate", subscription.StartDate);
+
+                    int subscriptionId = Convert.ToInt32(_command.ExecuteScalar());
+
+                    foreach (SubscriptionDetail subscriptionDetail in subscription.SubscriptionDetails)
+                    {
+                        subscriptionDetail.SubscriptionId = subscriptionId;
+
+                        SqlCommand sqlCommand = new SqlCommand(insertSubscriptionDetailQuery, _connection);
+                        sqlCommand.Transaction = _transaction;
+                        sqlCommand.Parameters.AddWithValue("@subscriptionId", subscriptionDetail.SubscriptionId);
+                        sqlCommand.Parameters.AddWithValue("@price", subscriptionDetail.Price);
+                        sqlCommand.Parameters.AddWithValue("@pricePln", subscriptionDetail.PricePln);
+                        sqlCommand.Parameters.AddWithValue("@vat", subscriptionDetail.Vat);
+                        sqlCommand.Parameters.AddWithValue("@year", subscriptionDetail.Year);
+                        sqlCommand.Parameters.AddWithValue("@month", subscriptionDetail.Month);
+
+                        sqlCommand.ExecuteScalar();
+                    }
+                }
+
+                _transaction.Commit();
+            }
+            catch (Exception)
+            {
+                _transaction.Rollback();
+                throw;
+            }
+            finally
+            {
+                CleanUp();
+            }
+        }
+
+        public List<Subscription> FindSubscriptions(int customerId)
+        {
+            string query = "SELECT Id, Guid, CustomerId, SubscriptionTypeId, SubscriptionItems, BasePrice, Discount, TotalPrice, Currency, OrderId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy, StartDate FROM Subscription WHERE CustomerId={0} ORDER BY UpdatedOn DESC";
+            query = string.Format(query, customerId);
+
+            List<Subscription> subscriptions = new List<Subscription>();
+
+            try
+            {
+                _connection.Open();
+                _command = new SqlCommand(query, _connection);
+
+                _reader = _command.ExecuteReader();
+                if (_reader != null)
+                {
+                    while (_reader.Read())
+                    {
+                        Subscription subscription = new Subscription(_reader.GetInt32(0));
+                        subscription.Guid = _reader.GetGuid(1);
+                        subscription.CustomerId = _reader.GetInt32(2);
+                        subscription.SubscriptionTypeId = _reader.GetInt32(3);
+                        subscription.SubscriptionItems = _reader.GetInt32(4);
+                        subscription.BasePrice = _reader.GetDecimal(5);
+                        subscription.Discount = _reader.GetDecimal(6);
+                        subscription.TotalPrice = _reader.GetDecimal(7);
+                        subscription.Currency = _reader.GetString(8);
+                        if (_reader[9] != DBNull.Value)
+                            subscription.OrderId = _reader.GetInt32(9);
+                        subscription.CreatedOn = _reader.GetDateTime(10);
+                        subscription.CreatedBy = _reader.GetInt32(11);
+                        subscription.UpdatedOn = _reader.GetDateTime(12);
+                        subscription.UpdatedBy = _reader.GetInt32(13);
+                        subscription.StartDate = _reader.GetDateTime(14);
+
+                        subscriptions.Add(subscription);
+                    }
+                }
+            }
+            finally
+            {
+                CleanUp();
+            }
+
+            return subscriptions;
+        }
+
+        public List<IProduct> FindProductsWithoutOrders(int customerId)
+        {
+
+            List<IProduct> products = new List<IProduct>();
+
+            const string query = "sp_GetProductsWithoutOrder";
+
+            try
+            {
+                _connection.Open();
+                _command = new SqlCommand(query, _connection);
+                _command.Parameters.AddWithValue("@customerId", customerId);
+                _command.CommandType = CommandType.StoredProcedure;
+
+                _reader = _command.ExecuteReader();
+                if (_reader != null)
+                {
+                    while (_reader.Read())
+                    {
+                        Product product = new Product();
+                        product.Id = _reader.GetInt32(0);
+                        product.Type = _reader.GetString(1);
+                        product.ShortName = _reader.GetString(2);
+                        product.StartDate = _reader.GetDateTime(3);
+                        product.Price = _reader.GetDecimal(4);
+                        product.TotalPrice = _reader.GetDecimal(5);
+                        product.Vat = _reader.GetDecimal(6);
+                        product.Currency = _reader.GetString(7);
+                        product.IsActivated = _reader.GetBoolean(8);
+                        
+                        products.Add(product);
+                    }
+                }
+            }
+            finally
+            {
+                CleanUp();
+            }
+
+            return products;
+        }
     }
 }
Index: branches/Abonament/BazaReklam/Classes/Repositories/SubscriptionTypeRepository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/SubscriptionTypeRepository.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Repositories/SubscriptionTypeRepository.cs (revision 703)
@@ -0,0 +1,45 @@
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using Baza_Reklam.Classes.Model;
+
+namespace Baza_Reklam.Classes.Repositories
+{
+    public class SubscriptionTypeRepository : Repository<SubscriptionType>
+    {
+        public SubscriptionTypeRepository(string connectionString)
+            : base(connectionString)
+        {
+        }
+
+        public override List<SubscriptionType> FindAll()
+        {
+            const string query = "SELECT Id, Name, PricePln, PriceEur FROM dbo.SubscriptionType";
+
+            List<SubscriptionType> subscriptionTypes = new List<SubscriptionType>();
+
+            try
+            {
+                _connection.Open();
+                _command = new SqlCommand(query, _connection);
+
+                _reader = _command.ExecuteReader();
+                if (_reader != null)
+                {
+                    while (_reader.Read())
+                    {  
+                        subscriptionTypes.Add(new SubscriptionType(_reader.GetInt32(0), 
+                                                                   _reader.GetString(1),
+                                                                   _reader.GetDecimal(2),
+                                                                   _reader.GetDecimal(3)));
+                    }
+                }
+            }
+            finally
+            {
+                CleanUp();
+            }
+
+            return subscriptionTypes;
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Repositories/IRepository.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Repositories/IRepository.cs (revision 614)
+++ branches/Abonament/BazaReklam/Classes/Repositories/IRepository.cs (revision 703)
@@ -7,6 +7,6 @@
         T Find(int id);
         List<T> FindAll();
-        void Save();
-        void Delete();
+        void Save(T entity);
+        void Delete(T entity);
     }
 }
Index: branches/Abonament/BazaReklam/Classes/Model/Product.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Model/Product.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Model/Product.cs (revision 703)
@@ -0,0 +1,71 @@
+using System;
+using Baza_Reklam.Classes.Interfaces;
+
+namespace Baza_Reklam.Classes.Model
+{
+    public class Product : IProduct
+    {
+        private int _id;
+        private string _type;
+        private string _shortName;
+        private DateTime _startDate;
+        private decimal _price;
+        private decimal _totalPrice;
+        private decimal _vat;
+        private string _currency;
+        private bool _isActivated;
+        public int Id
+        {
+            get { return _id; }
+            set { _id = value; }
+        }
+
+        public string Type
+        {
+            get { return _type; }
+            set { _type = value; }
+        }
+
+        public string ShortName
+        {
+            get { return _shortName; }
+            set { _shortName = value; }
+        }
+
+        public DateTime StartDate
+        {
+            get { return _startDate; }
+            set { _startDate = value; }
+        }
+
+        public decimal Price
+        {
+            get { return _price; }
+            set { _price = value; }
+        }
+
+        public decimal TotalPrice
+        {
+            get { return _totalPrice; }
+            set { _totalPrice = value; }
+        }
+
+        public decimal Vat
+        {
+            get { return _vat; }
+            set { _vat = value; }
+        }
+
+        public string Currency
+        {
+            get { return _currency; }
+            set { _currency = value; }
+        }
+
+        public bool IsActivated
+        {
+            get { return _isActivated; }
+            set { _isActivated = value; }
+        }
+    }
+}
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 703)
@@ -1,2 +1,4 @@
+using System.Collections.Generic;
+
 namespace Baza_Reklam.Classes.Model
 {
@@ -5,4 +7,5 @@
         private readonly int _id;
         private readonly string _name;
+        private List<Subscription> _subscriptions;
 
         public Customer(int id, string name)
@@ -21,4 +24,17 @@
             get { return _name; }
         }
+
+        public List<Subscription> Subscriptions
+        {
+            get { return _subscriptions; }
+        }
+
+        public void AddSubscription(Subscription subscription)
+        {
+            if (_subscriptions == null)
+                _subscriptions = new List<Subscription>();
+
+            _subscriptions.Add(subscription);
+        }
     }
 }
Index: branches/Abonament/BazaReklam/Classes/Model/Subscription.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Model/Subscription.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Model/Subscription.cs (revision 703)
@@ -0,0 +1,172 @@
+using System;
+using System.Collections.Generic;
+
+namespace Baza_Reklam.Classes.Model
+{
+    public class Subscription
+    {
+        private readonly int _id;
+        private Guid _guid;
+        private int _customerId;
+        private int _subscriptionTypeId;
+        private int _subscriptionItems;
+        private decimal _basePrice;
+        private decimal _totalPrice;
+        private decimal _discount;
+        private string _currency;
+        private DateTime _startDate;
+        private int _orderId;
+        private DateTime _createdOn;
+        private int _createdBy;
+        private DateTime _updatedOn;
+        private int _updatedBy;
+        private readonly SubscriptionType _subscriptionType;
+        private readonly Customer _customer;
+        private readonly Agent _agent;
+        private List<SubscriptionDetail> _subscriptionDetails;
+
+        public Subscription() { }
+
+        public Subscription(int id)
+        {
+            _id = id;
+        }
+
+        public Subscription(int id, Guid guid, int customerId, int subscriptionTypeId, int subscriptionItems, decimal basePrice, decimal totalPrice, decimal discount, string currency, int orderId, DateTime createdOn, int createdBy, DateTime updatedOn, int updatedBy, DateTime startDate)
+        {
+            _id = id;
+            _startDate = startDate;
+            _updatedBy = updatedBy;
+            _updatedOn = updatedOn;
+            _createdBy = createdBy;
+            _createdOn = createdOn;
+            _orderId = orderId;
+            _currency = currency;
+            _basePrice = basePrice;
+            _totalPrice = totalPrice;
+            _discount = discount;
+            _subscriptionItems = subscriptionItems;
+            _subscriptionTypeId = subscriptionTypeId;
+            _customerId = customerId;
+            _guid = guid;
+        }
+
+        public int Id
+        {
+            get { return _id; }
+            //set { _id = value; }
+        }
+
+        public Guid Guid
+        {
+            get { return _guid; }
+            set { _guid = value; }
+        }
+
+        public int CustomerId
+        {
+            get { return _customerId; }
+            set { _customerId = value; }
+        }
+
+        public int SubscriptionTypeId
+        {
+            get { return _subscriptionTypeId; }
+            set { _subscriptionTypeId = value; }
+        }
+
+        public decimal BasePrice
+        {
+            get { return _basePrice; }
+            set { _basePrice = value; }
+        }
+
+        public decimal TotalPrice
+        {
+            get { return _totalPrice; }
+            set { _totalPrice = value; }
+        }
+
+        public decimal Discount
+        {
+            get { return _discount; }
+            set { _discount = value; }
+        }
+
+        public string Currency
+        {
+            get { return _currency; }
+            set { _currency = value; }
+        }
+
+        public int OrderId
+        {
+            get { return _orderId; }
+            set { _orderId = value; }
+        }
+
+        public DateTime CreatedOn
+        {
+            get { return _createdOn; }
+            set { _createdOn = value; }
+        }
+
+        public int CreatedBy
+        {
+            get { return _createdBy; }
+            set { _createdBy = value; }
+        }
+
+        public DateTime UpdatedOn
+        {
+            get { return _updatedOn; }
+            set { _updatedOn = value; }
+        }
+
+        public int UpdatedBy
+        {
+            get { return _updatedBy; }
+            set { _updatedBy = value; }
+        }
+
+        public SubscriptionType SubscriptionType
+        {
+            get { return _subscriptionType; }
+        }
+
+        public Customer Customer
+        {
+            get { return _customer; }
+        }
+
+        public Agent Agent
+        {
+            get { return _agent; }
+        }
+
+        public DateTime StartDate
+        {
+            get { return _startDate; }
+            set { _startDate = value; }
+        }
+
+        public int SubscriptionItems
+        {
+            get { return _subscriptionItems; }
+            set { _subscriptionItems = value; }
+        }
+
+        public List<SubscriptionDetail> SubscriptionDetails
+        {
+            get { return _subscriptionDetails; }
+        }
+
+        public void AddSubscriptionDetail(SubscriptionDetail subscriptionDetail)
+        {
+            if (_subscriptionDetails == null)
+                _subscriptionDetails = new List<SubscriptionDetail>();
+
+            _subscriptionDetails.Add(subscriptionDetail);
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Model/SubscriptionType.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Model/SubscriptionType.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Model/SubscriptionType.cs (revision 703)
@@ -0,0 +1,41 @@
+namespace Baza_Reklam.Classes.Model
+{
+    public class SubscriptionType
+    {
+        private readonly int _id;
+        private string _name;
+        private decimal _pricePln;
+        private decimal _priceEur;
+
+        public SubscriptionType(int id, string name, decimal pricePln, decimal priceEur)
+        {
+            _id = id;
+            _priceEur = priceEur;
+            _pricePln = pricePln;
+            _name = name;
+        }
+
+        public decimal PriceEur
+        {
+            get { return _priceEur; }
+            set { _priceEur = value; }
+        }
+
+        public decimal PricePln
+        {
+            get { return _pricePln; }
+            set { _pricePln = value; }
+        }
+
+        public string Name
+        {
+            get { return _name; }
+            set { _name = value; }
+        }
+
+        public int Id
+        {
+            get { return _id; }
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Model/SubscriptionDetail.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Model/SubscriptionDetail.cs (revision 703)
+++ branches/Abonament/BazaReklam/Classes/Model/SubscriptionDetail.cs (revision 703)
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Baza_Reklam.Classes.Model
+{
+    public class SubscriptionDetail
+    {
+        private readonly int _id;
+        private int _subscriptionId;
+        private decimal _price;
+        private decimal _pricePln;
+        private decimal _vat;
+        private int _year;
+        private int _month;
+
+        public SubscriptionDetail () { }
+
+        public SubscriptionDetail(int id, int subscriptionId, decimal price, decimal pricePln, decimal vat, int year, int month)
+        {
+            _id = id;
+            _month = month;
+            _year = year;
+            _vat = vat;
+            _pricePln = pricePln;
+            _price = price;
+            _subscriptionId = subscriptionId;
+        }
+
+        public int Id
+        {
+            get { return _id; }
+        }
+
+        public int SubscriptionId
+        {
+            get { return _subscriptionId; }
+            set { _subscriptionId = value; }
+        }
+
+        public decimal Price
+        {
+            get { return _price; }
+            set { _price = value; }
+        }
+
+        public decimal PricePln
+        {
+            get { return _pricePln; }
+            set { _pricePln = value; }
+        }
+
+        public decimal Vat
+        {
+            get { return _vat; }
+            set { _vat = value; }
+        }
+
+        public int Year
+        {
+            get { return _year; }
+            set { _year = value; }
+        }
+
+        public int Month
+        {
+            get { return _month; }
+            set { _month = value; }
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Classes/Helpers/ValidationHelper.cs
===================================================================
--- branches/Abonament/BazaReklam/Classes/Helpers/ValidationHelper.cs (revision 539)
+++ branches/Abonament/BazaReklam/Classes/Helpers/ValidationHelper.cs (revision 703)
@@ -78,4 +78,19 @@
             return cancelEventArgs.Cancel;
         }
+
+	        public static bool IsComboValueSelected(ComboBox comboBox, int defaultIndex, string errorMessage, CancelEventArgs cancelEventArgs, ErrorProvider errorProvider)
+	        {
+	            StringBuilder sb = new StringBuilder();
+	            if (comboBox.SelectedIndex < 0 || comboBox.SelectedIndex == defaultIndex || comboBox.SelectedItem == null)
+	            {
+	                cancelEventArgs.Cancel = true;
+	                sb.Append(errorMessage);
+	            }
+	            else
+	                cancelEventArgs.Cancel = false;
+	
+	            errorProvider.SetError(comboBox, sb.ToString());
+	            return cancelEventArgs.Cancel;
+	        }
     }
 }
Index: branches/Abonament/BazaReklam/SubscriptionForm.cs
===================================================================
--- branches/Abonament/BazaReklam/SubscriptionForm.cs (revision 703)
+++ branches/Abonament/BazaReklam/SubscriptionForm.cs (revision 703)
@@ -0,0 +1,192 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Baza_Reklam.Classes.Helpers;
+using Baza_Reklam.Classes.Model;
+using Baza_Reklam.Classes.Repositories;
+
+namespace Baza_Reklam
+{
+    public partial class SubscriptionForm : 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 IRepository<SubscriptionType> _subscriptionTypeRepository;
+        private readonly List<SubscriptionType> _subscriptionTypes = new List<SubscriptionType>();
+        private readonly Customer _customer;
+
+        private SubscriptionType CurrentSubscriptionType
+        {
+            get
+            {
+                if (cbSubscriptionType.SelectedItem == null || ((SubscriptionType)cbSubscriptionType.SelectedItem).Id <= 0) return null;
+                return (SubscriptionType)cbSubscriptionType.SelectedItem;
+            }
+        }
+
+        public SubscriptionForm(int customerId)
+        {
+            InitializeComponent();
+
+            _customerRepository = new CustomerRepository(_connectionString);
+            _customer = _customerRepository.Find(customerId);
+
+            _subscriptionTypeRepository = new SubscriptionTypeRepository(_connectionString);
+            _subscriptionTypes = _subscriptionTypeRepository.FindAll();
+
+            BindControls();
+        }
+
+
+        [Obsolete("This is a deprecated method - use ComboBoxHelper after merge from ReklamaReorganizacja branch")]
+        static void BindComboBox<T>(IEnumerable<T> list, ComboBox comboBox)
+        {
+            comboBox.Items.Clear();
+            foreach (T item in list)
+            {
+                comboBox.Items.Add(item);
+            }
+        }
+
+        private void BindControls()
+        {
+            lblCustomerName.Text = _customer.Name;
+
+            BindComboBox(_subscriptionTypes, cbSubscriptionType);
+            cbSubscriptionType.DisplayMember = "Name";
+            cbSubscriptionType.ValueMember = "Id";
+
+            cbSubscriptionType.Items.Insert(0, new SubscriptionType(0, "-- proszê wybraæ --", 0, 0));
+            cbSubscriptionType.SelectedIndex = 0;
+
+            cbCurrency.SelectedIndex = 0;
+        }
+
+        private void SetControls(bool enable)
+        {
+            numSubscriptionCount.Value = 1;
+            numDiscount.Value = 0;
+            if (enable)
+            {
+                numSubscriptionCount.Enabled = true;
+                numDiscount.Enabled = true;
+                txtPricePln.Text = CurrentSubscriptionType.PricePln.ToString();
+                txtPriceEur.Text = CurrentSubscriptionType.PriceEur.ToString();
+                ReCalculatePrices();
+            }
+            else
+            {
+                numSubscriptionCount.Enabled = false;
+                numDiscount.Enabled = false;
+                txtPricePln.Text = string.Empty;
+                txtPriceEur.Text = string.Empty;
+                txtTotalPricePln.Text = string.Empty;
+                txtTotalPriceEur.Text = string.Empty;
+            }
+        }
+
+        private void ReCalculatePrices()
+        {
+            txtTotalPricePln.Text = (numSubscriptionCount.Value * CurrentSubscriptionType.PricePln * (1 - (numDiscount.Value / 100))).ToString();
+            txtTotalPriceEur.Text = (numSubscriptionCount.Value * CurrentSubscriptionType.PriceEur * (1 - (numDiscount.Value / 100))).ToString();
+        }
+
+        private void cbSubscriptionType_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (cbSubscriptionType.SelectedItem == null) return;
+
+            SubscriptionType subscriptionType = (SubscriptionType)cbSubscriptionType.SelectedItem;
+
+            numSubscriptionCount.Value = 1;
+
+            SetControls(subscriptionType.Id > 0);
+        }
+
+        private void numSubscriptionCount_ValueChanged(object sender, EventArgs e)
+        {
+            if (CurrentSubscriptionType == null)
+            {
+                SetControls(false);
+                return;
+            }
+
+            ReCalculatePrices();
+        }
+
+        private void numDiscount_ValueChanged(object sender, EventArgs e)
+        {
+            if (CurrentSubscriptionType == null)
+            {
+                SetControls(false);
+                return;
+            }
+
+            ReCalculatePrices();
+        }
+
+        private void btnAdd_Click(object sender, EventArgs e)
+        {
+            Subscription subscription = new Subscription();
+
+            subscription.Guid = Guid.NewGuid();
+            subscription.SubscriptionTypeId = CurrentSubscriptionType.Id;
+            subscription.SubscriptionItems = (int)numSubscriptionCount.Value;
+
+            subscription.BasePrice = cbCurrency.SelectedItem.ToString() == "PLN"
+                                         ? Decimal.Parse(txtPricePln.Text)
+                                         : Decimal.Parse(txtPriceEur.Text);
+            
+            subscription.Discount = numDiscount.Value / 100;
+
+            subscription.TotalPrice = cbCurrency.SelectedItem.ToString() == "PLN"
+                                          ? Decimal.Parse(txtTotalPricePln.Text)
+                                          : Decimal.Parse(txtTotalPriceEur.Text);
+
+            subscription.Currency = cbCurrency.SelectedItem.ToString();
+            subscription.CreatedBy = User.Instance().Id;
+            subscription.CreatedOn = DateTime.Now;
+            subscription.UpdatedBy = User.Instance().Id;
+            subscription.UpdatedOn = DateTime.Now;
+            subscription.StartDate = dateStartDate.Value;
+
+            for (int i = 0; i < subscription.SubscriptionItems; i++)
+            {
+                SubscriptionDetail subscriptionDetail = new SubscriptionDetail();
+                subscriptionDetail.Month = dateStartDate.Value.AddMonths(i).Month;
+                subscriptionDetail.Year = dateStartDate.Value.AddMonths(i).Year;
+                subscriptionDetail.Price = subscription.BasePrice * (1 - subscription.Discount);
+                subscriptionDetail.PricePln = Decimal.Parse(txtPricePln.Text) * (1 - subscription.Discount);
+
+                if (subscription.Currency == "PLN")
+                {
+                    subscriptionDetail.Vat = (decimal)VatHelper.PL22;
+                }
+                else
+                {
+                    subscriptionDetail.Vat = (decimal)VatHelper.EU00;
+                }
+                    
+                
+                subscription.AddSubscriptionDetail(subscriptionDetail);
+            }
+
+
+            _customer.AddSubscription(subscription);
+            _customerRepository.Save(_customer);
+
+            Close();
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+
+        private void cbSubscriptionType_Validating(object sender, System.ComponentModel.CancelEventArgs e)
+        {
+            ValidationHelper.IsComboValueSelected(cbSubscriptionType, 0, "Proszê wybraæ typ abonamentu", e, errorProvider);
+        }
+    }
+}
Index: branches/Abonament/BazaReklam/Raporty/faktura.xml
===================================================================
--- branches/Abonament/BazaReklam/Raporty/faktura.xml (revision 429)
+++ branches/Abonament/BazaReklam/Raporty/faktura.xml (revision 703)
@@ -22,5 +22,5 @@
 		<FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_ilosc>No		</FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_ilosc>
 		<FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn>Unit
-Price		</FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn>
+TotalPrice		</FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn>
 		<FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_upust_netto>Discount
 Rebate		</FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_upust_netto>
Index: branches/Abonament/BazaReklam/app.config
===================================================================
--- branches/Abonament/BazaReklam/app.config (revision 678)
+++ branches/Abonament/BazaReklam/app.config (revision 703)
@@ -8,4 +8,6 @@
   <connectionStrings>
     <clear />
+    <add name="BAZA_REKLAM_TEST" connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True"
+      providerName="System.Data.SqlClient" />
     <add name="BAZA_REKLAM" connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM;Persist Security Info=True"
       providerName="System.Data.SqlClient" />
Index: branches/Abonament/BazaReklam/ClientsForm.resx
===================================================================
--- branches/Abonament/BazaReklam/ClientsForm.resx (revision 699)
+++ branches/Abonament/BazaReklam/ClientsForm.resx (revision 703)
@@ -700,4 +700,40 @@
 </value>
   </data>
+  <metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Guid.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="CustomerId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="SubscriptionTypeId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="TotalPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Currency.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="OrderId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="CreatedOn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="CreatedBy.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="UpdatedOn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="UpdatedBy.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="StartDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="usunKlButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -1576,26 +1612,26 @@
     <value>
         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
-        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
+        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
 </value>
   </data>
@@ -1685,32 +1721,32 @@
     <value>
         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
-        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
-        YII=
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABg9JREFUSEuFVQlQ
+        1HUY/ZY9RJAVPABdDkE8gVhQx2SMmtRK09TQAVMTLzQFHLzQEAHXe7IpkkMR76RJy5rGPBIds2Hyaigw
+        MxNkF1wulwWWY0H39f3+K0pmtjNv9n7v+73v+95PRv/9kNEuiqAGmkRyClM5O3g+fEQym8X2gFqphCx0
+        gU5TAZXzK6JHDLyA65mvDtMUh/1UPDF9pG1j0Vxk/JWAj24vh+7mIqwvmoNZF8cj8Kgf5DpZGa2iBP53
+        L4bi/wUOkCNl0YE30kbZDhnW44ghFTl312Ddr5GYVzgGky8OwWtnvRF+SoPw730ZA+Ge5wJKovOkpRAW
+        cGTIni8kyHdRwZrr0fjckIZD99KwoXga5l0JRFThMEy/NBiTCgLw+tkBLOCF0G89MeyrPgg44QaPw07g
+        k5SQP41lcqfni2TQwTU3onHMsAl77iYh9kYYFl3XYmCOGwK2+8NrS394bdZAo9Ngwo/+TwT8v3RDv3xn
+        qPO6gxbTT6SkESzQ/Z+nYM/Hp4bZ8ivTsa/0Qyy8FoLY62GIvRYG30xXdFR3wGK0oMXYgvr7Jsy5PRza
+        bzww9ERvDPiiJzyPOsPtaDcot6tBb9EnTB7QtScy2kPFeeVrcaR8Mz64MRqLr2lZYAQWXtHCJ0uNuso6
+        6Mv1MNwzoFxfjnmlWoScdMeQ473gm6+GOwuoD6qgynIDJSpr2OwoFuhtP8UuejUiNcSWW7oBqb9FY+7P
+        wxBzVYsYJp9dGAxNphpmoxkVhgpUGu6j0liJZaVjEPR1XwSwPV7HXNDniBN6HFJBkcO9SPEAtzuDmQPt
+        p9hAOxKuzEDmnWTMvDwcvtk94cWkXly5JtMFjkkK1BnrYLxvRLWxBrUmIzyy5eixTQWnbCUc8xQIvewN
+        J3522KMAbRwKmkrnmHwKoydRCv2w9eZSJBfNx8QLvvDb4gPUA23Vbeio64D1gRWmahOqqqpQU1ODxvom
+        oBlA+2O0ADtr56BbnhzEwrQhGLTA4S6TL2P0I9pExbripVhYOAHjzvnAQ9cXzVXNKCsrg16vh9HIlVdX
+        o7a2FiaTCfX19TCbzWhsbESDuQHtJiDFOBWKXN7kz7rxTmhBy1WNTJ7K8CPaTCXJRQswrWAUxp7WwJ0F
+        WqpauakGVFRUcuVPyQWpxWJBs6UFLZZWNDe1wNbAAvenQ7aXBXZyk1eHgZaqRHzssE/TerqUcDUK488E
+        YdR3nvBI74eH1TbU6E0wVzGh2SLZIqpuarKgo7UD7VYrHrFFD602gC1KN0aDJ5H99+OFCwW9L7/H5Dvt
+        Aom0e8rZCEScGorAk30Qft4bMWXBmK/XIr48HIPyu0ueNzU1oa2lDRZrI2b96YdI3oUZfwQj+lYopv/C
+        pNkssGI0aOVLoDfpEpOnMfyJYundgDwNXjkdiIHHXTGYZ1vMt3gexHDSKYEOSJ5bW62wtlsReWu4NDWK
+        XAc7cRZD5w6KGwNK8AINoqNMHs/oT+RLrpRMZeGng6DJ7wEfXpxOePNrxwwFe/H0BNb2NhYIgmKv7Cl5
+        BgssDwfFjwQt4QbLaR+TT2O4ilWT0wpKcM9xhScLuPPSdEIskGqvnGcWeGTmsbQwWoGZv4eAcph0NyOT
+        kcjv415mgQGgUXSCObcxRLoq7dss8nwVnVfnOcLlsArqAyq4MHrsVyLwggY6bmJS+dtI0r+DZEMkpnII
+        SuSi8kT2fBlXH8fzH003Oaz3M997DHfGk+hWSHkeTyXKPQ5Q7mfsc5BskOfK7CPY6bXwW5Bv7ckVc1Pj
+        BJg8hio4Qw8x6RrGsK7Vd57CUcrzBXSZtvJG5qjsoyesEOSC9GNepHRupmQJEwvPl7MtUVy5nTyFMZoh
+        7oR/PcRxnKU8H8eRu0RRQ+s4uFL8ef2HgNZylavZmpWMxCAm9wYtUjVInsslW0Tlglzd1ZpnVYSIuCwC
+        pMgNpk9pIp2haPkdWqKslwhny8toAl2URlFOufzbrY89F7Y4v4i8q5i4wMVFLiJ3MkME10bGdoaIgDSG
+        mPNpDDEtfRlPJuZ59jzvM3EaIcSRK1JRBJd0UwnwhoolkuZc9aKq/wa2RohzSe6U6gAAAABJRU5ErkJg
+        gg==
 </value>
   </data>
@@ -2280,23 +2316,23 @@
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABA5JREFUSEvtVH1M
-        W1UcnbLgMBoStwkxAQKWSEdMwIgUQ+g2CixAIWPa0LTQsHTIh0Yjshq1drhBSwi2ItDRbdCWL+lY5DsS
-        ZAnaAB3UMD4qSiQbAwlZ3HSBMd3I8Xdfim4VMdE//Gc3OXnv3XfvOff8zr13x46H7b9WQCgU7pTL5QcV
-        CsV+4vIheP1bzkdp4iMMeXl5T0ul0qSMjIzi1NTUMQLS09ORlJQ0FRUVpQ8MDAyhcY+5x2+vRyvclZ2d
-        fS43N3c1MzNzvqCgwEWEG1qtFgaDAUajEQ0NDTCbzbBYLNDpdEhMTFwJDw9/h5h3E3ZuqyAWiz8mYuTk
-        5KC9vR12ux39/f3o6OiAzWZDY2Mj6uvrOREmYLVaObH8/HxERkZeIjcpJPAEgVXgry0hIeEKs9/T0wOn
-        0wmHw4GhoSEMDg5yZGzFRUVFoAyQnJyM+Ph4UCZQq9XQaDSQyWT3goODW0noBXdGrMx/tri4uNm0tDS0
-        tbWhpqYGo6Oj6OvrQ2FhIcrLyyGRSDhS9iQyToQ5Wltbw2ZzuWaQlSW7fVShqI2IiNj3QD7UURAdHb3h
-        crnQ2dkJvV7PlWt6evoPApZDllwG1fFiKJVKsJJOTk5iYWEBKyvLMNY1ocrUjYraDpp7dCUsLCyRRJ7c
-        3AS+oaGh75OT31QqFZgbJjQxMYGlpUVMTV7GyVNV0JSeQf7rKohpRzF3LKfRkRHY2nthH7+GOxvA3C3A
-        1HsZsbGCXiKPcpeM29fP8Hi845THOitFU1MTuru7MDJsh766DRMzS1i8uQHHj4Cy8G0cTk/jgrZ91gpL
-        5xjmfgbmbwCOReDC90DKIeEKcR4j+G2Gwbaaf0hIyJsxMTGrZWVlOHvGBIu5GV988xOu/wpcuQkMk4D+
-        /DAOCGO5c/GpoRJ1A1fRPw8M/AB8Pgucc95FgujAMvGVEILvz5s58aPdoKRQb3xUUoLK2hZ8eRUYuQZ8
-        Rc+uOeCT7m/xPJ8/5u/v3yyTSm6fMPXhtBOou3QPhq/XUdl0Ec/xnh0krhOeAkyMiewJCgrKEYtTf9Fo
-        q2GeAVoo7+Yp4PQ48EGlFX5+e1tonI4ca+jEr71XPQC1ZQYVDRepfCmr3t7e9fT/NVaVrY4GOzC7Kfhj
-        bPKHlnHoeq+jtGsZFee/g0gkuuXl5XWWxmQS9vH5/LxDItGsVHLkbozgRZePj4+Z+ksJLxMe30qA9XEi
-        AoHgDar1+lvqKrx7yoiMw+I7vr6+jfTvJCGCwC6/PYSDhGLmilBE2E94ivDgofNQYyJ7qdZycmMNCAho
-        Jesm6tMSku8jYOPYng8g8NzPv786PERYJuxCe4nwKuEV9ztbtee1zd3E/7RqD37uk01ipWCWGdj7tta3
-        InnY9/9V4HexkCSfdcSZJAAAAABJRU5ErkJggg==
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABBBJREFUSEvtVHtM
+        m1UcnbKgGA2Je0BMgIAl0hETMCLFELqNAuNRyJg2NAUalg55aDQiq1Frhxu0hGARgY5ug7YUkA4z3pEg
+        S9CGx6CG8agokWwMJM3ipguM6UaOv/ul6FYRE/3Df3aTk+/77nfvOff8zr13x46H7b9WQCgU7szMzDwo
+        l8v3E5cXwePfcj5KEx9hyMvL2yuVShPS09OLU1JSxglIS0tDQkLCdEREhM7f3z+Ixj3mGr+9Hq3w8ezs
+        7HO5ubmrGRkZCwUFBY7ExMQNjUaDqqoq6PV6NDY2wmg0wmQyQavVIj4+3hkaGvoOMe8i7NxWQSwWf0zE
+        yMnJQXt7O2w2G/r7+9HR0QGr1YqmpiY0NDRwIkzAbDZzYvn5+QgPD79EbpJJ4EkCq8BfW1xc3BVmv6en
+        B3a7HWNjYxgaGsLg4CBHxlZcVFQEygBJSUmIjY0FZQKVSgW1Wg2ZTHYvMDCwlYRecGXEyvxni4mJmUtN
+        TUVbWxtqa2sxOjqKvr4+FBYWory8HBKJhCNlTyLjRJijtbU1bDaHYxZZWbLbR+XyurCwsH0P5EMdBZGR
+        kRsOhwOdnZ3Q6XRcuWZmZv4gYDlkZcqgPF4MhUIBVtKpqSksLi7C6VyBvt6CakM3Kuo6aO5RZ0hISDyJ
+        PLW5CbyDg4PfJye/KZVKMDdMaHJyEsvLS5ieuoyTp6qhLj2D/NeVENOOYu5YTqMjI7C298I2cQ13NoD5
+        W4Ch9zKiowW9RB7hKhm3r5/h8XjHKY91VgqLxYLu7i6MDNugq2nD5Owylm5uYOxHQFH4Ng6npXJBWz9r
+        halzHPM/Aws3gLEl4PPvgeRDQidxHiP4bIbBtppvUFDQm1FRUatlZWU4e8YAk7EZX3zzE67/Cly5CQyT
+        gO78MA4Io7lz8WlVJeoHrqJ/ARj4AbgwB5yz30Wc6MAK8ZUQAu/Pmznxod2goFBvfFRSgsq6Fnx5FRi5
+        BnxFz6554JPub/E8nz/u6+vbLJNKbp8w9OG0Hai/dA9VX6+j0nIRz/GeHSSuE+4CTIyJ7A4ICMgRi1N+
+        UWtqYJwFWijv5mng9ATwQaUZPj57Wmiclhyr6cSvvVczAJVpFhWNF6l8yauenp4N9P81VpWtjgY7MLso
+        +GNs8oemCWh7r6O0awUV57+DSCS65eHhcZbGZBD28fn8vEMi0ZxUcuRulOBFh5eXl5H6SwkvE57YSoD1
+        cSICgeANqvX6W6pqvHtKj/TD4jve3t5N9O8kIYzALr/dhIOEYuaKUETYT3ia8OChc1NjInuo1pnkxuzn
+        59dK1g3UpyEk3UfAxrE970fguZ5/f3W4ibBM2IX2EuFVwiuud7Zq92ubu4n/adVu/Nwnm8RKwSwzsPdt
+        rW9F8rDv/6vA73GLJJYzBpi4AAAAAElFTkSuQmCC
 </value>
   </data>
Index: branches/Abonament/BazaReklam/ClientsForm.cs
===================================================================
--- branches/Abonament/BazaReklam/ClientsForm.cs (revision 676)
+++ branches/Abonament/BazaReklam/ClientsForm.cs (revision 703)
@@ -1,3 +1,4 @@
 using System;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -9,4 +10,6 @@
 using Baza_Reklam.Classes.Helpers;
 using Baza_Reklam.Classes.Interfaces;
+using Baza_Reklam.Classes.Model;
+using Baza_Reklam.Classes.Repositories;
 
 namespace Baza_Reklam
@@ -158,4 +161,7 @@
                         gridKorekty.Refresh();
                         break;
+                    case "tabAbonamenty":
+                        RefreshSubscriptions();
+                        break;
                     case "klasyfikacjaTabPage":
                         rEKLAMADataSet.KL_KLIENCI.Clear();
@@ -197,4 +203,5 @@
             }
         }
+
 
         private void tabControl2_SelectedIndexChanged(object sender, EventArgs e)
@@ -245,4 +252,7 @@
                         vIEW_KOREKTYTableAdapter.FillByCustomerId(rEKLAMADataSet.VIEW_KOREKTY, customerId);
                         gridKorekty.Refresh();
+                        break;
+                    case "tabAbonamenty":
+                        RefreshSubscriptions();
                         break;
                     case "klasyfikacjaTabPage":
@@ -2434,4 +2444,33 @@
 
         #endregion
+
+        private void btnAddSubscription_Click(object sender, EventArgs e)
+        {
+            if (kLIENCIBindingSource.Current == null) return;
+
+            DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
+            REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row;
+
+            SubscriptionForm subscriptionForm = new SubscriptionForm(klient.CustomerID);
+            DialogResult dialog = subscriptionForm.ShowDialog();
+
+            if (dialog == DialogResult.OK)
+                RefreshSubscriptions();
+        }
+
+
+        private void RefreshSubscriptions()
+        {
+            if (kLIENCIBindingSource.Current == null) return;
+
+            DataRowView row = (DataRowView)kLIENCIBindingSource.Current;
+            REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow)row.Row;
+
+            CustomerRepository customerRepository = new CustomerRepository(ConnString.getConnString().Value);
+            List<Subscription> subscriptions = customerRepository.FindSubscriptions(klient.CustomerID);
+            gridSubscriptions.AutoGenerateColumns = false;
+            gridSubscriptions.DataSource = subscriptions;
+            
+        }
     }
 }
Index: branches/Abonament/BazaReklam/Subscription.resx
===================================================================
--- branches/Abonament/BazaReklam/Subscription.resx (revision 702)
+++  (revision )
@@ -1,120 +1,0 @@
-<?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/Subscription.Designer.cs
===================================================================
--- branches/Abonament/BazaReklam/Subscription.Designer.cs (revision 702)
+++  (revision )
@@ -1,177 +1,0 @@
-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)
+++  (revision )
@@ -1,32 +1,0 @@
-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;
-        }
-    }
-}
