Index: /branches/Emisje/BazaReklam/OrderDetails.cs
===================================================================
--- /branches/Emisje/BazaReklam/OrderDetails.cs (revision 781)
+++ /branches/Emisje/BazaReklam/OrderDetails.cs (revision 783)
@@ -133,10 +133,4 @@
             _titles = titleRepository.FindAllActive();
 
-            //NavigationColumnRepository navigationColumnRepository = new NavigationColumnRepository(ConnString.getConnString().Value);
-            //_dzialy = navigationColumnRepository.FindAll();
-
-            //NavigationSubColumnRepository navigationSubColumnRepository = new NavigationSubColumnRepository(ConnString.getConnString().Value);
-            //_rozdzialy = navigationSubColumnRepository.FindAll();
-
             AdLocationRepository adPlacementRepository = new AdLocationRepository(ConnString.getConnString().Value);
             ComboBoxHelper.Bind(adPlacementRepository.FindAll(), cbLocation);
@@ -199,4 +193,5 @@
             anulujToolStripMenuItem.Click += AnulujEmisje;
             zmienToolStripMenuItem.Click += ZmienEmisje;
+            editMenuItem.Click += EdytujEmisje;
 
             walutyComboBox.SelectedIndex = 0;
@@ -1221,13 +1216,5 @@
                     rEKLAMADataSet.UKAZE_SIE_W_NR.Copy();
 
-                int? dzial = null;
-                if (SelectedNavigationColumn != null)
-                    dzial = SelectedNavigationColumn.Id;
-
-                int? rozdzial = null;
-                if (SelectedNavigationColumn != null)
-                    rozdzial = SelectedNavigationSubColumn.Id;
-
-                KalendarzEmisji kalendarz = new KalendarzEmisji(Reklama, table, dzial, rozdzial, ((AdLocation)cbLocation.SelectedItem).Id, zATWIERDZONO_DO_DRUKUCheckBox.Checked);
+                KalendarzEmisji kalendarz = new KalendarzEmisji(Reklama, table, SelectedNavigationColumn, SelectedNavigationSubColumn, (AdLocation)cbLocation.SelectedItem, zATWIERDZONO_DO_DRUKUCheckBox.Checked);
 
                 if (kalendarz.ShowDialog() == DialogResult.OK)
@@ -1291,4 +1278,5 @@
                         usunToolStripMenuItem.Visible = false;
                         anulujToolStripMenuItem.Visible = false;
+                        editMenuItem.Visible = false;
 
                         e.ContextMenuStrip = emisjeContextMenuStrip;
@@ -1304,4 +1292,5 @@
                         usunToolStripMenuItem.Visible = false;
                         anulujToolStripMenuItem.Visible = emisjaRow.status == 0;
+                        editMenuItem.Visible = emisjaRow.status == 0;
 
                         e.ContextMenuStrip = emisjeContextMenuStrip;
@@ -1316,4 +1305,5 @@
                 usunToolStripMenuItem.Visible = true;
                 anulujToolStripMenuItem.Visible = false;
+                editMenuItem.Visible = false;
 
                 foreach (DataGridViewRow r in ukazeSieDataGridView.SelectedRows)
@@ -1397,4 +1387,30 @@
                     ReklamaHelper.AddUpdateIssueChange((double)emisja.ID, staraEmisja, kalendarz.NowaEmisja.Value);
             }
+        }
+
+        private void EdytujEmisje(object sender, EventArgs e)
+        {
+            EditAdIssue editAdIssue = new EditAdIssue();
+            DialogResult dialogResult = editAdIssue.ShowDialog();
+            if(dialogResult == DialogResult.OK)
+            {
+                REKLAMADataSet.UKAZE_SIE_W_NRRow issue = (REKLAMADataSet.UKAZE_SIE_W_NRRow)((DataRowView)rEKLAMAUKAZESIEWNRBindingSource.Current).Row;
+                
+                issue.Lokalizacja = editAdIssue.Lokalizacja.Text;
+                issue.LokalizacjaId = editAdIssue.Lokalizacja.Id;
+                if (editAdIssue.Dzial!=null)
+                {
+                    issue.DzialId = editAdIssue.Dzial.Id;
+                    issue.Dzial = editAdIssue.Dzial.Name;                    
+                }
+
+                if (editAdIssue.Rozdzial != null)
+                {
+                    issue.RozdzialId = editAdIssue.Rozdzial.Id;
+                    issue.Rozdzial = editAdIssue.Rozdzial.Name;                    
+                }
+
+            }
+
         }
 
