Пример #1
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var          e  = (Empleado)entity;
            SqlOperation op = new SqlOperation {
                ProcedureName = "UPD_EMPLEADO_PR"
            };

            op.AddVarcharParam(DB_COL_CODIGO_TIENDA, e.ID_TIENDA);
            op.AddVarcharParam(DB_COL_IDENTIFICACION, e.IDENTIFICACION);
            op.AddVarcharParam(DB_COL_PRIMER_NOMBRE, e.PRIMER_NOMBRE);
            op.AddVarcharParam(DB_COL_SEGUNDO_NOMBRE, e.SEGUNDO_NOMBRE);
            op.AddVarcharParam(DB_COL_PRIMER_APELLIDO, e.PRIMER_APELLIDO);
            op.AddVarcharParam(DB_COL_SEGUNDO_APELLIDO, e.SEGUNDO_APELLIDO);
            op.AddVarcharParam(DB_COL_URL_FOTO_ID, e.URL_FOTO_ID);
            return(op);
        }
Пример #2
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_SELLER_PR"
            };

            var s = (SellerStore)entity;

            operation.AddVarcharParam(DB_COL_EMAIL, s.Email);
            operation.AddVarcharParam(DB_COL_URL_PHOTO_ID, s.Url_Photo_ID);
            operation.AddVarcharParam(DB_COL_NAME_1, s.Name_1);
            operation.AddVarcharParam(DB_COL_NAME_2, s.Name_2);
            operation.AddVarcharParam(DB_COL_LAST_NAME_1, s.Last_Name_1);
            operation.AddVarcharParam(DB_COL_LAST_NAME_2, s.Last_Name_2);
            operation.AddVarcharParam(DB_COL_PHONE_1, s.Phone_1);
            operation.AddVarcharParam(DB_COL_PHONE_2, s.Phone_2);
            //operation.AddIntParam(DB_COL_ID_ADDRESS, s.ID_Address);
            operation.AddVarcharParam(DB_COL_URL_PROFILE_PRIC, s.Url_Profile_Pric);
            //operation.AddVarcharParam(DB_COL_ID_STORE, s.ID_STORE);
            //operation.AddBoolParam(DB_COL_ACTIVE, s.ACTIVE);

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

            var be = (ExitRamp)entity;

            operation.AddVarcharParam(DB_COL_NAME, be.Name);
            operation.AddIntParam(DB_COL_ID_TERMINAL, be.Terminal.IdTerminal);

            if (be.Route?.IdRoute > 0)
            {
                operation.AddIntParam(DB_COL_ID_ROUTE, be.Route.IdRoute);
            }

            return(operation);
        }
Пример #4
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation()
            {
                ProcedureName = "CRUD_EVENTO_PRODUCTO"
            };
            var eventoProducto = (EventoProducto)entity;

            operation.Parameters = new List <SqlParameter>();
            operation.AddIntParam(DbColIdProducto, eventoProducto.IdProducto);
            operation.AddVarcharParam(DbColTipoPatrocinio, eventoProducto.TipoPatrocinio);
            operation.AddIntParam(DbColCantidadProducto, eventoProducto.CantidadProducto);
            operation.AddDecimalParam(DbColValorTotalProducto, eventoProducto.ValorTotalProducto);
            operation.AddIntParam(DbColIdEvento, eventoProducto.IdEvento);
            operation.AddIntParam(DbColIdPatrocinador, eventoProducto.IdPatrocinador);
            operation.AddIntParam(DbCrudAction, (int)CrudActionEnum.Create);
            return(operation);
        }
Пример #5
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var Operation = new SqlOperation {
                ProcedureName = "UpdateRoute"
            };

            var C = (Route)entity;

            Operation.AddIntParam(IDROUTE, C.IdRoute);
            Operation.AddVarcharParam(NAME, C.Name);
            Operation.AddDoubleParam(DISTANCE, C.Distance);
            Operation.AddDoubleParam(ESTIMATEDTIME, C.EstimatedTime);
            Operation.AddIntParam(IDCOMPANY, C.RouteCompany.IdCompany);
            Operation.AddIntParam(IDTERMINAL, C.RouteTerminal.IdTerminal);
            Operation.AddDoubleParam(PRICE, C.Price);

            return(Operation);
        }
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var Operation = new SqlOperation {
                ProcedureName = "UpdateSanction"
            };

            var C = (Sanction)entity;

            Operation.AddVarcharParam(DESCRIPTION, C.Description);
            Operation.AddIntParam(IDROUTE, C.Route.IdRoute);
            Operation.AddIntParam(IDTERMINAL, C.Terminal.IdTerminal);
            Operation.AddIntParam(IDSANCTIONTYPE, C.Type.IdType);
            Operation.AddIntParam(IDCOMPANY, C.Company.IdCompany);
            Operation.AddDateParam(DATE, DateTime.Now);
            Operation.AddIntParam(IDSANCTION, C.IdSanction);

            return(Operation);
        }
