Beispiel #1
0
        public virtual ServiceResult CreateEntity(T entity)
        {
            var serviceResult = new ServiceResult();
            var errorMsg      = new ErrorMsg();

            var response = _baseDL.CreateEntity(entity);

            // thêm mới thất bại
            if (response <= 0)
            {
                errorMsg.UserMsg      = MISA.CukCuk.Common.Properties.Resources.errorAddEmployee;
                serviceResult.Success = false;
                serviceResult.Data    = errorMsg;
                return(serviceResult);
            }

            //thành công
            serviceResult.Data = response;

            return(serviceResult);
        }