Ir ao conteúdo
  • Cadastre-se
037leo

Sistema de Petshop

Recommended Posts

Ola estou fazendo um pequeno Trabalho para Faculdade de um sistema de petshop, estou no primeiro ano de ciclo de Analise e desenvolvimento de Sistema. Ai esta meu programinha na parte de cadastro de serviço de uma Pet Shop´. Mais estou em duvida como adicionar a Consulta, ligado ao código do serviço cadastrado. alguem pode me ajudar? a consulta esta como texo no propio programa 

 Program Pzim ;type Servico = record descricao,codigo: string; valor:real; end;  VetorServicos = array [1..10] of Servico; var ServicoC:integer; servicos:VetorServicos;   procedure CadastroServico(var posicao : integer;var Cadastro : VetorServicos); begin posicao := posicao + 1; clrscr;  			 gotoxy(10,4);			 write(#201,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#187);				 gotoxy(10,5);			 write('º               CADASTRO DE Serviço              º');			 gotoxy(10,6);			 write('º                                                º');                gotoxy(10,7);			 write('º Código :                                       º');                gotoxy(10,8);			 write('º Descrição:                                     º');                gotoxy(10,9);			 write('º Valor: R$                                      º');                gotoxy(10,10);			 write(#200,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#188);                gotoxy(20,7);			 readln(Cadastro[posicao].codigo);                gotoxy(22,8);			 readln(Cadastro[posicao].descricao);                gotoxy(21,9);			 read(Cadastro[posicao].valor); end;      //---------------------------------------------------------------------------------------------------------------   procedure Consulta_Servicos(Servicos : VetorServicos; Cadastrado : integer); var i : integer; begin clrscr; writeln(#201,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#187);// GOTOXY(10,1);writeln('             *** CLIENTES CADASTRADOS ***'); writeln('º                  *** SERVIÇOS CADASTRADOS ***                          º'); writeln('º',#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,'º'); writeln('º   CÓDIGO       º         DESCRIÇÃO               º          VALOR      º'); writeln('º',#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,'º',#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,'º',#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,'º'); for i := 1 to Cadastrado do begin 	gotoxy(1,5+i); 	write('º  ',Servicos[i].codigo); 	gotoxy(18,5+i); 	write('º ',Servicos[i].descricao); 	gotoxy(52,5+i); 	write('º ',Servicos[i].valor:2:2);	gotoxy(74,5+i);	writeln('º');	  	 end; writeln(#200,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#188); end;  //---------------------------------------------------------------------------------------------------------------------------------  {procedure Consulta_Medicamento_Codigo(Medicamentos : VetorMedicamentos; Cadastrado : INTEGER); var i,posicao : integer; ID:STRING; begin clrscr; posicao := 0;      gotoxy(10,4);	write(#201,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#187);		gotoxy(10,5);	write('º           *** PESQUISA MEDICAMENTO ***         º');	gotoxy(10,6);	write('º Código de barras:                              º');     gotoxy(10,7);	write(#200,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#188);	gotoxy(30,6);	readln(ID); clrscr; for i := 1 to Cadastrado do begin if (Medicamentos[i].codigo_barra = ID) then posicao := i; end; if (posicao > 0) then begin writeln(#201,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#187);// GOTOXY(10,1);writeln('             *** CLIENTES CADASTRADOS ***'); writeln('º                  *** MEDICAMENTO CADASTRADO ***                        º'); writeln('º',#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,'º'); writeln('º Código:                        Descrição:                              º'); writeln('º Valor: R$                                                              º');  writeln(#200,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#188); 	gotoxy(21,4); 	write(Medicamentos[posicao].codigo_barra); 	gotoxy(52,4); 	write(Medicamentos[posicao].descricao); 	gotoxy(11,5); 	write(Medicamentos[posicao].estoque); 	gotoxy(35,5); 	write(Medicamentos[posicao].valor:0:2);	  	 end else begin     gotoxy(10,4);	write(#201,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#187);		gotoxy(10,5);	write('º      *** MEDICAMENTO NÃO CADASTRADO ***        º');	gotoxy(10,6);	write('º                                                º');     gotoxy(10,7);	writeLN(#200,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#205,#188); end;  end; } Begin ServicoC:=1; CadastroServico(ServicoC,servicos); Consulta_Servicos(servicos,ServicoC);   End.

CadastroS.rar

Compartilhar este post


Link para o post
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora





Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas publicações sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×