Index: /branches/Emisje/BazaReklam/EditAdIssue.cs
===================================================================
--- /branches/Emisje/BazaReklam/EditAdIssue.cs (revision 783)
+++ /branches/Emisje/BazaReklam/EditAdIssue.cs (revision 783)
@@ -0,0 +1,77 @@
+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.Helpers;
+using Baza_Reklam.Classes.Model;
+using Baza_Reklam.Classes.Repositories;
+
+namespace Baza_Reklam
+{
+    public partial class EditAdIssue : Form
+    {
+        public AdLocation Lokalizacja
+        {
+            get
+            {
+                if (cbAdLocation.SelectedItem != null)
+                    return (AdLocation)cbAdLocation.SelectedItem;
+                return null;
+            }
+        }
+
+        public NavigationColumn Dzial
+        {
+            get
+            {
+                if (cbNavigationColumn.SelectedItem != null)
+                    return (NavigationColumn)cbNavigationColumn.SelectedItem;
+                return null;
+            }
+        }
+
+
+        public NavigationSubColumn Rozdzial
+        {
+            get
+            {
+                if (cbNavigationSubColumn.SelectedItem != null)
+                    return (NavigationSubColumn)cbNavigationSubColumn.SelectedItem;
+                return null;
+            }
+        }
+
+        public EditAdIssue()
+        {
+            InitializeComponent();
+
+            AdLocationRepository adPlacementRepository = new AdLocationRepository(ConnString.getConnString().Value);
+            ComboBoxHelper.Bind(adPlacementRepository.FindAll(), cbAdLocation);
+            cbAdLocation.DisplayMember = "Text";
+            cbAdLocation.ValueMember = "Id";
+            cbAdLocation.SelectedIndex = 0;
+
+            NavigationColumnRepository navigationColumnRepository = new NavigationColumnRepository(ConnString.getConnString().Value);
+            ComboBoxHelper.Bind(navigationColumnRepository.FindAll(), cbNavigationColumn);
+            cbNavigationColumn.DisplayMember = "Name";
+            cbNavigationColumn.ValueMember = "Id";
+            cbNavigationColumn.SelectedIndex = 0;
+
+
+            NavigationSubColumnRepository navigationSubColumnRepository = new NavigationSubColumnRepository(ConnString.getConnString().Value);
+            ComboBoxHelper.Bind(navigationSubColumnRepository.FindAll(), cbNavigationSubColumn);
+            cbNavigationSubColumn.DisplayMember = "Name";
+            cbNavigationSubColumn.ValueMember = "Id";
+            cbNavigationSubColumn.SelectedIndex = 0;
+
+        }
+
+        private void EditAdIssue_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}
Index: /branches/Emisje/BazaReklam/Baza Reklam.csproj
===================================================================
--- /branches/Emisje/BazaReklam/Baza Reklam.csproj (revision 778)
+++ /branches/Emisje/BazaReklam/Baza Reklam.csproj (revision 783)
@@ -185,4 +185,10 @@
       <DependentUpon>AgentAddForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="EditAdIssue.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="EditAdIssue.Designer.cs">
+      <DependentUpon>EditAdIssue.cs</DependentUpon>
+    </Compile>
     <Compile Include="FakturowaniePoznanKatowice.cs">
       <SubType>Form</SubType>
@@ -586,4 +592,8 @@
       <SubType>Designer</SubType>
       <DependentUpon>CenaEmisji.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="EditAdIssue.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>EditAdIssue.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="FakturowaniePoznanKatowice.resx">
Index: /branches/Emisje/BazaReklam/EditAdIssue.resx
===================================================================
--- /branches/Emisje/BazaReklam/EditAdIssue.resx (revision 783)
+++ /branches/Emisje/BazaReklam/EditAdIssue.resx (revision 783)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /branches/Emisje/BazaReklam/OrderDetails.Designer.cs
===================================================================
--- /branches/Emisje/BazaReklam/OrderDetails.Designer.cs (revision 781)
+++ /branches/Emisje/BazaReklam/OrderDetails.Designer.cs (revision 783)
@@ -70,10 +70,10 @@
             System.Windows.Forms.Label label14;
             System.Windows.Forms.Label label15;
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dzialColumnCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle rozdzialColumnCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle lokalizacjaColumnCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OrderDetails));
             this.rEKLAMADataSet = new Baza_Reklam.REKLAMADataSet();
