示例#1
0
        public SqlOperation GetRetriveAllStatement()
        {
            var operation = new SqlOperation()
            {
                ProcedureName = "CRUD_ACTIVIDAD"
            };

            operation.Parameters = new List <SqlParameter>();
            operation.AddIntParam(DbCrudAction, (int)CrudActionEnum.RetrieveAll);

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

            var c = (ConsultasPalabras)entity;

            operation.AddIntParam(DB_COL_CODIGO_REGISTRO, c.CODIGO_REGISTRO);

            return(operation);
        }
示例#3
0
        public SqlOperation GetCitasClienteStatament(BaseEntity entity)
        {
            var c         = (Cita)entity;
            var operacion = new SqlOperation {
                ProcedureName = "OBTENER_CITAS_CLIENTE"
            };

            operacion.AddDateParam(DB_COL_FECHA, c.fecha);
            operacion.AddIntParam(DB_COL_ID_CLIENTE, c.id_cliente);

            return(operacion);
        }
示例#4
0
        public SqlOperation GetCitasComercioStatament(BaseEntity entity)
        {
            var c         = (Cita)entity;
            var operacion = new SqlOperation {
                ProcedureName = "OBTENER_CITA_COMERCIO"
            };

            operacion.AddDateParam(DB_COL_FECHA, c.fecha);
            operacion.AddIntParam(DB_COL_ID_COMERCIO, c.id_comercio);

            return(operacion);
        }
        //Search by id
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_ADVERTISING_ID_PR"
            };

            var ads = (Advertising)entity;

            operation.AddIntParam(DB_COL_ID_PRODUCT, ads.IdProduct);

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

            var Product = (Product)entity;

            operation.AddIntParam(DB_COL_ID, Product.Id);
            operation.AddVarcharParam(DB_COL_NAME, Product.Name);
            operation.AddVarcharParam(DB_COL_DESCRIPTION, Product.Description);
            operation.AddDecimalParam(DB_COL_PRICE_INITIAL, Product.PriceInitial);
            operation.AddDecimalParam(DB_COL_PRICE_FINAL, Product.PriceFinal);
            operation.AddDecimalParam(DB_COL_START_TAXES, Product.Taxes);
            operation.AddVarcharParam(DB_COL_PROVIDER, Product.Provider);
            operation.AddIntParam(DB_COL_ID_CATEGORY, Product.IdCategory);
            operation.AddIntParam(DB_COL_ID_CURRENCY, Product.IdCurrency);
            operation.AddBooleanParam(DB_COL_STATE, Product.State);

            return(operation);
        }
示例#7
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var Operation = new SqlOperation {
                ProcedureName = "RetrieveScheduleById"
            };

            var C = (Schedule)entity;

            Operation.AddIntParam(IDSCHEDULE, C.IdSchedule);

            return(Operation);
        }
示例#8
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_RUTA_PR"
            };

            var r = (Ruta)entity;

            operation.AddIntParam(DB_COL_ID, r.Id);

            return(operation);
        }
示例#9
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_PRODUCTO_PR"
            };

            var c = (Productos)entity;

            operation.AddIntParam(DB_COL_CODIGO, c.CODIGO);

            return(operation);
        }
示例#10
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_TARIFA_PR"
            };

            var t = (Tarifa)entity;

            operation.AddIntParam(DB_COL_ROUTE_ID, t.RouteId);

            return(operation);
        }
示例#11
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_CREDITO_PR"
            };

            var c = (Credit)entity;

            operation.AddIntParam(DB_COL_ID, c.Id);

            return(operation);
        }
示例#12
0
        public SqlOperation GetDeleteStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "DEL_ACCOUNT_PR"
            };

            var a = (Account)entity;

            operation.AddIntParam(DB_COL_ACCOUNT_NUM, a.AccountNum);
            operation.AddVarcharParam(DB_COL_CUSTOMER_ID, a.UserId);
            return(operation);
        }
示例#13
0
        public SqlOperation GetRetriveByRutaStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_HORARIO_PR"
            };

            var h = (Horario)entity;

            operation.AddIntParam(DB_COL_RUTA_ID, h.RutaId);

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

            var p = (Produccion)entity;

            operation.AddIntParam(DB_COL_ID_PRODUCCION, p.IdProduccion);

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

            var c = (User)entity;

            operation.AddVarcharParam(DB_COL_NAME, c.Name);
            operation.AddIntParam(DB_COL_TRANSLATED_WORDS_AMOUNT, c.amountTranslatedWords);
            return(operation);
        }
示例#16
0
        public SqlOperation GetCountByCodigoCategoriaStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CONT_ALL_PRODUCTOS_BY_CATEGORIA_PR"
            };

            var c = (Productos)entity;

            operation.AddIntParam(DB_COL_CODIGO_CATEGORIA, c.CODIGO_CATEGORIA);

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

            var c = (User)entity;

            operation.AddIntParam(DB_COL_ID_USER, c.IdUser);

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

            var c = (Cliente)entity;

            operation.AddIntParam(DB_COL_ID, c.Id_Cliente);

            return(operation);
        }
