{"id":21327711,"url":"https://github.com/cesar-ignacio/gestioncontroles","last_synced_at":"2025-08-02T05:09:45.959Z","repository":{"id":189125611,"uuid":"482372644","full_name":"Cesar-Ignacio/GestionControles","owner":"Cesar-Ignacio","description":"Gestión de Controles ","archived":false,"fork":false,"pushed_at":"2022-04-30T02:24:27.000Z","size":400,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T03:20:48.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cesar-Ignacio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-04-16T22:15:26.000Z","updated_at":"2022-04-16T22:17:11.000Z","dependencies_parsed_at":"2023-08-18T12:09:00.736Z","dependency_job_id":null,"html_url":"https://github.com/Cesar-Ignacio/GestionControles","commit_stats":null,"previous_names":["cesar-ignacio/gestioncontroles"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cesar-Ignacio/GestionControles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesar-Ignacio%2FGestionControles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesar-Ignacio%2FGestionControles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesar-Ignacio%2FGestionControles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesar-Ignacio%2FGestionControles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cesar-Ignacio","download_url":"https://codeload.github.com/Cesar-Ignacio/GestionControles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesar-Ignacio%2FGestionControles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268338280,"owners_count":24234540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T21:19:14.570Z","updated_at":"2025-08-02T05:09:45.934Z","avatar_url":"https://github.com/Cesar-Ignacio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Gestión de Controles\nPermite crear  controles, asignar las marcas disponibles y una imagen. Puede eliminarse y modificarse .\nLas consultas se hacen por las marcas y se podrá descontar la cantidad digitada.\n\n## Base de Datos\n### DER\n[![Captura-de-pantalla-2022-04-29-231027.png](https://i.postimg.cc/d074WP8Z/Captura-de-pantalla-2022-04-29-231027.png)](https://postimg.cc/kVmQ4HY7)\n#### Script de la base de datos utilizada\n```sql\ncreate  database Control\nON PRIMARY\n(\nNAME='control_dat',\nFilename='C:\\DRIVERS\\control.mdf'\n)\n\nUSE Control\ngo\n\n\n--Creacion de tablas\n\n--tabla control\ncreate table Control\n(\ncodControl varchar(10) PRIMARY KEY NOT NULL,\ncantidad int not null,\nimagen image not null \n)\n\n--tabla Marca\ncreate table Marca\n(\ncodMarca varchar(10) PRIMARY KEY NOT NULL,\nnombreMarca nchar(30) not null\n)\n\n--tabla Control x Marca\n\ncreate table Control_X_Marca\n(\ncodControl varchar(10) NOT NULL,\ncodMarca varchar(10) NOT NULL,\nCONSTRAINT FK_CodCon FOREIGN KEY (codControl) REFERENCES Control(CodControl),\nCONSTRAINT FK_CodMar FOREIGN KEY (codMarca) REFERENCES Marca(CodMarca),\nCONSTRAINT PK_ControlMarca PRIMARY KEY (codControl,codMarca)\n)\ngo\n\n--PROCEDIMIENTOS ALMACENADOS\n\n\t--INSERTA CONTROLES\n\t\n\tCREATE PROCEDURE sp_InsertControl\n\t@codControl varchar(10),\n\t@cantidad int,\n\t@imagen image\n\tAS\n\tINSERT INTO Control(codControl,cantidad,imagen)\n\tSELECT @codControl,@cantidad,@imagen\n\tGO\n\n\t\n\n\t--INSERTAR MARCAS\n\tCREATE PROCEDURE sp_InsertarMarca\n\t@codMarca varchar(10),\n\t@nombreMarca nchar(30)\n\tAS\n\tINSERT INTO Marca(codMarca,nombreMarca)\n\tSELECT @codMarca,@nombreMarca\n\tGO\n\t--INSERTAR MARCA X CONTROL\n\tCREATE PROCEDURE sp_InsertaMarcaControl\n\t@codControl varchar(10),\n\t@codMarca varchar(10)\n\tAS\n\tINSERT INTO Control_X_Marca (codControl,codMarca)\n    SELECT @codControl,@codMarca\n\tGO\n\t--ACTUALIZAR CONTROL\n\tCREATE PROCEDURE spActualizarControl\n\t@codControl varchar(10),\n\t@cantidad int,\n\t@imagen image\n\tAS\n\tUPDATE Control set cantidad=@cantidad, imagen=@imagen where codControl=@codControl\n\tGO\n\t--ELIMINAR CONTROL MARCA\n\tCREATE PROCEDURE sp_EliminarMarcaControl\n\t@codControl varchar(10)\n\tAS\n\tdelete from Control_X_Marca where codControl=@codControl\n\tGO\n--Carga de datos\n\n--CONTROL\n--EXEC sp_InsertControl 'CR7',5\n--EXEC sp_InsertControl 'CR8',5\n--EXEC sp_InsertControl 'CR10',5\n--EXEC sp_InsertControl 'CR11',5\n--EXEC sp_InsertControl 'CR14',5\n\n--MARCAS\nEXEC sp_InsertarMarca 'M01','Philips'\nEXEC sp_InsertarMarca 'M02','JVS'\nEXEC sp_InsertarMarca 'M03','Sony'\nEXEC sp_InsertarMarca 'M04','Fisher'\nEXEC sp_InsertarMarca 'M05','Toshiba'\nEXEC sp_InsertarMarca 'M06','Hitachi'\nEXEC sp_InsertarMarca 'M07','Admiral'\nEXEC sp_InsertarMarca 'M08','AIWA'\nEXEC sp_InsertarMarca 'M09','Ansonic'\nEXEC sp_InsertarMarca 'M010','APEX'\nEXEC sp_InsertarMarca 'M011','Philco'\nEXEC sp_InsertarMarca 'M012','LG'\nEXEC sp_InsertarMarca 'M013','Noblex'\nEXEC sp_InsertarMarca 'M014','Sanyo'\nEXEC sp_InsertarMarca 'M015','Top House'\nEXEC sp_InsertarMarca 'M016','Samsung'\nEXEC sp_InsertarMarca 'M017','RCA'\nEXEC sp_InsertarMarca 'M018','Panasonic'\n\n--CONTROL MARCAS\n\nEXEC sp_InsertaMarcaControl 'CR11','M011'\n\nEXEC sp_InsertaMarcaControl 'CR11','M012'\n\nEXEC sp_InsertaMarcaControl 'CR20','M09'\n\nEXEC sp_InsertaMarcaControl 'CR20','M05'\n\nEXEC sp_InsertaMarcaControl 'pro014','M03'\n\n\n--TRIGER \ngo\nCREATE trigger tr_eliminacionControl\non Control\ninstead of delete\nas\nbegin\n\tDECLARE @codControl varchar(10)\n\tSelect @codControl=codControl from deleted\n\tdelete from Control_X_Marca where codControl=@codControl \n\tdelete from Control where codControl=@codControl\n   \nend\ngo\n\n---\n\n```\n## Vistas\n\n[![Captura-de-pantalla-2022-04-27-092707.png](https://i.postimg.cc/x1S840vW/Captura-de-pantalla-2022-04-27-092707.png)](https://postimg.cc/N5pQyvP4)\n[![Captura-de-pantalla-2022-04-27-092544.png](https://i.postimg.cc/FKTKz3M4/Captura-de-pantalla-2022-04-27-092544.png)](https://postimg.cc/DWbhYJfj)\n[![Captura-de-pantalla-2022-04-27-093625.png](https://i.postimg.cc/tTfCtyRv/Captura-de-pantalla-2022-04-27-093625.png)](https://postimg.cc/34XTYsv2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesar-ignacio%2Fgestioncontroles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesar-ignacio%2Fgestioncontroles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesar-ignacio%2Fgestioncontroles/lists"}