public IResponseDTO EditCustomerNotifications(CustomerNotificationsVM model)
        {
            try
            {
                var DbCustomerNotifications = _mapper.Map <CustomerNotifications>(model);
                var entityEntry             = _CustomerNotificationsRepositroy.Update(DbCustomerNotifications);


                int save = _unitOfWork.Commit();

                if (save == 200)
                {
                    _response.Data     = model;
                    _response.IsPassed = true;
                    _response.Message  = "Ok";
                }
                else
                {
                    _response.Data     = null;
                    _response.IsPassed = false;
                    _response.Message  = "Not saved";
                }
            }
            catch (Exception ex)
            {
                _response.Data     = null;
                _response.IsPassed = false;
                _response.Message  = "Error " + string.Format("{0} - {1} ", ex.Message, ex.InnerException != null ? ex.InnerException.FullMessage() : "");
            }

            return(_response);
        }
Example #2
0
        public IResponseDTO postCustomerNotifications(CustomerNotificationsVM CustomerNotificationsVM)
        {
            var depart = _CustomerNotificationsServices.PostCustomerNotifications(CustomerNotificationsVM);

            return(depart);
        }
Example #3
0
        public IResponseDTO UpdateCustomerNotifications(CustomerNotificationsVM CustomerNotificationsVM)
        {
            var depart = _CustomerNotificationsServices.EditCustomerNotifications(CustomerNotificationsVM);

            return(depart);
        }
Example #4
0
        public IResponseDTO RemoveCustomerNotifications(CustomerNotificationsVM CustomerNotificationsVM)
        {
            var depart = _CustomerNotificationsServices.DeleteCustomerNotifications(CustomerNotificationsVM);

            return(depart);
        }