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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        public static List <FavoriteDose> getDoseByfeedback()
        {
            List <FavoriteDose> favorite = new List <FavoriteDose>();
            var list = InventDoseCast.ListToDTO(InventDoseDAL.GetDoseByfeedback());

            foreach (var item in list)
            {
                var f    = new FavoriteDose();
                var name = VisitersDAL.GetById(item.IdVisiter);
                f.VisiterName      = name.FirstName.Trim() + " " + name.LastName.Trim();
                f.Feedback         = item.Feedback.Trim();
                f.date             = DateTime.Now;
                f.rate             = item.rate;
                item.InventDetails = InventDetailsCast.ListToDTO(InventDoseDAL.GetByIdInventDetails(item.Id));
                foreach (var menu in item.InventDetails)
                {
                    f.Menu = MenuBL.GetById(menu.IdMenu);
                }
                favorite.Add(f);
            }
            return(favorite);
        }
Beispiel #5
0
 public static void Update(InventDoseDTO InventDose)
 {
     InventDoseDAL.Update(InventDoseCast.ToDAL(InventDose));
 }
Beispiel #6
0
 public static void Addfeedback(InventDoseDTO InventDose)
 {
     InventDoseDAL.Addfeedback(InventDoseCast.ToDAL(InventDose));
 }
Beispiel #7
0
 public static List <SpecialInventDTO> GetAllSpecialInvent()
 {
     return(InventDoseCast.ListToDTOSpecial(InventDoseDAL.GetAllSpecialInvent()));
 }
Beispiel #8
0
 public static void AddSpecialInvent(SpecialInventDTO specialInvent)
 {
     InventDoseDAL.AddSpecialInvent(InventDoseCast.ToDALSpecialInvent(specialInvent));
 }
Beispiel #9
0
 public static void updateSpecialInvent(SpecialInventDTO specialInvent)
 {
     InventDoseDAL.UpdateSpecialInvent(InventDoseCast.ToDALSpecialInvent(specialInvent));
 }
Beispiel #10
0
 public static void DeleteSpecialInvent(SpecialInventDTO specialInvent)
 {
     InventDoseDAL.DeleteSpecialInvent(InventDoseCast.ToDALSpecialInvent(specialInvent));
 }
Beispiel #11
0
 public static void Delete(InventDoseDTO InventDose)
 {
     InventDoseDAL.Delete(InventDoseCast.ToDAL(InventDose));
 }