public SqlOperation GetRetriveDateCategoryStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_PRODUCCION_DATE_CATEGORY_PR"
            };

            var c = (Consulta)entity;

            operation.AddDateTimeParam("FECHA_INICIO", c.FechaInicio);
            operation.AddDateTimeParam("FECHA_FINAL", c.FechaFinal);
            operation.AddIntParam("ID_CATEGORIA", c.IdCategoria);

            return(operation);
        }
        public SqlOperation GetCreateStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_HOTEL_PR"
            };

            var c = (Hotel)entity;

            operation.AddVarcharParam(DB_COL_CEDULA_JURIDICA, c.CedulaJuridica);
            operation.AddVarcharParam(DB_COL_ID_GERENTE, c.IdGerente);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.Nombre);
            operation.AddIntParam(DB_COL_CLASIFICACION, c.Clasificacion);
            operation.AddVarcharParam(DB_COL_UBICACION_X, c.UbicacionX);
            operation.AddVarcharParam(DB_COL_UBICACION_Y, c.UbicacionY);
            operation.AddVarcharParam(DB_COL_PROVINCIA, c.Provincia);
            operation.AddVarcharParam(DB_COL_CANTON, c.Canton);
            operation.AddVarcharParam(DB_COL_DISTRITO, c.Distrito);
            operation.AddVarcharParam(DB_COL_DIRECCION, c.Direccion);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, c.Descripcion);
            operation.AddVarcharParam(DB_COL_CADENA, c.Cadena);
            operation.AddDoubleParam(DB_COL_PROM_CALIFICACION, c.PromCalificacion);
            operation.AddVarcharParam(DB_COL_ESTADO, c.Estado);
            operation.AddVarcharParam(DB_COL_CORREO, c.Correo);
            operation.AddVarcharParam(DB_COL_TELEFONOS, c.Telefonos);
            operation.AddVarcharParam(DB_COL_URL_SITIO, c.URLSitio);
            operation.AddDoubleParam(DB_COL_MEMBRECIA, c.Membrecia);
            operation.AddVarcharParam(DB_COL_ESTADO_MEMBRECIA, c.EstadoMembrecia);
            operation.AddDateTimeParam(DB_COL_FECHA_FIN, c.FechaFin);
            operation.AddVarcharParam(DB_COL_LOGO, c.Logo);
            operation.AddVarcharParam(DB_COL_FOTO_PERFIL, c.FotoPerfil);
            operation.AddIntParam(DB_COL_NUM_FACTURACION, c.NumFacturacion);

            return(operation);
        }
示例#3
0
        public SqlOperation GeVerDispHabStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "VAL_DISP_HAB_TIPO_PR"
            };

            var r = (Reserva)entity;

            operation.AddVarcharParam(DB_COL_TIPO_HAB, r.TipoHab);
            operation.AddIntParam(DB_COL_CANT_HAB, r.CantHab);
            operation.AddDateTimeParam(DB_COL_FECHA_INICIO, r.FechaInicio);
            operation.AddDateTimeParam(DB_COL_FECHA_FIN, r.FechaFin);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, r.IdHotel);

            return(operation);
        }
示例#4
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_USUARIO_PR"
            };

            var u = (Usuario)entity;

            operation.AddVarcharParam(DB_COL_EMAIL, u.Email);
            operation.AddVarcharParam(DB_COL_SALT, u.PasswordSalt);
            operation.AddVarcharParam(DB_COL_HASH, u.PasswordHash);
            operation.AddDateTimeParam(DB_COL_PASSWORD_LAST_SET, u.PasswordLastSet);
            operation.AddVarcharParam(DB_COL_IDENTIFICACION, u.Identificacion);
            operation.AddVarcharParam(DB_COL_NOMBRE, u.Nombre);
            operation.AddVarcharParam(DB_COL_APELLIDOS, u.Apellidos);
            operation.AddDateParam(DB_COL_NACIMIENTO, u.FechaNacimiento);
            operation.AddVarcharParam(DB_COL_ESTADO, u.Estado);
            operation.AddVarcharParam(DB_COL_ROLE_ID, u.RoleId);
            operation.AddDecimalParam(DB_COL_NOTIFY_USER_AT, u.SmsNotificationsMin ?? 100);
            operation.AddIntParam(DB_COL_PHONE, u.Telefono);

            if (u.TerminalId != null && u.TerminalId != -1)
            {
                operation.AddIntParam(DB_COL_TERMINAL, u.TerminalId ?? 0);
            }

            return(operation);
        }
