- Data:
- 2009-12-28 15:17:15 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/adMoto.Payments.Web/Controllers/AccountController.cs
r971 r984 29 29 } 30 30 31 public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, PaymentsUtils func)31 public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, PaymentsUtils paymentsUtils) 32 32 { 33 33 _repository = repository; 34 34 FormsAuth = formsAuth ?? new FormsAuthenticationService(); 35 _paymentsUtils = func;35 _paymentsUtils = paymentsUtils; 36 36 } 37 37 … … 51 51 { 52 52 _paymentsUtils.SetLanguage(language); 53 var platnosc = new Invoice(); 53 var invoice = new Invoice(); 54 54 55 if (!ValidateLogOn(nip, numerFaktury)) 55 { 56 return View(); 57 58 invoice = _repository.FindInvoiceByNipNumber(nip, numerFaktury).SingleOrDefault(); 59 60 if (invoice == null) 56 61 return View(); 57 } 58 59 var login = _repository.FindInvoiceByNipNumber(nip, numerFaktury).SingleOrDefault(); 60 platnosc = login; 61 if (platnosc == null) return View(); 62 62 63 _paymentsUtils.SetUserLogger(nip, numerFaktury); 63 64 … … 65 66 66 67 if (!String.IsNullOrEmpty(returnUrl)) 67 {68 68 return Redirect(returnUrl); 69 }70 69 71 return RedirectToAction("Show", "Platnosc", new { id = platnosc.ID_faktury });70 return RedirectToAction("Show", "Platnosc", new { id = invoice.ID_faktury }); 72 71 } 73 72 … … 86 85 if (String.IsNullOrEmpty(nip)) 87 86 ModelState.AddModelError("nip", errNip); 87 88 88 if (String.IsNullOrEmpty(numerFaktury)) 89 89 ModelState.AddModelError("numerFaktury", errFaktura);