Пример #7
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var Operation = new SqlOperation {
                ProcedureName = "CreateComplaint"
            };

            var C = (Complaint)entity;

            Operation.AddVarcharParam(DESCRIPTION, C.Description);
            Operation.AddIntParam(IDBUS, C.Bus.IdBus);
            Operation.AddIntParam(IDTERMINAL, C.Terminal.IdTerminal);
            Operation.AddIntParam(IDDRIVER, C.Driver.CardNumber);
            Operation.AddIntParam(IDUSER, C.User.IdUser);
            Operation.AddDateParam(DATE, DateTime.Now);
            Operation.AddIntParam(IDCOMPANY, C.Company.IdCompany);

            return(Operation);
        }
Пример #8
0
        public SqlOperation GetCreateReservationReturn(Reservation reservation)
        {
            var operation = new SqlOperation {
                ProcedureName = $"CRE_RESERVACIONES_RETURN_PR"
            };

            operation.AddIntParam("ID", reservation.Id);
            operation.AddIntParam("FK_USUARIO", reservation.FkUser);
            operation.AddIntParam("FK_HOTEL", reservation.FkHotel);
            operation.AddDateParam("FECHA_INCIO", reservation.StartDate);
            operation.AddDateParam("FECHA_FIN", reservation.EndDate);
            operation.AddDecimalParam("PRECIO", reservation.Price);
            operation.AddIntParam("FK_HABITACION", reservation.FKRoom);
            operation.AddIntParam("FK_RESERVACION", reservation.FkReservation);
            operation.AddIntParam("FK_SUBRESERVACION", reservation.FkSubreservation);
            operation.AddVarcharParam("ESTADO", reservation.State);
            return(operation);
        }
Пример #9
0
        public SqlOperation GetCreateStatement(EntidadBase entidad)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_HISTORIALVIAJE_PR"
            };

            var i = (HistorialViajes)entidad;

            operation.AddVarcharParam(DB_COL_LINEA, i.Linea);
            operation.AddVarcharParam(DB_COL_TREN, i.Tren);
            operation.AddVarcharParam(DB_COL_ESTACION_ANTERIOR, i.EstacionAnterior);
            operation.AddVarcharParam(DB_COL_ESTACION_SIGUIENTE, i.EstacionSiguiente);
            operation.AddVarcharParam(DB_COL_TIEMPO_ESTIMADO, i.TiempoEstimado);
            operation.AddVarcharParam(DB_COL_ACCION, i.Accion);
            operation.AddVarcharParam(DB_COL_FECHA, i.Fecha);

            return(operation);
        }
Пример #10
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "SP_CREATEFLIGHT"
            };
            var a = (Flight)entity;

            operation.AddVarcharParam(DB_COL_ID, a.Id);
            operation.AddVarcharParam(DB_COL_AIRLINE_ID, a.Airline_Id);
            operation.AddVarcharParam(DB_COL_ORIGIN_AIRPORT, a.Origin_Airport_Id);
            operation.AddVarcharParam(DB_COL_DESTINY_AIRPORT, a.Destiny_Airport_Id);
            operation.AddDateParam(DB_COL_DEPARTURE_TIME, a.Departure_Time);
            operation.AddDateParam(DB_COL_ARRIVAL_TIME, a.Arrival_DateTime);
            operation.AddVarcharParam(DB_COL_STATUS, a.Status);
            operation.AddVarcharParam(DB_COL_ID_AIRPLANE, a.Id_Airplane);
            operation.AddVarcharParam(DB_COL_ID_GATE, a.Id_Gate);


            return(operation);
        }
