Index: trunk/BazaReklam/ZamowieniaForm.cs
===================================================================
--- trunk/BazaReklam/ZamowieniaForm.cs (revision 262)
+++ trunk/BazaReklam/ZamowieniaForm.cs (revision 266)
@@ -1206,45 +1206,38 @@
         private void usunFaktureButton_Click(object sender, EventArgs e)
         {
-            if (fAKTURYBindingSource.Current != null)
-            {
-                if (
-                    MessageBox.Show("Czy na pewno chcesz usun¹æ fakturê ?",
-                    "",
-                    MessageBoxButtons.OKCancel,
-                    MessageBoxIcon.Question)
-                    == DialogResult.OK)
-                {
-                    Cursor = Cursors.WaitCursor;
-
-                    REKLAMADataSet.FAKTURYRow faktura = (REKLAMADataSet.FAKTURYRow)
-                        ((DataRowView)fAKTURYBindingSource.Current).Row;
-
-                    if (faktura.KOREKTA)
-                    {
-                        int i = fAKTURYBindingSource.Find("idFakturyKorekta",faktura.ID_FAKTURY);
-                        if (i > -1)
-                        {
-                            MessageBox.Show("Nie mo¿na usun¹æ faktury");
-                        }
-                        else
-                        {
-                            usunKorekte(faktura);
-                        }
-                    }
-                    else
-                    {
-                        if (!faktura.IsID_FK_KORNull())
-                        {
-                            MessageBox.Show("Istnieje korekta. Nie mo¿na usun¹æ faktury");
-                        }
-                        else
-                        {
-                            usunFakture(faktura);
-                        }
-                    }
-
-                    Cursor = Cursors.Default;
-                }
-            }
+            if (fAKTURYBindingSource.Current == null) return;
+            DialogResult dialog = MessageBox.Show("Czy na pewno chcesz usun¹æ fakturê?",
+                                                  "Faktura - usuwanie",
+                                                  MessageBoxButtons.OKCancel,
+                                                  MessageBoxIcon.Question);
+
+            if (dialog != DialogResult.OK) return;
+
+
+            Cursor = Cursors.WaitCursor;
+
+            REKLAMADataSet.FAKTURYRow faktura = (REKLAMADataSet.FAKTURYRow)((DataRowView)fAKTURYBindingSource.Current).Row;
+
+            //jezeli jest korekta do tej faktury to nie mozna jej usunac
+            if (!faktura.KOREKTA && !faktura.IsID_FK_KORNull())
+            {
+                MessageBox.Show("Istnieje korekta. Nie mo¿na usun¹æ faktury");
+                return;
+            }
+
+
+            //jezeli jest korekta do tej korekty to nie mozna jej usunac
+            if (faktura.KOREKTA && fAKTURYBindingSource.Find("idFakturyKorekta", faktura.ID_FAKTURY) > -1)
+            {
+                MessageBox.Show("Nie mo¿na usun¹æ faktury");
+                return;
+            }
+
+            if (faktura.KOREKTA)
+                usunKorekte(faktura);
+            else
+                usunFakture(faktura);
+
+            Cursor = Cursors.Default;
         }
 
@@ -1298,5 +1291,5 @@
             {
                 transaction.Rollback();
-                throw ex;
+                throw;
             }
             finally
Index: trunk/BazaReklam/About.Designer.cs
===================================================================
--- trunk/BazaReklam/About.Designer.cs (revision 176)
+++ trunk/BazaReklam/About.Designer.cs (revision 266)
@@ -35,11 +35,16 @@
             this.lblVersionInfo = new System.Windows.Forms.LinkLabel();
             this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.linkLabel1 = new System.Windows.Forms.LinkLabel();
+            this.lblDB = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // btnClose
             // 
-            this.btnClose.Location = new System.Drawing.Point(107, 108);
+            this.btnClose.Location = new System.Drawing.Point(123, 135);
+            this.btnClose.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(80, 30);
+            this.btnClose.Size = new System.Drawing.Size(60, 24);
             this.btnClose.TabIndex = 0;
             this.btnClose.Text = "OK";
@@ -50,7 +55,8 @@
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(12, 42);
+            this.label1.Location = new System.Drawing.Point(9, 34);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(66, 17);
+            this.label1.Size = new System.Drawing.Size(50, 13);
             this.label1.TabIndex = 1;
             this.label1.Text = "Nr wersji:";
@@ -59,7 +65,8 @@
             // 
             this.lblVersion.AutoSize = true;
-            this.lblVersion.Location = new System.Drawing.Point(164, 42);
+            this.lblVersion.Location = new System.Drawing.Point(123, 34);
+            this.lblVersion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblVersion.Name = "lblVersion";
-            this.lblVersion.Size = new System.Drawing.Size(105, 17);
+            this.lblVersion.Size = new System.Drawing.Size(79, 13);
             this.lblVersion.TabIndex = 2;
             this.lblVersion.Text = "ProductVersion";
@@ -68,7 +75,8 @@
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(12, 70);
+            this.label2.Location = new System.Drawing.Point(9, 58);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(150, 17);
+            this.label2.Size = new System.Drawing.Size(114, 13);
             this.label2.TabIndex = 3;
             this.label2.Text = "Wprowadzone zmiany:";
@@ -78,7 +86,8 @@
             this.lblVersionInfo.AutoSize = true;
             this.lblVersionInfo.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline;
