Pokaż
Ignoruj:
Data:
2009-12-28 15:17:15 (16 years ago)
Autor:
alina
Opis:

re #215 ujednolicenie nazw obiektow, modyfikacje dotyczace testow interfejsowych (dodanie tymczasowych rekowrdow do bazy na czas testowania )

Pliki:
1 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/adMoto.Payments.Web/Controllers/AccountController.cs

    r971 r984  
    2929        } 
    3030 
    31         public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, PaymentsUtils func) 
     31        public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, PaymentsUtils paymentsUtils) 
    3232        { 
    3333            _repository = repository; 
    3434            FormsAuth = formsAuth ?? new FormsAuthenticationService(); 
    35             _paymentsUtils = func; 
     35            _paymentsUtils = paymentsUtils; 
    3636        } 
    3737 
     
    5151        { 
    5252            _paymentsUtils.SetLanguage(language); 
    53             var platnosc = new Invoice(); 
     53            var invoice = new Invoice(); 
     54             
    5455            if (!ValidateLogOn(nip, numerFaktury)) 
    55             { 
     56                return View();             
     57             
     58            invoice = _repository.FindInvoiceByNipNumber(nip, numerFaktury).SingleOrDefault(); 
     59             
     60            if (invoice == null)  
    5661                return View(); 
    57             } 
    58              
    59             var login = _repository.FindInvoiceByNipNumber(nip, numerFaktury).SingleOrDefault(); 
    60             platnosc = login; 
    61             if (platnosc == null) return View(); 
     62 
    6263            _paymentsUtils.SetUserLogger(nip, numerFaktury); 
    6364 
     
    6566 
    6667            if (!String.IsNullOrEmpty(returnUrl)) 
    67             { 
    6868                return Redirect(returnUrl); 
    69             } 
    7069             
    71             return RedirectToAction("Show", "Platnosc", new { id = platnosc.ID_faktury }); 
     70            return RedirectToAction("Show", "Platnosc", new { id = invoice.ID_faktury }); 
    7271        } 
    7372 
     
    8685            if (String.IsNullOrEmpty(nip)) 
    8786                ModelState.AddModelError("nip", errNip); 
     87             
    8888            if (String.IsNullOrEmpty(numerFaktury)) 
    8989                ModelState.AddModelError("numerFaktury", errFaktura);