Ejemplo n.º 1
0
        /// <summary>
        /// Execute convert ouput.
        /// </summary>
        /// <param name="resultObject">DataModel</param>
        /// <returns>ResponseModel</returns>
        private SaveResponseModel Convert(SaveDataModel resultObject)
        {
            // Local variable declaration
            SaveResponseModel response = null;

            // Variable initialize
            response = new SaveResponseModel();

            // Set value
            response.AddMessage(MessageHelper.GetMessageInfo("I_MSG_00001"));

            // Return value
            return response;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Execute convert input.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>DataModel</returns>
        private SaveDataModel Convert(SaveRequestModel request)
        {
            // Local variable declaration
            SaveDataModel inputObject = null;

            // Variable initialize
            inputObject = new SaveDataModel();

            // Convert data input
            DataHelper.ConvertInput(request, inputObject);

            // Return value
            return inputObject;
        }
Ejemplo n.º 3
0
        public void InsertGroup(SaveDataModel inputObject)
        {
            // Get sysdate
            var currentDate = DateTime.Now;

            // Set item
            var entity = new Group();
            entity.GroupCd = inputObject.GroupCd;
            entity.GroupName = inputObject.GroupName;
            entity.SortKey = inputObject.SortKey;
            entity.CreateUser = PageHelper.UserName;
            entity.CreateDate = currentDate;
            entity.UpdateUser = PageHelper.UserName;
            entity.UpdateDate = currentDate;
            entity.DeleteFlag = inputObject.DeleteFlag;

            EntityManager.Groups.InsertOnSubmit(entity);

            // Submit
            EntityManager.SubmitChanges();
        }
Ejemplo n.º 4
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.º 5
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;
        }