Esempio n. 1
0
        /// <summary>
        /// Get infomation
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel GetInfo(InitDataModel inputObject)
        {
            // Local variable declaration
            InitDataModel     getResult         = null;
            MCodeCom          mCodeCom          = null;
            AdminItemEntryDao adminItemEntryDao = null;

            // Variable initialize
            getResult         = new InitDataModel();
            mCodeCom          = new MCodeCom();
            adminItemEntryDao = new AdminItemEntryDao();

            // Get data
            var listCategory   = mCodeCom.GetListCategory(false, false);
            var listAge        = mCodeCom.GetListAge(false, false);
            var listGender     = mCodeCom.GetListGender(false, false);
            var listBrand      = mCodeCom.GetListBrand(false, false);
            var listCountry    = mCodeCom.GetListCountry(false, false);
            var listUnit       = mCodeCom.GetListUnit(false, false);
            var listItemDiv    = mCodeCom.GetListCode(Logics.GROUP_ITEM_DIV, null, false, false);
            var listDeleteFlag = mCodeCom.GetListCode(Logics.GROUP_DELETE_FLAG, null, false, false);
            var item           = new Item();

            if (!IsAdd)
            {
                item = adminItemEntryDao.GetSingleItem(inputObject.ItemCd);
            }
            else
            {
                item.FileId = DataHelper.GetUniqueKey();
            }

            // Set value
            getResult.ListCategory   = listCategory;
            getResult.ListAge        = listAge;
            getResult.ListGender     = listGender;
            getResult.ListBrand      = listBrand;
            getResult.ListCountry    = listCountry;
            getResult.ListUnit       = listUnit;
            getResult.ListItemDiv    = listItemDiv;
            getResult.ListDeleteFlag = listDeleteFlag;
            getResult.Item           = item;

            // Return value
            return(getResult);
        }
Esempio n. 2
0
        /// <summary>
        /// Get infomation
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel GetInfo(InitDataModel inputObject)
        {
            // Local variable declaration
            InitDataModel    getResult        = null;
            MCodeCom         mCodeCom         = null;
            AdminItemListDao adminItemListDao = null;

            // Variable initialize
            getResult        = new InitDataModel();
            mCodeCom         = new MCodeCom();
            adminItemListDao = new AdminItemListDao();

            // Get data
            var listCategory   = mCodeCom.GetListCategory(true, false);
            var listAge        = mCodeCom.GetListAge(true, false);
            var listGender     = mCodeCom.GetListGender(true, false);
            var listBrand      = mCodeCom.GetListBrand(true, false);
            var listCountry    = mCodeCom.GetListCountry(true, false);
            var listUnit       = mCodeCom.GetListUnit(true, false);
            var listItemDiv    = mCodeCom.GetListCode(Logics.GROUP_ITEM_DIV, null, true, false);
            var listDeleteFlag = mCodeCom.GetListCode(Logics.GROUP_DELETE_FLAG, null, true, false);
            var listItems      = adminItemListDao.GetListItems();

            // Set value
            getResult.ListCategory   = listCategory;
            getResult.ListAge        = listAge;
            getResult.ListGender     = listGender;
            getResult.ListBrand      = listBrand;
            getResult.ListCountry    = listCountry;
            getResult.ListUnit       = listUnit;
            getResult.ListItemDiv    = listItemDiv;
            getResult.ListDeleteFlag = listDeleteFlag;
            getResult.ListItems      = listItems;

            // Return value
            return(getResult);
        }