示例#19
0
        //Search by id
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_PRODUCT_ID_PR"
            };

            var product = (Product)entity;

            operation.AddIntParam(DB_COL_ID, product.Id);

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

            var p = (Producto)entity;

            operation.AddVarcharParam(DB_COL_CODIGO, p.Codigo);
            operation.AddVarcharParam(DB_COL_NOMBRE, p.Nombre);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, p.Descripcion);
            operation.AddDecimalParam(DB_COL_PRECIO, p.Precio);
            operation.AddVarcharParam(DB_COL_FOTO, p.Foto);
            operation.AddVarcharParam(DB_COL_PROVEEDOR, p.Proveedor);
            operation.AddIntParam(DB_COL_CANT_PRODUCTOS, p.CantProductos);
            operation.AddIntParam(DB_COL_ID_CATEGORIA, p.IdCategoria);
            operation.AddIntParam(DB_COL_ID_TIPO_IMPUESTO, p.IdTipoImpuesto);
            operation.AddVarcharParam(DB_COL_ID_SERVICIO, p.IdServicio);

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

            var be = (Agreement)entity;

            operation.AddIntParam(DB_COL_ID, be.IdAgreement);

            return(operation);
        }
示例#22
0
        public SqlOperation GetUpdateStatement(EntidadBase entidad)
        {
            var p         = (Puesto)entidad;
            var operation = new SqlOperation {
                ProcedureName = "UPD_PUESTO_PR"
            };

            operation.AddIntParam(DB_COL_ID, p.Id);
            operation.AddVarcharParam(DB_COL_NOMBRE, p.Nombre);

            return(operation);
        }
示例#23
0
        public SqlOperation GetCitasSucursalStatament(BaseEntity entity)
        {
            var c         = (Cita)entity;
            var operacion = new SqlOperation {
                ProcedureName = "OBTENER_CITA_SUCURSAL"
            };

            operacion.AddDateParam(DB_COL_FECHA, c.fecha);
            operacion.AddIntParam(DB_COL_ID_SUCURSAL, c.id_sucursal);

            return(operacion);
        }
示例#24
0
        public SqlOperation UpdateEstadoTarjeta(BaseEntity entity)
        {
            var tarjeta   = (Tarjeta)entity;
            var operation = new SqlOperation {
                ProcedureName = "UPD_TARJETA_ESTADO_PR"
            };

            operation.AddVarcharParam(DB_COL_CODIGO_UNICO, tarjeta.CodigoUnico);
            operation.AddIntParam(DB_COL_ESTADO_TARJETA_ID, tarjeta.EstadoTarjeta.EstadoTarjetaId);

            return(operation);
        }
示例#25
0
        public SqlOperation GetRetrieveStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "RET_CARRITO_PR"
            };

            var c = (Carrito)entity;

            operation.AddIntParam(DB_COL_ID_CARRITO, c.IdCarrito);

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

            var c = (Multa)entity;

            operation.AddIntParam(DB_COL_ID, c.id);

            return(operation);
        }
示例#27
0
        public SqlOperation GetRetriveStatement(BaseEntity entity)
        {
            var operacion = new SqlOperation {
                ProcedureName = "OBTENER_CITA"
            };

            var c = (Cita)entity;

            operacion.AddIntParam(DB_COL_ID, c.id);

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

            var u = (Usuario)entity;

            operation.AddVarcharParam(DB_COL_CEDULA, u.cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, u.nombre);
            operation.AddVarcharParam(DB_COL_PRIMERAPELLIDO, u.apellido1);
            operation.AddVarcharParam(DB_COL_SEGUNDOAPELLIDO, u.apellido2);
            operation.AddDatetimeParam(DB_COL_FECHANACIMIENTO, u.dob);
            operation.AddVarcharParam(DB_COL_CORREOUSUARIO, u.correoUsuario);
            operation.AddVarcharParam(DB_COL_CONTRASENA, u.contrasena);
            operation.AddIntParam(DB_COL_TELEFONO, u.telefono);
            operation.AddVarcharParam(DB_COL_ESTADOUSUARIO, u.estadoUsuario);
            operation.AddIntParam(DB_COL_IDROL, u.idRol);

            return(operation);
        }
示例#29
0
        public SqlOperation GetCitasEmpleadoStatament(BaseEntity entity)
        {
            var c         = (Cita)entity;
            var operacion = new SqlOperation {
                ProcedureName = "OBTENER_CITA_EMPLEADO"
            };

            operacion.AddDateParam(DB_COL_FECHA, c.fecha);
            operacion.AddIntParam(DB_COL_ID_EMPLEADO, c.id_empleado);

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

            var c = (Item)entity;

            operation.AddIntParam(DB_COL_ID, c.id);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.nombre);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, c.descripcion);
            operation.AddDoubleParam(DB_COL_PRECIO, c.precio);
            operation.AddVarcharParam(DB_COL_TIPO, c.tipo);
            operation.AddIntParam(DB_COL_INVENTARIO, c.inventario);
            operation.AddIntParam(DB_COL_DURACION, c.duracion);
            operation.AddIntParam(DB_COL_ID_SUCURSAL, c.id_sucursal);
            operation.AddIntParam(DB_COL_ID_IMPUESTO, c.id_impuesto);
            operation.AddVarcharParam(DB_COL_ID_FOTO, c.id_foto);

            return(operation);
        }