@@ -112,8 +112,8 @@
             this.zafakturowana = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.netto = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ReklamaIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DzialColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.RozdzialColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.LokalizacjaColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ReklamaId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Dzial = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Rozdzial = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Lokalizacja = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.rEKLAMAUKAZESIEWNRBindingSource = new System.Windows.Forms.BindingSource(this.components);
             this.uKAZE_SIE_W_NRTableAdapter = new Baza_Reklam.REKLAMADataSetTableAdapters.UKAZE_SIE_W_NRTableAdapter();
@@ -194,4 +194,5 @@
             this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
             this.btnSaveClose = new System.Windows.Forms.Button();
+            this.editMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             sYMBOL_AKWIZYTORALabel = new System.Windows.Forms.Label();
             tYTULLabel = new System.Windows.Forms.Label();
@@ -933,12 +934,12 @@
             this.ukazeSieDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
             this.ukazeSieDataGridView.BackgroundColor = System.Drawing.Color.White;
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.ukazeSieDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.ukazeSieDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.ukazeSieDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ukazeSieDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -946,8 +947,8 @@
             this.zafakturowana,
             this.netto,
-            this.ReklamaIdColumn,
-            this.DzialColumn,
-            this.RozdzialColumn,
-            this.LokalizacjaColumn});
+            this.ReklamaId,
+            this.Dzial,
+            this.Rozdzial,
+            this.Lokalizacja});
             this.ukazeSieDataGridView.DataSource = this.rEKLAMAUKAZESIEWNRBindingSource;
             this.ukazeSieDataGridView.Location = new System.Drawing.Point(435, 9);
@@ -969,6 +970,6 @@
             this.nrWydaniaDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.nrWydaniaDataGridViewTextBoxColumn.DataPropertyName = "Nr Wydania";
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.nrWydaniaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.nrWydaniaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2;
             this.nrWydaniaDataGridViewTextBoxColumn.FillWeight = 149.2386F;
             this.nrWydaniaDataGridViewTextBoxColumn.HeaderText = "Nr wyd.";
@@ -992,7 +993,7 @@
             this.netto.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.netto.DataPropertyName = "netto";
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle6.Format = "C";
-            this.netto.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle3.Format = "C";
+            this.netto.DefaultCellStyle = dataGridViewCellStyle3;
             this.netto.HeaderText = "Wartoæ";
             this.netto.Name = "netto";
@@ -1002,49 +1003,43 @@
             // ReklamaId
             // 
