Escolar Documentos
Profissional Documentos
Cultura Documentos
FACULDADE SO BERNARDO
So Bernardo do Campo
2015
de
Sistemas
da
Anhanguera de So Bernardo.
Orientador: Prof Fbio Antnio de Jesus
So Bernardo do Campo
2015
Faculdade
Dedicamos
este
trabalho
Componentes do Grupo.
todos
os
AGRADECIMENTOS
ndice de figuras
ndice de tabelas
Tabela 1 - comparativo C# e JAVA..............................................................................13
Sumrio
ETAPA 1.................................................................................................................. 9
Passo 1................................................................................................................ 9
Passo 2.............................................................................................................. 10
Passo 3.............................................................................................................. 14
Passo 4.............................................................................................................. 20
ETAPA 2................................................................................................................ 21
Passo 3.............................................................................................................. 21
Passo 4.............................................................................................................. 24
ETAPA 1
Passo 1
A plataforma .NET oferece recursos para o desenvolvimento e a distribuio de
software, incluindo a independncia de uma linguagem ou plataforma especifica. Em
vez de exigir que os desenvolvedores aprendam uma nova linguagem de
programao, os cdigos podem ser utilizados um ou vrias linguagens como o C#,
Visual Basic .net, Visual C++. Net e outras. O
Passo 2
Tabela C# X JAVA
Caracterstica
Java
C#
Compilado para
Raramente. O
cdigo nativo
Java quase
sempre
interpretado.
Todos os tipos
No.
derivados de
ancestral comum
Boxing e
No. Exige
Unboxing -
converso manual.
Sim.
converso de
tipos por valor
para tipos por
referncia
Structs
No.
Sim.
Enum
No.
Sim.
Passagem de
No.
parmetros por
referncia
10
Propriedades
simuladas com
mtodos Get/Set,
com alguma
dificuldade.
Eventos e
No,
Delegates
categoricamente
Atributos
No.
Ponteiros
No suportado
diretamente,
apenas
indiretamente
atravs de
referncias.
Sobrecarga de
No.
Sim.
No.
Sim.
operadores
Operadores de
converso
11
Operadores de
Um, sintaxe
cast
semelhante ao
C/C++.
No.
Sim.
Tipo numrico
No.
pouco sujeito a
erros de
representao e
programas de contabilidade
arredondamento
No.
Sim.
Campo readonly
No.
Sim.
Documentao
No.
varrer arrays e
colees
integrada em XML
Switch com
No.
strings
12
Controle sobre
No.
Sim. As palavras
estouro de faixa
numrica
Funes com
No.
nmero varivel
de parmetros
Formas do
Uma.
mtodo Main
Goto
No.
Arquivo
Um package
executvel
Java
independente do
obrigatoriamente
namespace
est associado a
um nico arquivo
pedaos menores.
.class.
Especificadores
de acesso
Quatro.
13
Diretivas de
No.
Sim.
No, mas o
Sim.
compilao
condicional (#ifdef
etc)
Destrutores
mtodoFinalize po
de ser usado.
Padronizao por
No. Duas
algum organismo
submisses da
(http://www.ecma.ch).
internacional
Sun foram
posteriormente
retiradas.
Chama APIs do
No. Mesmo o
Windows e DLLs
suporte nativo de
Sim.
alguns
compiladores
extremamente
limitado pela falta
de ponteiros na
linguagem.
Chama objetos
No.
Sim.
No.
Sim.
COM/COM+
Cria objetos
COM/COM+
14
Passo 3
Codificao das Classes do Sistema
namespace ATPS
{
class UserAdmin
{
private int Cod_user;
public int coduser
{
get { return Cod_user; }
set { Cod_user = value; }
}
private string _nome;
public string Nome
{
get { return _nome; }
set { _nome = value; }
}
private string _login;
public string Login
{
get { return _login; }
set { _login = value; }
}
private string _senha;
public string Senha
15
{
get { return _senha; }
set { _senha = value; }
}
private int Cod_Departamento;
public int CodDEP
{
get { return Cod_Departamento; }
set { Cod_Departamento = value; }
}
public void CadastrarMaterial()
{
}
public void ConsultarMaterial()
{
}
public void FazLogin()
{
}
}
}
namespace ATPS
{
class UserNormal
16
{
private int Cod_user;
public int coduser
{
get { return Cod_user; }
set { Cod_user = value; }
}
private string _nome;
public string Nome
{
get { return _nome; }
set { _nome = value; }
}
private string _login;
public string Login
{
get { return _login; }
set { _login = value; }
}
private string _senha;
public string Senha
{
get { return _senha; }
set { _senha = value; }
}
private int Cod_Departamento;
public int CodDEP
{
17
namespace ATPS
{
class Material
{
private int Cod_Material;
public int CodMat
{
get { return Cod_Material; }
set { Cod_Material = value; }
}
private int Cod_Departamento;
public int CodDep
{
get { return Cod_Departamento; }
set { Cod_Departamento = value; }
}
18
namespace ATPS
{
class login
{
19
namespace ATPS
{
class Departamento
{
private int Cod_Departamento;
public int CodDep
{
get { return Cod_Departamento; }
set { Cod_Departamento = value; }
}
private string _Descricao;
public string descricao
{
get { return _Descricao; }
20
21
ETAPA 2
Passo 3
Relatrio Interfaces do sistema de publicao
Interfaces Windows Form
22
Figura 2 - cadastro de usurio Windows form.
23
24
Passo 4
Relatrio codificao das interfaces
Cdigo fonte Windows form.
namespace ATPSwin
{
partial class Login
{
/// <summary>
/// Varivel de designer necessria.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpar os recursos que esto sendo usados.
/// </summary>
/// <param name="disposing">true se for necessrio descartar os recursos
gerenciados; caso contrrio, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Cdigo gerado pelo Windows Form Designer
/// <summary>
/// Mtodo necessrio para suporte ao Designer - no modifique
/// o contedo deste mtodo com o editor de cdigo.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
25
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Arial", 14.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(108, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 22);
this.label1.TabIndex = 0;
this.label1.Text = "LOGIN";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(57, 68);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(43, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Usurio";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(57, 115);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 2;
this.label3.Text = "Senha";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(136, 65);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 3;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(136, 112);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 4;
//
// button1
//
this.button1.Location = new System.Drawing.Point(103, 199);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
26
this.button1.TabIndex = 5;
this.button1.Text = "OK";
this.button1.UseVisualStyleBackColor = true;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 261);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "LOGIN";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
}
}
namespace ATPSwin
{
partial class Departamento
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed;
otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
27
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(62, 210);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Salvar";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.Location = new System.Drawing.Point(157, 210);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Cancelar";
this.button2.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(41, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Codigo";
//
// label3
//
this.label3.AutoSize = true;
28
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(123, 274);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(55, 17);
this.checkBox1.TabIndex = 13;
this.checkBox1.Text = "Admin";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(239, 274);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(48, 17);
this.checkBox2.TabIndex = 14;
this.checkBox2.Text = "User";
this.checkBox2.UseVisualStyleBackColor = true;
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(239, 50);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 20);
this.textBox5.TabIndex = 16;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(109, 58);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(40, 13);
this.label5.TabIndex = 15;
this.label5.Text = "Codigo";
//
// Cadastrousuario
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(423, 392);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.label5);
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.label6);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox4);
33
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Cadastrousuario";
this.Text = "Cadastrousuario";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label5;
}
}
namespace ATPSwin
{
partial class CadastroMaterial
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed;
otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
34
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(105, 290);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Salvar";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.Location = new System.Drawing.Point(247, 290);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Cancelar";
this.button2.UseVisualStyleBackColor = true;
//
// label1
35
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(102, 144);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(33, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Titulo";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(102, 182);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(30, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Data";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(102, 218);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 13);
this.label3.TabIndex = 4;
this.label3.Text = "Conteudo";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(102, 106);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(74, 13);
this.label4.TabIndex = 5;
this.label4.Text = "Departamento";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(217, 137);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 6;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(217, 211);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(148, 20);
this.textBox3.TabIndex = 8;
//
// textBox4
36
//
this.textBox4.Location = new System.Drawing.Point(217, 175);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(100, 20);
this.textBox4.TabIndex = 9;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Arial", 12F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(129, 19);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(165, 19);
this.label5.TabIndex = 10;
this.label5.Text = "Cadastro de Material";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(217, 97);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 21);
this.comboBox1.TabIndex = 11;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(217, 56);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 13;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(102, 63);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(40, 13);
this.label6.TabIndex = 12;
this.label6.Text = "Codigo";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(217, 253);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 20);
this.textBox5.TabIndex = 15;
//
// label7
//
37
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(102, 260);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(77, 13);
this.label7.TabIndex = 14;
this.label7.Text = "Codigo usuario";
//
// CadastroMaterial
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(423, 360);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.label7);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label6);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "CadastroMaterial";
this.Text = "CadastroMaterial";
this.Load += new System.EventHandler(this.CadastroMaterial_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label6;
38
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
#Select1 {
height: 22px;
}
#Text2 {
width: 119px;
}
#Text3 {
width: 119px;
}
</style>
</head>
<body>
<p>
Consulta de Materiais</p>
Departamento
<select id="Select1" name="D1">
<option></option>
</select>
<br />
<br
/>Titulo
<input id="Text1" type="text" />
<br />
<br />
Perodo
<input id="Text2" type="text" /> at
<input id="Text3" type="text" /><br />
<br />
<input id="Button1" type="button" value="Pesquisar" /><br />
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="ExibirConsulta.aspx.cs" Inherits="ATPSweb.ExibirConsulta" %>
<!DOCTYPE html>
40
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.auto-style1 {
width: 151px;
}
.auto-style2 {
text-align: center;
}
</style>
</head>
<body>
Materiais Pesquisados
<br />
<br />
<table style="width:80%;" border="1">
<tr>
<td class="auto-style1">Departamento</td>
<td> </td>
</tr>
<tr>
<td class="auto-style1">Data</td>
<td> </td>
</tr>
<tr>
<td class="auto-style1">Titulo</td>
<td> </td>
</tr>
<tr>
<td colspan="2" class="auto-style2" >Contedo</td>
</tr>
<tr>
<td colspan="2">
<br />
<br />
<br />
<br />
</td>
</tr>
</table>
<br />
</body>
41
</html>
42