Ejemplo n.º 1
0
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(SaveDataModel inputObject)
        {
            // Local variable declaration
            AdminGroupEntryDao adminGroupEntryDao = null;
            MCodeCom mCodeCom = null;

            // Variable initialize
            adminGroupEntryDao = new AdminGroupEntryDao();
            mCodeCom = new MCodeCom();

            // Check role
            if (!PageHelper.AuthRole(Logics.RL_USERS))
                throw new ExecuteException("E_MSG_00013");

            // Check valid
            var dFlag = DataHelper.ToString(inputObject.DeleteFlag);

            if (!mCodeCom.IsExist(Logics.GROUP_DELETE_FLAG, dFlag, false))
                throw new DataNotExistException("Dữ liệu");
            if (adminGroupEntryDao.IsExistGroup(inputObject.GroupCd))
                throw new DataExistException("Nhóm");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Save infomation
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private SaveDataModel SaveInfo(SaveDataModel inputObject)
        {
            // Local variable declaration
            SaveDataModel saveResult = null;
            AdminGroupEntryDao adminGroupEntryDao = null;

            // Variable initialize
            saveResult = new SaveDataModel();
            adminGroupEntryDao = new AdminGroupEntryDao();

            // Insert data
            adminGroupEntryDao.InsertGroup(inputObject);

            return saveResult;
        }