Pokaż
Ignoruj:
Data:
2009-12-01 16:03:47 (16 years ago)
Autor:
alina
Opis:

re #215 dodanie metody szukania ordernumber po orderdescription, dacie i id faktury

Pliki:
1 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/Platnosci.Core/Linq/DataContext1.cs

    r883 r918  
    8787                return query; 
    8888            } 
     89            public int GetOrdernumber(string description, int? idfaktury, DateTime? data) 
     90            { 
     91                int ordernumber = 0; 
    8992 
     93                var query = from l in _dataContext.PlatnosciEcards 
     94                            where l.ORDERDESCRIPTION == description && l.IDFaktury == idfaktury && l.Data == data 
     95                            select l; 
     96                 
     97                List<PlatnosciEcard> pl = query.ToList(); 
     98                if (pl.Count > 0 && pl[0].ORDERNUMBER > 0) ordernumber = pl[0].ORDERNUMBER; 
     99                return ordernumber; 
     100            } 
    90101    } 
    91102}