コード例 #1
0
ファイル: InitLogic.cs プロジェクト: hieur8/web-mbec
        /// <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;
        }