Zbiór zmian 872 dla trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
- Data:
- 2009-11-10 16:01:21 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
-
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs (zmodyfikowane) (10 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r871 r872 25 25 private readonly IRepository<PlatnosciEcard> _repPl; 26 26 private FunkcjePlatnosci _func; 27 private string userIdentity = "";28 27 private string weryfikacja = ""; 29 28 private string brakdanych = ""; … … 31 30 private string err_imie = ""; 32 31 private string err_nazwisko = ""; 33 34 32 35 33 protected override void Initialize(System.Web.Routing.RequestContext requestContext) 36 34 { 37 35 base.Initialize(requestContext); 38 userIdentity = HttpContext.User.Identity.Name;39 36 weryfikacja = HttpContext.GetGlobalResourceObject("tlumaczenia", "weryfikacja").ToString(); 40 37 brakdanych = HttpContext.GetGlobalResourceObject("tlumaczenia", "brakdanych").ToString(); … … 52 49 53 50 } 54 public PlatnoscController(IDataContext datacontext){ 51 public PlatnoscController(IDataContext datacontext) 52 { 55 53 _rep = new Repository<PotwierdzeniaEcard>(datacontext); 56 54 _repPl = new Repository<PlatnosciEcard>(datacontext); 57 55 _context1 = datacontext; 58 _func = new FunkcjePlatnosci(); 56 _func = new FunkcjePlatnosci(); 59 57 } 60 58 public ActionResult Show(string id, string language) 61 59 { 60 62 61 language = _func.setLanguage(language); 63 string jezyk = Thread.CurrentThread.CurrentCulture.Name.ToString();64 62 int id1 = 0; 65 63 try … … 69 67 catch 70 68 { 71 } 72 69 } 73 70 vPlatnosciEcard platnosc = _rep.FindInvoiceById(id1).SingleOrDefault(); 74 71 ErrorViewData errorViewData = new ErrorViewData(); … … 78 75 return View("Error1", errorViewData); 79 76 } 80 else if (!_func.UserIdentity(platnosc, userIdentity))77 else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name)) 81 78 { 82 79 errorViewData.error = weryfikacja; … … 90 87 errorViewData.error = String.Format(zaplacono, platnosc.Faktura_Numer, data_zaplaty); 91 88 return View("Error1", errorViewData); 92 } 93 89 } 94 90 string kwota = ""; 95 91 kwota = _func.BruttoToString(platnosc.Brutto, platnosc.waluta_brutto, platnosc.waluta_miano); … … 114 110 ErrorViewData errorViewData = new ErrorViewData(); 115 111 116 if (!_func.UserIdentity(platnosc, userIdentity))112 if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name)) 117 113 { 118 114 errorViewData.error = weryfikacja; … … 124 120 return View("Error1", errorViewData); 125 121 } 126 else if (!_func.UserIdentity(platnosc, userIdentity))122 else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name)) 127 123 { 128 124 errorViewData.error = weryfikacja; … … 166 162 if (platnosc == null) 167 163 { 168 errorViewData.error = HttpContext.GetGlobalResourceObject("tlumaczenia", "faktura_error").ToString();169 return View("Error1", errorViewData); 170 } 171 else if (!_func.UserIdentity(platnosc, userIdentity))164 errorViewData.error = brakdanych; 165 return View("Error1", errorViewData); 166 } 167 else if (!_func.UserIdentity(platnosc, HttpContext.User.Identity.Name)) 172 168 { 173 169 errorViewData.error = weryfikacja; … … 247 243 return invoiceDeatailsViewData; 248 244 } 249 public void setUserIdentity(string value)250 {251 this.userIdentity = value;252 253 }254 245 public void setWeryfikacja(string value) 255 246 {
