public static List <InventDoseDTO> GetCurrentInvents() { StatusDoseDTO status = StatusDoseBL.GetByDescription("הוזמן"); List <InventDose> invents = InventDoseDAL.GetAll(). Where(invent => invent.IdStatusDose == status.IdDose).ToList(); return(InventDoseCast.ListToDTO(invents)); }
public static List <InventDoseDTO> GetAll() { var dal = InventDoseDAL.GetAll(); List <InventDoseDTO> dalList = new List <InventDoseDTO>(); foreach (var item in dal) { var i = InventDoseCast.ToDTO(item); i.StatusName = InventDoseDAL.GetByIdStatusInvent(i.IdStatusInvent).Kind.Trim(); i.VisiterName = VisitersDAL.GetById(i.IdVisiter).FirstName; i.InventDetails = InventDetailsCast.ListToDTO(InventDoseDAL.GetByIdInventDetails(i.Id)); foreach (var menu in i.InventDetails) { var m = MenuBL.GetById(menu.IdMenu); menu.MenuName = m.NameDose; } dalList.Add(i); } return(dalList); }