Index: trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
===================================================================
--- trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs (revision 871)
+++ trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs (revision 872)
@@ -25,5 +25,4 @@
         private readonly IRepository<PlatnosciEcard> _repPl;
         private FunkcjePlatnosci _func;
-        private string userIdentity = "";
         private string weryfikacja = "";
         private string brakdanych = "";
@@ -31,10 +30,8 @@
         private string err_imie = "";
         private string err_nazwisko = "";
-        
 
         protected override void Initialize(System.Web.Routing.RequestContext requestContext)
         {            
             base.Initialize(requestContext);
-            userIdentity = HttpContext.User.Identity.Name;
             weryfikacja = HttpContext.GetGlobalResourceObject("tlumaczenia", "weryfikacja").ToString();
             brakdanych = HttpContext.GetGlobalResourceObject("tlumaczenia", "brakdanych").ToString();
@@ -52,14 +49,15 @@
                       
         }
-        public PlatnoscController(IDataContext datacontext){
+        public PlatnoscController(IDataContext datacontext)
+        {
             _rep = new Repository<PotwierdzeniaEcard>(datacontext);
             _repPl = new Repository<PlatnosciEcard>(datacontext);
             _context1 = datacontext;
-            _func = new FunkcjePlatnosci();            
+            _func = new FunkcjePlatnosci();
         }
         public ActionResult Show(string id, string language)
         {
+          
             language = _func.setLanguage(language);
-            string jezyk = Thread.CurrentThread.CurrentCulture.Name.ToString();
             int id1 = 0;
             try
@@ -69,6 +67,5 @@
             catch
             {
-            }
-          
+            }          
             vPlatnosciEcard platnosc = _rep.FindInvoiceById(id1).SingleOrDefault();
             ErrorViewData errorViewData = new ErrorViewData();
@@ -78,5 +75,5 @@
                return View("Error1", errorViewData);                
             }
-            else if (!_func.UserIdentity(platnosc, userIdentity))
+            else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name))
             {
                 errorViewData.error = weryfikacja;
@@ -90,6 +87,5 @@
                 errorViewData.error = String.Format(zaplacono, platnosc.Faktura_Numer, data_zaplaty);
                 return View("Error1", errorViewData);
-            }
-            
+            }            
             string kwota = "";
             kwota = _func.BruttoToString(platnosc.Brutto, platnosc.waluta_brutto, platnosc.waluta_miano);
@@ -114,5 +110,5 @@
             ErrorViewData errorViewData = new ErrorViewData();
 
-            if (!_func.UserIdentity(platnosc, userIdentity))
+            if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name))
             {
                 errorViewData.error = weryfikacja;
@@ -124,5 +120,5 @@
                 return View("Error1", errorViewData);
             }
-            else if (!_func.UserIdentity(platnosc, userIdentity))
+            else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name))
             {
                 errorViewData.error = weryfikacja;
@@ -166,8 +162,8 @@
             if (platnosc == null)
             {
-                errorViewData.error = HttpContext.GetGlobalResourceObject("tlumaczenia", "faktura_error").ToString();
-                return View("Error1", errorViewData);
-            }
-            else if (!_func.UserIdentity(platnosc, userIdentity))
+                errorViewData.error = brakdanych;
+                return View("Error1", errorViewData);
+            }
+            else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name))
             {
                 errorViewData.error = weryfikacja;
@@ -247,9 +243,4 @@
             return invoiceDeatailsViewData;
         }
-        public void setUserIdentity(string value)
-        {
-            this.userIdentity = value;
-
-        }
         public void setWeryfikacja(string value)
         {