-            this.ReklamaIdColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.ReklamaIdColumn.DataPropertyName = "ReklamaId";
-            this.ReklamaIdColumn.HeaderText = "ReklamaId";
-            this.ReklamaIdColumn.Name = "ReklamaId";
-            this.ReklamaIdColumn.ReadOnly = true;
-            this.ReklamaIdColumn.Visible = false;
-            // 
-            // DzialColumn
-            // 
-            dzialColumnCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dzialColumnCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.DzialColumn.DefaultCellStyle = dzialColumnCellStyle;
-            this.DzialColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.DzialColumn.DataPropertyName = "Dzial";
-            this.DzialColumn.HeaderText = "Dzia³";
-            this.DzialColumn.Name = "Dzial";
-            this.DzialColumn.ReadOnly = true;
-            this.DzialColumn.Visible = true;
-            this.DzialColumn.Width = 100;
-            // 
-            // RozdzialColumn
-            // 
-            rozdzialColumnCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            rozdzialColumnCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.RozdzialColumn.DefaultCellStyle = rozdzialColumnCellStyle;
-            this.RozdzialColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.RozdzialColumn.DataPropertyName = "Rozdzial";
-            this.RozdzialColumn.HeaderText = "Rozdzia³";
-            this.RozdzialColumn.Name = "Rozdzial";
-            this.RozdzialColumn.ReadOnly = true;
-            this.RozdzialColumn.Visible = true;
-            this.RozdzialColumn.Width = 100;
-            // 
-            // LokalizacjaColumn
-            // 
-            lokalizacjaColumnCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            lokalizacjaColumnCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.LokalizacjaColumn.DefaultCellStyle = lokalizacjaColumnCellStyle;
-            this.LokalizacjaColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.LokalizacjaColumn.DataPropertyName = "Lokalizacja";
-            this.LokalizacjaColumn.HeaderText = "Lokalizacja";
-            this.LokalizacjaColumn.Name = "Lokalizacja";
-            this.LokalizacjaColumn.ReadOnly = true;
-            this.LokalizacjaColumn.Visible = true;
-            this.LokalizacjaColumn.Width = 100;
+            this.ReklamaId.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ReklamaId.DataPropertyName = "ReklamaId";
+            this.ReklamaId.HeaderText = "ReklamaId";
+            this.ReklamaId.Name = "ReklamaId";
+            this.ReklamaId.ReadOnly = true;
+            this.ReklamaId.Visible = false;
+            // 
+            // Dzial
+            // 
+            this.Dzial.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Dzial.DataPropertyName = "Dzial";
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.Dzial.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Dzial.HeaderText = "Dzia³";
+            this.Dzial.Name = "Dzial";
+            this.Dzial.ReadOnly = true;
+            // 
+            // Rozdzial
+            // 
+            this.Rozdzial.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Rozdzial.DataPropertyName = "Rozdzial";
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.Rozdzial.DefaultCellStyle = dataGridViewCellStyle5;
+            this.Rozdzial.HeaderText = "Rozdzia³";
+            this.Rozdzial.Name = "Rozdzial";
+            this.Rozdzial.ReadOnly = true;
+            // 
+            // Lokalizacja
+            // 
+            this.Lokalizacja.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Lokalizacja.DataPropertyName = "Lokalizacja";
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.Lokalizacja.DefaultCellStyle = dataGridViewCellStyle6;
+            this.Lokalizacja.HeaderText = "Lokalizacja";
+            this.Lokalizacja.Name = "Lokalizacja";
+            this.Lokalizacja.ReadOnly = true;
             // 
             // rEKLAMAUKAZESIEWNRBindingSource
@@ -1809,12 +1804,13 @@
             this.zmienToolStripMenuItem,
             this.usunToolStripMenuItem,
-            this.anulujToolStripMenuItem});
+            this.anulujToolStripMenuItem,
+            this.editMenuItem});
             this.emisjeContextMenuStrip.Name = "emisjeContextMenuStrip";
-            this.emisjeContextMenuStrip.Size = new System.Drawing.Size(116, 70);
+            this.emisjeContextMenuStrip.Size = new System.Drawing.Size(153, 114);
             // 
             // zmienToolStripMenuItem
             // 
             this.zmienToolStripMenuItem.Name = "zmienToolStripMenuItem";
-            this.zmienToolStripMenuItem.Size = new System.Drawing.Size(115, 22);
+            this.zmienToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
             this.zmienToolStripMenuItem.Text = "Zmieñ";
             // 
@@ -1822,5 +1818,5 @@
             // 
             this.usunToolStripMenuItem.Name = "usunToolStripMenuItem";
-            this.usunToolStripMenuItem.Size = new System.Drawing.Size(115, 22);
+            this.usunToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
             this.usunToolStripMenuItem.Text = "Usuñ";
             // 
@@ -1828,5 +1824,5 @@
             // 
             this.anulujToolStripMenuItem.Name = "anulujToolStripMenuItem";
-            this.anulujToolStripMenuItem.Size = new System.Drawing.Size(115, 22);
+            this.anulujToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
             this.anulujToolStripMenuItem.Text = "Anuluj";
             // 
@@ -1868,4 +1864,10 @@
             this.btnSaveClose.UseVisualStyleBackColor = true;
             this.btnSaveClose.Click += new System.EventHandler(this.btnSaveClose_Click);