示例#5
0
        public SqlOperation GetAsignarHabReservaStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "ASIGNAR_HAB_RESERVA_PR"
            };

            var r = (Reserva)entity;

            operation.AddVarcharParam(DB_COL_TIPO_HAB, r.TipoHab);
            operation.AddIntParam(DB_COL_CANT_HAB, r.CantHab);
            operation.AddIntParam(DB_COL_CODIGO, r.Codigo);
            operation.AddDateTimeParam(DB_COL_FECHA_INICIO, r.FechaInicio);
            operation.AddDateTimeParam(DB_COL_FECHA_FIN, r.FechaFin);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, r.IdHotel);

            return(operation);
        }
示例#6
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_SANCION_PR"
            };

            var s = (Sancion)entity;

            operation.AddVarcharParam(DB_COL_DESCRIPCION, s.Descripcion);
            operation.AddIntParam(DB_COL_MULTA, s.Multa);
            operation.AddVarcharParam(DB_COL_ESTADO, "Activo");
            operation.AddIntParam(DB_COL_TERMINAL_ID, s.TerminalId);
            operation.AddDateTimeParam(DB_COL_FECHA, s.Fecha);
            operation.AddVarcharParam(DB_COL_SUSPENCION, s.Suspencion);
            operation.AddDateTimeParam(DB_COL_FECHA_REACTIVACION, s.FechaReactivacion);
            operation.AddIntParam(DB_COL_EMPRESA, s.Empresa);

            return(operation);
        }
示例#7
0
        public SqlOperation GetCreateStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_RESERVA_PR"
            };

            var r = (Reserva)entity;

            operation.AddIntParam(DB_COL_CODIGO, r.Codigo);
            operation.AddDateTimeParam(DB_COL_FECHA_INICIO, r.FechaInicio);
            operation.AddDateTimeParam(DB_COL_FECHA_FIN, r.FechaFin);
            operation.AddDecimalParam(DB_COL_PRECIO, r.Precio);
            operation.AddVarcharParam(DB_COL_PROMOCION, r.Promocion);
            operation.AddVarcharParam(DB_COL_ID_USUARIO, r.IdUsuario);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, r.IdHotel);
            operation.AddIntParam(DB_COL_CANT_PERSONAS, r.CantPersonas);
            operation.AddIntParam(DB_COL_NUM_FACTURACION, r.NumFacturacion);

            return(operation);
        }
示例#8
0
        public SqlOperation GetUpdateLlegadaStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_RECORRIDO_LLEGADA_PR"
            };
            var r = (Recorrido)entity;

            operation.AddIntParam(DB_COL_ID, r.RecorridoId);
            operation.AddDateTimeParam(DB_COL_HORA_LLEGADA, r.HoraLlegada);
            return(operation);
        }
示例#9
0
        public SqlOperation GetUpdateSalidaStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_RECORRIDO_SALIDA_PR"
            };
            var r = (Recorrido)entity;

            operation.AddIntParam(DB_COL_ID, r.RecorridoId);
            operation.AddDateTimeParam(DB_COL_HORA_SALIDA, r.HoraSalida);
            operation.AddIntParam(DB_COL_TARDIA, r.MinutosTarde);
            return(operation);
        }
        public SqlOperation GetCreateStatement(Entity entity)
        {
            var operation = new SqlOperation { ProcedureName = "CRE_BITACORA_PR" };
            var bit = (Bitacora)entity;

            operation.AddDateTimeParam(DB_COL_FECHA, bit.Fecha);
            operation.AddVarcharParam(DB_COL_TIPO_ACTION, bit.TipoAction);       
            operation.AddVarcharParam(DB_COL_CONTROLLER, bit.Controller);
            operation.AddVarcharParam(DB_COL_ROL_USUARIO, bit.RolUsuario);
            operation.AddVarcharParam(DB_COL_CORREO_USUARIO, bit.CorreoUsuario);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, bit.IdHotel);

            return operation;
        }
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_HISTORIAL_CONTRASENA_PR"
            };

            var h = (HistorialContrasena)entity;

            operation.AddDateTimeParam(DB_COL_FECHA, h.Fecha);
            operation.AddVarcharParam(DB_COL_EMAIL, h.Email);
            operation.AddVarcharParam(DB_COL_HASH, h.PasswordHash);

            return(operation);
        }
