Index: trunk/BazaReklam/app.config
===================================================================
--- trunk/BazaReklam/app.config (revision 654)
+++ trunk/BazaReklam/app.config (revision 659)
@@ -8,7 +8,7 @@
   <connectionStrings>
     <clear />
+    <add name="BAZA_REKLAM_TEST" connectionString="Data Source=10.0.0.72;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" />
-    <add name="BAZA_REKLAM_LOCAL" connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM;Persist Security Info=True"
       providerName="System.Data.SqlClient" />
   </connectionStrings>
Index: trunk/BazaReklam/ProductionForm.cs
===================================================================
--- trunk/BazaReklam/ProductionForm.cs (revision 651)
+++ trunk/BazaReklam/ProductionForm.cs (revision 659)
@@ -139,4 +139,15 @@
 
                 DataRowView row = (DataRowView)pRODUKCJABindingSource.Current;
+
+                REKLAMADataSet.PRODUKCJADataTable t = pRODUKCJATableAdapter.GetDataById(Convert.ToInt32(row["ID"]));
+
+                if (!t[0].IsDATA_PRODUKCJANull())
+                {
+                    MessageBox.Show("Zlecenie jest ju¿ przekazane do DTP.\nWidok zostanie odwie¿ony.", "Baza Reklam - Produkcja", MessageBoxButtons.OK);
+                    wlaczSortowanieGrida();
+                    RefreshGrid();
+                    return;
+                }
+
                 row["PRODUKCJA"] = User.Instance().Login;
                 row["DATA_PRODUKCJA"] = DateTime.Now;
@@ -164,5 +175,5 @@
                 {
                     if (
-                        MessageBox.Show("Zlecenie jest ju¿ w DTP. Czy chcesz je przej¹æ?", "", MessageBoxButtons.YesNo) ==
+                        MessageBox.Show("Zlecenie jest ju¿ w DTP. Czy chcesz je przej¹æ?", "Baza Reklam - Produkcja", MessageBoxButtons.YesNo) ==
                         DialogResult.No)
                     {
@@ -354,4 +365,9 @@
 
         private void dzisiajToolStripButton_Click(object sender, EventArgs e)
+        {
+            RefreshGrid();
+        }
+
+        private void RefreshGrid()
         {
             Cursor = Cursors.WaitCursor;