Пример #11
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_Direcciones"
            };

            var d = (Direccion)entity;

            operation.AddVarcharParam(BD_COL_Provincia, d.Provincia);
            operation.AddVarcharParam(BD_COL_Canton, d.Canton);
            operation.AddVarcharParam(BD_COL_Distrito, d.Distrito);
            operation.AddVarcharParam(BD_COL_Senas, d.Senas);
            operation.AddVarcharParam(BD_COL_Tipo, d.Tipo);
            operation.AddVarcharParam(BD_COL_CedulaCliente, d.CedulaCliente);

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

            var storeAdmin = (StoreAdministrator)entity;

            operation.AddVarcharParam(DB_COL_NAME, storeAdmin.Name);
            operation.AddVarcharParam(DB_COL_LAST_NAME1, storeAdmin.FirstLastName);
            operation.AddVarcharParam(DB_COL_LAST_NAME2, storeAdmin.SecondLastName);
            operation.AddVarcharParam(DB_COL_EMAIL, storeAdmin.Email);
            operation.AddVarcharParam(DB_COL_PASSWORD, storeAdmin.Password);
            operation.AddVarcharParam(DB_COL_STORE, storeAdmin.Store);

            return(operation);
        }
Пример #13
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "SP_UPDATEAIRLINE"
            };
            var a = (Airline)entity;

            operation.AddVarcharParam(DB_COL_ID, a.Id);
            operation.AddVarcharParam(DB_COL_COMERCIAL_NAME, a.Comercial_name);
            operation.AddVarcharParam(DB_COL_BUSINESS_NAME, a.Business_name);
            operation.AddDateParam(DB_COL_CREATION_YEAR, a.Creation_year);
            operation.AddVarcharParam(DB_COL_DESCRIPTION, a.Description);
            operation.AddVarcharParam(DB_COL_EMAIL, a.Email);
            operation.AddIntParam(DB_COL_STATUS, a.Status ? 1 : 0);
            operation.AddVarcharParam(DB_COL_REQUEST, a.Request);
            return(operation);
        }
Пример #14
0
        public SqlOperation GetUpdateStatement(EntidadBase entidad)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_EMPRESA_PR"
            };

            var c = (Empresa)entidad;

            operation.AddVarcharParam(DB_COL_CED_JURIDICA, c.Cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.Nombre);
            operation.AddVarcharParam(DB_COL_DIRRECCION, c.Direccion);
            operation.AddVarcharParam(DB_COL_TELEFONO, c.Telefono);
            operation.AddVarcharParam(DB_COL_CORREO, c.Correo);
            operation.AddVarcharParam(DB_COL_IMPUESTO, c.Impuesto);

            return(operation);
        }
Пример #15
0
        public SqlOperation GetUpdateStatementNoFrecuente(EntidadBase entidad)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_CLIENTE_NO_FRECUENTE_PR"
            };

            var u = (Cliente)entidad;

            operation.AddVarcharParam(DB_COL_CEDULA, u.Cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, u.Nombre);
            operation.AddVarcharParam(DB_COL_APELLIDO, u.Apellido);
            operation.AddVarcharParam(DB_COL_CORREO, u.Correo);
            operation.AddVarcharParam(DB_COL_TELEFONO, u.Telefono);
            operation.AddVarcharParam(DB_COL_RESIDENCIA, u.Residencia);

            return(operation);
        }
Пример #16
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_DIRECTION_PR"
            };

            var d = (Direction)entity;

            operation.AddVarcharParam(DB_COL_PROVINCE, d.Province);
            operation.AddVarcharParam(DB_COL_CANTON, d.Canton);
            operation.AddVarcharParam(DB_COL_DISTRITO, d.Distrito);
            operation.AddVarcharParam(DB_COL_DETAILS, d.Details);
            operation.AddVarcharParam(DB_COL_TYPE, d.Type);
            operation.AddVarcharParam(DB_COL_OWNER_ID, d.OwnerId);

            return(operation);
        }
Пример #17
0
        public SqlOperation GetUpdateStatement(Entity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_SERVICIO_PR"
            };

            var s = (Servicio)entity;

            operation.AddVarcharParam(DB_COL_CODIGO, s.Codigo);
            operation.AddVarcharParam(DB_COL_NOMBRE, s.Nombre);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, s.Descripcion);
            operation.AddVarcharParam(DB_COL_ESTADO, s.Estado);
            operation.AddVarcharParam(DB_COL_FOTO_PERFIL, s.FotoPerfil);
            operation.AddVarcharParam(DB_COL_ID_HOTEL, s.IdHotel);

            return(operation);
        }