示例#12
0
        public SqlOperation GetCreateStatement(EntidadBase entidad)  //Crea una entrada de accion actualizar
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_ACCION_PR"
            };

            var c = (Accion)entidad;

            operation.AddVarcharParam(DB_COL_IDUSUARIO, c.IdUsuario);
            operation.AddVarcharParam(DB_COL_TIPOACCION, c.TipoAccion);
            operation.AddDateTimeParam(DB_COL_FECHA, c.Fecha);

            return(operation);
        }
示例#13
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_REGISTRO_PARQUEO_PR"
            };

            var r = (RegistroParqueo)entity;

            operation.AddIntParam(DB_COL_TERMINAL_ID, r.TerminalId);
            operation.AddDateTimeParam(DB_COL_HORA_INICIO, r.HoraInicio);
            operation.AddVarcharParam(DB_COL_TARJETA_ID, r.TarjetaId);

            return(operation);
        }
        public SqlOperation GetUpdateStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_TIPO_HABITACIONES_PR"
            };

            var t = (TipoHabitaciones)entity;

            operation.AddVarcharParam(DB_COL_CODIGO, t.Codigo);
            operation.AddVarcharParam(DB_COL_NOMBRE, t.Nombre);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, t.Descripcion);
            operation.AddIntParam(DB_COL_NUM_CAMAS, t.NumCamas);
            operation.AddIntParam(DB_COL_CUPO_MAX, t.CupoMax);
            operation.AddDecimalParam(DB_COL_PRECIO, t.Precio);
            operation.AddVarcharParam(DB_COL_VALOR_ESTADO, t.ValorEstado);
            operation.AddDateTimeParam(DB_COL_CHECK_IN, t.HoraCheckIn);
            operation.AddDateTimeParam(DB_COL_CHECK_OUT, t.HoraCheckOut);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, t.IdHotel);
            operation.AddVarcharParam(DB_COL_FOTO, t.FotoPrincipal);


            return(operation);
        }
示例#15
0
        public SqlOperation GetUpdatePasswordStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_USUARIO_PASSWORD_PR"
            };

            var u = (Usuario)entity;

            operation.AddVarcharParam(DB_COL_EMAIL, u.Email);
            operation.AddVarcharParam(DB_COL_SALT, u.PasswordSalt);
            operation.AddVarcharParam(DB_COL_HASH, u.PasswordHash);
            operation.AddDateTimeParam(DB_COL_PASSWORD_LAST_SET, u.PasswordLastSet);

            return(operation);
        }
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_PRODUCCION_PR"
            };

            var p = (Produccion)entity;

            operation.AddIntParam(DB_COL_ID_ANIMAL, p.IdAnimal);
            operation.AddIntParam(DB_COL_CANTIDAD, p.Cantidad);
            operation.AddDoubleParam(DB_COL_VALOR, p.Valor);
            operation.AddDateTimeParam(DB_COL_FECHA, p.Fecha);

            return(operation);
        }
示例#17
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_USER_REQUEST_PR"
            };

            var request = (Request)entity;

            operation.AddVarcharParam(DB_COL_ID_USER, request.IdUser);
            operation.AddIntParam(DB_COL_ID_CATEGORY, request.IdCategory);
            operation.AddDateTimeParam(DB_COL_ELAPSED_TIME, request.ElapsedTime);
            operation.AddVarcharParam(DB_COL_DESCRIPTION, request.Description);

            return(operation);
        }
示例#18
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_SALIDA_PARQUEO_PR"
            };

            var r = (RegistroParqueo)entity;

            operation.AddVarcharParam(DB_COL_TARJETA_ID, r.TarjetaId);
            operation.AddIntParam(DB_COL_TERMINAL_ID, r.TerminalId);
            operation.AddDateTimeParam(DB_COL_HORA_FINAL, r.HoraFin);
            operation.AddDecimalParam(DB_COL_COSTO_TOTAL, r.CostoTotal);

            return(operation);
        }
