Beispiel #1
0
        /// <summary>
        /// Load screen favorite by given user.
        /// </summary>
        /// <param name="username"></param>
        /// <returns>list of screen code.</returns>
        public List <string> LoadScreenFavorite(string username)
        {
            List <string> screens = new List <string>();
            IMenuDAO      daoMenu = DAOFactory.CreateMenuDAO(CommonLib.Common.CurrentDatabase);
            DataTable     dt      = daoMenu.GetScreenFavorite(username);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                screens.Add(dt.Rows[i][0].ToString());
            }
            return(screens);
        }
Beispiel #2
0
        public List <MenuSub> LoadMenus(NZString userCD)
        {
            IMenuDAO dao = DAOFactory.CreateMenuDAO(CommonLib.Common.CurrentDatabase);

            List <MenuSub> menuSubList = dao.GetAllMenuSubFromUser(userCD, CommonLib.Common.SystemLanguage);

            for (int i = 0; i < menuSubList.Count; i++)
            {
                MenuSub menuSub = menuSubList[i];

                List <MenuSubItemDTO> menuSubItemList = dao.GetAllMenuSubItem(menuSub.MENU_SUB_CD.StrongValue, userCD.StrongValue);
                menuSub.MenuSubItemList = menuSubItemList;
            }


            return(menuSubList);
        }
Beispiel #3
0
        /// <summary>
        /// Remove screen favorite
        /// </summary>
        /// <param name="username"></param>
        /// <param name="screenCD"></param>
        public void RemoveScreenFavorite(string username, string screenCD)
        {
            IMenuDAO daoMenu = DAOFactory.CreateMenuDAO(CommonLib.Common.CurrentDatabase);

            daoMenu.DeleteFavorite(username, screenCD);
        }
Beispiel #4
0
 public MenuServiceImpl(IMenuDAO menuDAO) => _menuDAO = menuDAO;