Пример #18
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_STORE_ADMINISTRATOR_PR"
            };

            var storeAdmin = (StoreAdministrator)entity;

            operation.AddVarcharParam(DB_COL_NAME, storeAdmin.Name_1);
            operation.AddVarcharParam(DB_COL_LAST_NAME1, storeAdmin.Last_Name1);
            operation.AddVarcharParam(DB_COL_LAST_NAME2, storeAdmin.Last_Name2);
            operation.AddVarcharParam(DB_COL_EMAIL, storeAdmin.Email);
            operation.AddVarcharParam(DB_COL_ID, storeAdmin.Id);
            operation.AddVarcharParam(DB_COL_PHONE, storeAdmin.Phone_1);

            return(operation);
        }
Пример #19
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation()
            {
                ProcedureName = "CRUD_ENTIDAD"
            };
            var entidad = (Entidad)entity;

            operation.Parameters = new List <SqlParameter>();
            operation.AddVarcharParam(DbColIdEntidad, entidad.IdEntidad);
            operation.AddVarcharParam(DbColNombreEntidad, entidad.NombreEntidad);
            operation.AddVarcharParam(DbColTipoEntidad, entidad.TipoEntidad);
            operation.AddVarcharParam(DbColNombreComercialEntidad, entidad.NombreComercialEntidad);
            operation.AddVarcharParam(DbColDireccionEntidad, entidad.DireccionEntidad);
            operation.AddVarcharParam(DbColTelefonoEntidad, entidad.TelefonoEntidad);
            operation.AddByteParam(DbColLogoEntidad, ConvertImageToByteArray(entidad.LogoEntidad));
            operation.AddVarcharParam(DbColCorreoEntidad, entidad.CorreoEntidad);
            operation.AddIntParam(DbCrudAction, (int)CrudActionEnum.Create);

            return(operation);
        }
Пример #20
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);
        }
Пример #21
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_AIRPORT_PR"
            };
            var c = (Airport)entity;

            operation.AddVarcharParam(DB_COL_ID, c.ID);
            operation.AddVarcharParam(DB_COL_NAME, c.Name);
            operation.AddVarcharParam(DB_COL_ADDRESS, c.Address);
            operation.AddVarcharParam(DB_COL_PHONE, c.Phone);
            operation.AddVarcharParam(DB_COL_ZIPCODE, c.ZipCode);
            operation.AddDecimalParam(DB_COL_GATE_TARIFF, c.GateTariff);
            operation.AddDecimalParam(DB_COL_RUNWAY_TARIFF, c.RunwayTariff);
            operation.AddDecimalParam(DB_COL_TAX, c.Tax);
            operation.AddIntParam(DB_COL_STATUS, c.Status ? 1 : 0);
            operation.AddVarcharParam(DB_COL_LATITUDE, c.Latitude);
            operation.AddVarcharParam(DB_COL_LONGITUDE, c.Longitude);
            // operation.AddIntParam(DB_COL_ASIGNED, c.Asigned ? 1 : 0);
            return(operation);
        }
Пример #22
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.AddVarcharParam(DB_COL_BIRTHDAY, c.Birthday);
            operation.AddIntParam(DB_COL_AGE, c.Age);
            operation.AddVarcharParam(DB_COL_SOCIALSTATUS, c.SocialStatus);
            operation.AddVarcharParam(DB_COL_GENDER, c.Gender);

            return(operation);
        }
Пример #23
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_CLIENTE_PR"
            };

            var c = (Cliente)entity;

            operation.AddVarcharParam(DB_COL_cedula, c.cedula);
            operation.AddVarcharParam(DB_COL_nombre, c.nombre);
            operation.AddVarcharParam(DB_COL_apellido, c.apellido);
            operation.AddVarcharParam(DB_COL_fechaNacimiento, c.fechaNacimiento);
            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_PRODUCT_MEDIA_PR"
            };

            var productMedia = (ProductMedia)entity;

            operation.AddIntParam(DB_COL_ID, productMedia.Id);
            operation.AddVarcharParam(DB_COL_IMAGE_1, productMedia.Image1);
            operation.AddVarcharParam(DB_COL_IMAGE_2, productMedia.Image2);
            operation.AddVarcharParam(DB_COL_IMAGE_3, productMedia.Image3);
            operation.AddVarcharParam(DB_COL_IMAGE_4, productMedia.Image4);
            operation.AddVarcharParam(DB_COL_IMAGE_5, productMedia.Image5);
            operation.AddVarcharParam(DB_COL_VIDEO, productMedia.Video);

            return(operation);
        }