示例#19
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_ANIMAL_PR"
            };

            var a = (Animal)entity;

            operation.AddIntParam(DB_COL_ID_CATEGORIA, a.IdCategoria);
            operation.AddVarcharParam(DB_COL_NOMBRE, a.Nombre);
            operation.AddIntParam(DB_COL_EDAD, a.Edad);
            operation.AddDateTimeParam(DB_COL_FECHA_NACIMIENTO, a.FechaNacimiento);
            operation.AddVarcharParam(DB_COL_ALIMENTO_FAVORITO, a.AlimentoFavorito);

            return(operation);
        }
示例#20
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_QUEJA_PR"
            };

            var q = (Queja)entity;

            operation.AddVarcharParam(DB_COL_DETALLE, q.DetalleQueja);
            operation.AddIntParam(DB_COL_RUTA, q.Ruta);
            operation.AddVarcharParam(DB_COL_CHOFER, q.Chofer);
            operation.AddVarcharParam(DB_COL_PLACA, q.Placa);
            operation.AddDateTimeParam(DB_COL_HORA, q.Hora);
            operation.AddVarcharParam(DB_COL_ESTADO, "Activo");

            return(operation);
        }
示例#21
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_CUSTOMER_PR"
            };

            var c = (Customer)entity;

            operation.AddVarcharParam(DB_COL_ID, c.Id);
            operation.AddVarcharParam(DB_COL_NAME, c.Name);
            operation.AddVarcharParam(DB_COL_LAST_NAME, c.LastName);
            operation.AddDateTimeParam(DB_COL_DATE_OF_BIRTH, c.DateOfBirth);
            operation.AddVarcharParam(DB_COL_SEX, c.Sex);
            operation.AddVarcharParam(DB_COL_STATE, c.State);

            return(operation);
        }
        public SqlOperation GetUpdateStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_GANANCIA_DIA_PR"
            };

            var c = (Cuenta)entity;

            operation.AddVarcharParam(DB_COL_ID_USUARIO, c.IdUsuario);
            operation.AddDateTimeParam(DB_COL_FECHA_REALIZADO, c.FechaRealizado);
            operation.AddDecimalParam(DB_COL_MONTO, c.Monto);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, c.IdUsuario);
            operation.AddVarcharParam(DB_COL_TIPO_USUARIO, c.TipoUsuario);
            operation.AddVarcharParam(DB_COL_TIPO_PAGO, c.TipoPago);

            return(operation);
        }
示例#23
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_CLIENTE_PR"
            };

            var c = (Cliente)entity;

            operation.AddIntParam(DB_COL_ID, c.Id_Cliente);
            operation.AddVarcharParam(DB_COL_CEDULA, c.Cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.Nombre);
            operation.AddVarcharParam(DB_COL_APELLIDO, c.Apellido);
            operation.AddDateTimeParam(DB_COL_FECHANAC, c.FechaNac);
            operation.AddIntParam(DB_COL_EDAD, c.Edad);
            operation.AddVarcharParam(DB_COL_ESTADOCIVIL, c.EstadoCivil);
            operation.AddVarcharParam(DB_COL_GENERO, c.Genero);

            return(operation);
        }
示例#24
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_CREDITO_PR"
            };

            var c = (Credito)entity;

            operation.AddIntParam(DB_COL_ID, c.Id_Credito);
            operation.AddDoubleParam(DB_COL_MONTO, c.Monto);
            operation.AddDoubleParam(DB_COL_TASA, c.Tasa);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.Nombre);
            operation.AddDoubleParam(DB_COL_CUOTA, c.Cuota);
            operation.AddDateTimeParam(DB_COL_FECHAINICIO, c.FechaInicio);
            operation.AddVarcharParam(DB_COL_ESTADO, c.Estado);
            operation.AddDoubleParam(DB_COL_SALDOOPERACION, c.SaldoOperacion);
            operation.AddIntParam(DB_COL_CLIENTE, c.Cliente);

            return(operation);
        }