+            // 
+            // editMenuItem
+            // 
+            this.editMenuItem.Name = "editMenuItem";
+            this.editMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.editMenuItem.Text = "Edytuj";
             // 
             // OrderDetails
@@ -2062,4 +2064,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataDataGridViewTextBoxColumn;
         private System.Windows.Forms.DataGridViewTextBoxColumn reklamaInfoDodDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ReklamaId;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Dzial;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Rozdzial;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Lokalizacja;
+        private System.Windows.Forms.ToolStripMenuItem editMenuItem;
 
 
Index: /branches/Emisje/BazaReklam/KalendarzEmisji.cs
===================================================================
--- /branches/Emisje/BazaReklam/KalendarzEmisji.cs (revision 777)
+++ /branches/Emisje/BazaReklam/KalendarzEmisji.cs (revision 783)
@@ -4,4 +4,5 @@
 using System.Drawing;
 using System.Windows.Forms;
+using Baza_Reklam.Classes.Model;
 
 namespace Baza_Reklam
@@ -16,8 +17,9 @@
         string _tytul;
 
-        int? _dzial;
-        int? _rozdzial;
-        int _lokalizacja;
+        NavigationColumn _dzial;
+        NavigationSubColumn _rozdzial;
         bool _doDruku;
+
+        private AdLocation _adLocation;
 
 
@@ -40,9 +42,9 @@
 
 
-        public KalendarzEmisji(REKLAMADataSet.REKLAMARow reklama, REKLAMADataSet.UKAZE_SIE_W_NRDataTable emisje, int? dzial, int? rozdzial, int lokalizacja, bool doDruku)
+        public KalendarzEmisji(REKLAMADataSet.REKLAMARow reklama, REKLAMADataSet.UKAZE_SIE_W_NRDataTable emisje, NavigationColumn dzial, NavigationSubColumn rozdzial, AdLocation adLocation, bool doDruku)
         {
             _dzial = dzial;
             _rozdzial = rozdzial;
-            _lokalizacja = lokalizacja;
+            _adLocation = adLocation;
             _doDruku = doDruku;
 
@@ -114,9 +116,17 @@
                         em.dataDodania = DateTime.Today;
                         em.Nr_Wydania = Convert.ToInt16(row.Cells[0].Value);
-                        em.LokalizacjaId = _lokalizacja;
-                        if (_dzial.HasValue)
-                            em.DzialId = _dzial.Value;
-                        if (_rozdzial.HasValue)
-                            em.RozdzialId = _rozdzial.Value;
+                        em.LokalizacjaId = _adLocation.Id;
+                        em.Lokalizacja = _adLocation.Text;
+                        if (_dzial != null)
+                        {
+                            em.DzialId = _dzial.Id;
+                            em.Dzial = _dzial.Name;
+                        }
+                        if (_rozdzial != null)
+                        {
+                            em.RozdzialId = _rozdzial.Id;
+                            em.Rozdzial = _rozdzial.Name;
+                        }
+                            
                         em.DoDruku = _doDruku;
 
Index: /branches/Emisje/BazaReklam/Properties/Resources.Designer.cs
===================================================================
--- /branches/Emisje/BazaReklam/Properties/Resources.Designer.cs (revision 732)
+++ /branches/Emisje/BazaReklam/Properties/Resources.Designer.cs (revision 783)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -78,5 +78,5 @@
         ///   Looks up a localized string similar to &lt;test&gt;
         ///	&lt;jezyk id=&quot;ang&quot;&gt;
-        ///    &lt;numeryWydan&gt;Numbers of the issues &lt;/numeryWydan&gt;
+        ///    &lt;numeryWydan&gt;Issues numbers &lt;/numeryWydan&gt;
         ///    &lt;fakturaZaReklamyZgodnieZzamowieniem&gt;Invoice for ads according to order &lt;/fakturaZaReklamyZgodnieZzamowieniem&gt;
         ///    &lt;fakturaKorygującaVATnr&gt;Correction invoice number&lt;/fakturaKorygującaVATnr&gt;
@@ -85,5 +85,5 @@
         ///    &lt;przedKorekta&gt;Before correction&lt;/przedKorekta&gt;
         ///    &lt;poKorekcie&gt;After correction&lt;/poKorekcie&gt;
-        ///    &lt;kwotaZwiekszenia&gt;Increasing amount after [rest of string was truncated]&quot;;.
+        ///    &lt;kwotaZwiekszenia&gt;Increasing amount after tax&lt;/k [rest of string was truncated]&quot;;.
         /// </summary>
         internal static string faktura {
Index: /branches/Emisje/BazaReklam/OrderDetails.resx
===================================================================
--- /branches/Emisje/BazaReklam/OrderDetails.resx (revision 776)
+++ /branches/Emisje/BazaReklam/OrderDetails.resx (revision 783)
@@ -253,7 +253,4 @@
     <value>17, 54</value>
   </metadata>
-  <metadata name="lISTATYPOWREKLAMYBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 54</value>
-  </metadata>
   <metadata name="lISTA_TYPOW_REKLAMYTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 91</value>
@@ -270,7 +267,4 @@
   <metadata name="uKAZE_SIE_W_NRTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>443, 91</value>
-  </metadata>
-  <metadata name="aGENCIBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>1113, 91</value>
   </metadata>
   <metadata name="aGENCIBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -345,10 +339,4 @@
     <value>True</value>
   </metadata>
-  <metadata name="NR_WYDANIA.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="rEKLAMAReklamaInfoDodBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>863, 91</value>
-  </metadata>
   <metadata name="rEKLAMAReklamaInfoDodBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>863, 91</value>
Index: /branches/Emisje/BazaReklam/EditAdIssue.Designer.cs
===================================================================
--- /branches/Emisje/BazaReklam/EditAdIssue.Designer.cs (revision 783)
+++ /branches/Emisje/BazaReklam/EditAdIssue.Designer.cs (revision 783)
@@ -0,0 +1,94 @@
+namespace Baza_Reklam
+{
+    partial class EditAdIssue
+    {
+        /// <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.button1 = new System.Windows.Forms.Button();
+            this.cbNavigationColumn = new System.Windows.Forms.ComboBox();
+            this.cbNavigationSubColumn = new System.Windows.Forms.ComboBox();
+            this.cbAdLocation = new System.Windows.Forms.ComboBox();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.button1.Location = new System.Drawing.Point(205, 238);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "OK";
+            this.button1.UseVisualStyleBackColor = true;
+            // 
+            // cbNavigationColumn
+            // 
+            this.cbNavigationColumn.FormattingEnabled = true;
+            this.cbNavigationColumn.Location = new System.Drawing.Point(79, 12);
+            this.cbNavigationColumn.Name = "cbNavigationColumn";
+            this.cbNavigationColumn.Size = new System.Drawing.Size(121, 21);
+            this.cbNavigationColumn.TabIndex = 1;
+            // 
+            // cbNavigationSubColumn
+            // 
+            this.cbNavigationSubColumn.FormattingEnabled = true;
+            this.cbNavigationSubColumn.Location = new System.Drawing.Point(79, 54);
+            this.cbNavigationSubColumn.Name = "cbNavigationSubColumn";
+            this.cbNavigationSubColumn.Size = new System.Drawing.Size(121, 21);
+            this.cbNavigationSubColumn.TabIndex = 2;
+            // 
+            // cbAdLocation
+            // 
+            this.cbAdLocation.FormattingEnabled = true;
+            this.cbAdLocation.Location = new System.Drawing.Point(79, 101);
+            this.cbAdLocation.Name = "cbAdLocation";
+            this.cbAdLocation.Size = new System.Drawing.Size(121, 21);
+            this.cbAdLocation.TabIndex = 3;
+            // 
+            // EditAdIssue
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(292, 273);
+            this.Controls.Add(this.cbAdLocation);
+            this.Controls.Add(this.cbNavigationSubColumn);
+            this.Controls.Add(this.cbNavigationColumn);
+            this.Controls.Add(this.button1);
+            this.Name = "EditAdIssue";
+            this.Text = "EditAdIssue";
+            this.Load += new System.EventHandler(this.EditAdIssue_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.ComboBox cbNavigationColumn;
+        private System.Windows.Forms.ComboBox cbNavigationSubColumn;
+        private System.Windows.Forms.ComboBox cbAdLocation;
+    }
+}
