public SingleResponse <bool> EliminarTipoTicketsCliente(TiposTicketModel tiposTicket)
        {
            SingleResponse <bool> response = new SingleResponse <bool>();

            try
            {
                response.Done(iConfigurarParametrosTicketsDataAccess.EliminarTipoTicketsCliente(tiposTicket), string.Empty);
            }
            catch (DalException e)
            {
                response.Error(e);
            }
            catch (DomainValidationsException e)
            {
                response.SetValidations(e.Validations);
            }
            catch (DomainException e)
            {
                response.Error(e);
            }
            catch (Exception e)
            {
                response.Error(new DomainException(CodesConfigParamTickets.ERR_08_03, e));
            }
            return(response);
        }
Example #2
0
        public bool EliminarTipoTicketsCliente(TiposTicketModel tiposTicket)
        {
            try
            {
                iGenericDataAccess.OpenConnection();

                TiposTicket tipos = iGenericDataAccess.BuscarUno(new TiposTicket
                {
                    TipoId = tiposTicket.TipoId
                },
                                                                 new OptionsQueryZero
                {
                    ExcludeNumericsDefaults = true,
                    ExcludeBool             = true
                });

                iGenericDataAccess.Actualizar(new TiposTicket
                {
                    TipoId         = tipos.TipoId,
                    Descripcion    = tipos.Descripcion,
                    TiempoAtencion = tipos.TiempoAtencion,
                    Activa         = false
                });

                iGenericDataAccess.CloseConnection();
                return(true);
            }
            catch (DomainException e)
            {
                throw new DalException(CodesConfigParamTickets.INF_08_03, e);
            }
            catch (Exception e)
            {
                iGenericDataAccess.CloseConnection();
                throw new DalException(CodesConfigParamTickets.ERR_08_04, e);
            }
        }
 public SingleResponse <bool> EliminarTipoTicketsCliente(TiposTicketModel tiposTicket)
 {
     return(iConfigurarParametrosTicketsBusiness.EliminarTipoTicketsCliente(tiposTicket));
 }