-            this.lblVersionInfo.Location = new System.Drawing.Point(164, 70);
+            this.lblVersionInfo.Location = new System.Drawing.Point(123, 58);
+            this.lblVersionInfo.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblVersionInfo.Name = "lblVersionInfo";
-            this.lblVersionInfo.Size = new System.Drawing.Size(54, 17);
+            this.lblVersionInfo.Size = new System.Drawing.Size(41, 13);
             this.lblVersionInfo.TabIndex = 5;
             this.lblVersionInfo.TabStop = true;
@@ -90,15 +99,65 @@
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(85, 9);
+            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+            this.label3.Location = new System.Drawing.Point(107, 7);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(124, 17);
+            this.label3.Size = new System.Drawing.Size(113, 13);
             this.label3.TabIndex = 6;
             this.label3.Text = "Informacje o wersji";
             // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(9, 82);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(56, 13);
+            this.label4.TabIndex = 7;
+            this.label4.Text = "Instrukcja:";
+            // 
+            // linkLabel1
+            // 
+            this.linkLabel1.AutoSize = true;
+            this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline;
+            this.linkLabel1.Location = new System.Drawing.Point(123, 82);
+            this.linkLabel1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.linkLabel1.Name = "linkLabel1";
+            this.linkLabel1.Size = new System.Drawing.Size(53, 13);
+            this.linkLabel1.TabIndex = 8;
+            this.linkLabel1.TabStop = true;
+            this.linkLabel1.Text = "Instrukcja";
+            this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Blue;
+            this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
+            // 
+            // lblDB
+            // 
+            this.lblDB.AutoSize = true;
+            this.lblDB.Location = new System.Drawing.Point(123, 106);
+            this.lblDB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblDB.Name = "lblDB";
+            this.lblDB.Size = new System.Drawing.Size(183, 13);
+            this.lblDB.TabIndex = 9;
+            this.lblDB.Text = "sql.ct.com.pl/BAZA_REKLAM_TEST";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(9, 106);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(72, 13);
+            this.label5.TabIndex = 10;
+            this.label5.Text = "Baza danych:";
+            // 
             // About
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(294, 161);
+            this.ClientSize = new System.Drawing.Size(308, 170);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.lblDB);
+            this.Controls.Add(this.linkLabel1);
+            this.Controls.Add(this.label4);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.lblVersionInfo);
@@ -108,4 +167,5 @@
             this.Controls.Add(this.btnClose);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
@@ -127,4 +187,8 @@
         private System.Windows.Forms.LinkLabel lblVersionInfo;
         private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.LinkLabel linkLabel1;
+        private System.Windows.Forms.Label lblDB;
+        private System.Windows.Forms.Label label5;
 
     }
Index: trunk/BazaReklam/About.cs
===================================================================
--- trunk/BazaReklam/About.cs (revision 197)
+++ trunk/BazaReklam/About.cs (revision 266)
@@ -1,3 +1,4 @@
 using System;
+using System.Data.SqlClient;
 using System.Windows.Forms;
 
@@ -13,4 +14,9 @@
 
             lblVersion.Text = Application.ProductVersion;
+
+            SqlConnection sqlConnection = new SqlConnection(ConnString.getConnString().Value);
+
+            lblDB.Text = sqlConnection.DataSource + "/" + sqlConnection.Database;
+            sqlConnection.Dispose();
         }
 
@@ -23,9 +29,18 @@
         {
             string url = string.IsNullOrEmpty(ConfigurationManager.AppSettings["Application.Version.Url"])
-                             ? "http://www.infocity.pl/baza_reklam/versioninfo.html#{0}"
-                             : ConfigurationManager.AppSettings["Application.Version.Url"];
+                                 ? "http://www.infocity.pl/baza_reklam/versioninfo.html#{0}"
+                                 : ConfigurationManager.AppSettings["Application.Version.Url"];
 
             System.Diagnostics.Process.Start(string.Format(url, Application.ProductVersion));
         }
+
+        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            string url = string.IsNullOrEmpty(ConfigurationManager.AppSettings["Application.Instruction.Url"])
+                                 ? "http://www.infocity.pl/baza_reklam/instrukcja.htm"
+                                 : ConfigurationManager.AppSettings["Application.Instruction.Url"];
+
+            System.Diagnostics.Process.Start(url);
+        }
     }
 }
Index: trunk/BazaReklam/app.config
===================================================================
--- trunk/BazaReklam/app.config (revision 226)
+++ trunk/BazaReklam/app.config (revision 266)
@@ -8,7 +8,4 @@
   <connectionStrings>
     <clear />
-    <add name="BAZA_REKLAM_TEST"
-         connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True"
-         providerName="System.Data.SqlClient" />
     <add name="BAZA_REKLAM_LOCAL"
          connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM;Persist Security Info=True"
@@ -16,4 +13,7 @@
     <add name="BAZA_REKLAM" 
          connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM;Persist Security Info=True"
+         providerName="System.Data.SqlClient" />
+    <add name="BAZA_REKLAM_TEST"
+         connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True"
          providerName="System.Data.SqlClient" />
   </connectionStrings>
@@ -39,4 +39,5 @@
   <appSettings>
     <add key="Application.Version.Url" value="http://www.infocity.pl/baza_reklam/versioninfo.html#{0}" />
+    <add key="Application.Instruction.Url" value="http://www.infocity.pl/baza_reklam/instrukcja.htm" />
   </appSettings>
 </configuration>
