Beispiel #1
0
        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));
        }
Beispiel #2
0
        public static List <InventDoseDTO> GetById(int id)
        {
            var list = InventDoseDAL.GetById(id);
            List <InventDoseDTO> dalList = new List <InventDoseDTO>();

            foreach (var item in list)
            {
                var i = InventDoseCast.ToDTO(item);
                i.StatusName    = StatusDoseBL.GetByIdStatusInventDose(i.IdStatusInvent).Trim();
                i.InventDetails = InventDetailsCast.ListToDTO(InventDoseDAL.GetByIdInventDetails(i.Id));
                foreach (var menu in i.InventDetails)
                {
                    var m = MenuDAL.GetById(menu.IdMenu);
                    menu.MenuName = m.NameDose;
                }
                dalList.Add(i);
            }
            return(dalList);
        }