Пример #25
0
        public SqlOperation GetCreateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "SP_CREATE_TICKET"
            };
            var a = (Ticket)entity;

            operation.AddVarcharParam(DB_COL_ID, a.Id);
            operation.AddVarcharParam(DB_COL_ID_FLIGHT, a.Id_Flight);
            operation.AddVarcharParam(DB_COL_TICKET_CLASS, a.Ticket_Class);
            operation.AddVarcharParam(DB_COL_STATUS, a.Status);
            operation.AddDecimalParam(DB_COL_PRICE, a.Price);
            operation.AddDateParam(DB_COL_BUY_DATE, a.Buy_Date);
            operation.AddVarcharParam(DB_COL_ID_PERSON, a.Id_Person);
            operation.AddVarcharParam(DB_COL_PERSON_NAME, a.Person_Name);

            return(operation);
        }
Пример #26
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_STORE_PR"
            };
            var c = (Store)entity;

            operation.AddVarcharParam(DB_COL_ID, c.IDStore);
            operation.AddVarcharParam(DB_COL_NAME, c.Name);
            operation.AddVarcharParam(DB_COL_MANAGER_NAME, c.ManagerName);
            operation.AddVarcharParam(DB_COL_PHONE, c.Phone);
            operation.AddVarcharParam(DB_COL_ID_CATEGORY, c.IDCategory);
            operation.AddVarcharParam(DB_COL_ID_AIRPORT, c.IDAirport);
            operation.AddDecimalParam(DB_COL_RENT, c.Rent);
            operation.AddIntParam(DB_COL_STATUS, c.Status ? 1 : 0);

            return(operation);
        }
Пример #27
0
        public SqlOperation GetUpdateStatement(EntidadBase entidad)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_TREN_PR"
            };

            var t = (Tren)entidad;

            operation.AddVarcharParam(DB_COL_MODELO, t.Modelo);
            operation.AddVarcharParam(DB_COL_MATRICULA, t.Matricula);
            operation.AddVarcharParam(DB_COL_NOMBRE, t.Nombre);
            operation.AddVarcharParam(DB_COL_FECHA_COMPRA, t.FechaCompra);
            operation.AddDecimalParam(DB_COL_COSTO, t.Costo);
            operation.AddVarcharParam(DB_COL_DESCRIPCION, t.Descripcion);
            operation.AddVarcharParam(DB_COL_ESTADO, t.Estado);

            return(operation);
        }
Пример #28
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.AddVarcharParam(DB_COL_BIRTH_DATE, Convert.ToString(c.BirthDate));
            operation.AddIntParam(DB_COL_AGE, c.Age);
            operation.AddVarcharParam(DB_COL_CIVIL_STATUS, Convert.ToString(c.CivilStatus));
            operation.AddVarcharParam(DB_COL_GENDER, Convert.ToString(c.Gender));

            return(operation);
        }
Пример #29
0
        public SqlOperation GetCreateStatement(EntidadBase entidad)
        {
            var operation = new SqlOperation {
                ProcedureName = "CRE_CLIENTE_PR"
            };

            var u = (Cliente)entidad;

            operation.AddVarcharParam(DB_COL_CEDULA, u.Cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, u.Nombre);
            operation.AddIntParam(DB_COL_EDAD, u.Edad);
            operation.AddVarcharParam(DB_COL_CORREO, u.Correo);
            operation.AddVarcharParam(DB_COL_CLAVE, u.Clave);
            operation.AddVarcharParam(DB_COL_TELEFONO, u.Telefono);
            operation.AddVarcharParam(DB_COL_RESIDENCIA, u.Residencia);

            return(operation);
        }
Пример #30
0
        public SqlOperation GetUpdateStatement(BaseEntity entity)
        {
            var operation = new SqlOperation {
                ProcedureName = "UPD_CLIENTE_PR"
            };

            var c = (Customer)entity;

            operation.AddVarcharParam(DB_COL_CEDULA, c.Cedula);
            operation.AddVarcharParam(DB_COL_NOMBRE, c.Nombre);
            operation.AddVarcharParam(DB_COL_APELLIDO, c.Apellido);
            operation.AddVarcharParam(DB_COL_GENERO, c.Genero);
            operation.AddVarcharParam(DB_COL_EST_CIVIL, c.EstadoCivil);
            operation.AddVarcharParam(DB_COL_FEC_NAC, c.FechaNacimiento);
            operation.AddIntParam(DB_COL_AGE, c.Edad);

            return(operation);
        }