Beruflich Dokumente
Kultur Dokumente
caractersticas da
plataforma .NET e da linguagem C#. A pesquisa sobre a plataforma deve
abordar quais as ferramentas podem ser utilizadas para o
desenvolvimento e possveis licenas de uso.
JAVA | C# |
Java no implementa propriedades nem sobrecarga de operadores. | mas C# sim |
Java no implementa um modo inseguro que permita a manipulao de ponteiros e
aritmtica sem checagem | mas C# sim |
Java possui excees checadas, enquanto excees | em C# no so checadas como
em C++ |
Java no implementa o goto como estrutura de controle | mas C# sim |
Java utiliza-se de comentrios Javadoc para gerar documentao automtica a
partir de arquivos fonte. | C# utiliza comentrios baseados em XML para este
propsito |
{
this.codigo = codigo;
}
public String descri()
{
return this.descricao;
}
}
}
Classe Material
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Cadastro_Materiais{
class Material{
private String codigo;
private String codigo_departamento;
private DateTime data;
private String titulo;
private String conteudo;
private String codigo_usuario;
public void usuarioLogado(String codigo, String nome, Int16 tipo){
Departamento dep = new Departamento();
dep.departamento(this.codigo_departamento);
this.codigo_usuario = codigo;
if(tipo == 0){
//Permite Cadastrar
MessageBox.Show("Usurio '"+codigo+" - "+nome+"' pode realizar cadastro
e consultas!");
}else if(tipo == 1){
//Permite Apenas Consultar
MessageBox.Show("Usurio '" + codigo + " - " + nome + "' no pode realizar
cadastro apenas consultas!");
}else{
MessageBox.Show("Voc no tem permisso para acessar esse sistema!");
}
}
}
}
Classe usurio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Cadastro_Materiais{
class Usuario{
private String codigo;
private String nome;
private String login;
private String senha;
}else{
this.codigo = "";
this.nome = "";
this.tipo = 3;
}
}
}
}
Classe login using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Cadastro_Materiais{
public partial class Login : Form{
public Login(){
InitializeComponent();
}
private String login;
private String senha;
private Int16 tipo; //tipo: 0 - Admin | 1 - Comum
private void button1_Click(object sender, EventArgs e){
if (verificaCampoNull(txtlogin.Text, txtsenha.Text) == false){
Passo 4 (Equipe)
Elaborar o Relatrio 5 - Codificao do Sistema de Publicao de
Contedo com conexo com o Banco de Dados, que deve conter os
cdigos-fonte do projeto do Sistema de Publicao de Contedo,
realizando conexo com o banco de dados.
<asp:TextBox ID="txsenha" runat="server" Width="141px"></asp:TextBox>
<br />
<br />
<asp:Button ID="btlogar" runat="server" Text="Logar" />
&nb
sp; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp;
<p>
</p>
</form>
</body>
</html>
Cadastro de Usuario
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="CadastroUsuario.aspx.cs" Inherits="atps.Usuario" %>
<!DOCTYPE html>
<script runat="server">
protected void ddtipo_SelectedIndexChanged(object sender, EventArgs e)
{
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body style="width: 405px">
<form id="form1" runat="server">
<div>
<asp:Label ID="lbcodigo" Text="Codigo:" runat="server"></asp:Label>
<asp:TextBox ID="txcodigo" runat="server"
Width="143px"></asp:TextBox>
&nb
sp;
<br />
<asp:Label ID="lbnome" Text="Nome:" runat="server"></asp:Label>
<asp:TextBox ID="txnome" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lblogin" Text="Login:" runat="server"></asp:Label>
<asp:TextBox ID="txlogin" runat="server" Width="158px"></asp:TextBox>
<br />
<asp:Label ID="lbsenha" Text="Senha:" runat="server"></asp:Label>
<asp:TextBox ID="txsenha" runat="server"></asp:TextBox>
<br />
<asp:DropDownList ID="ddtipo" runat="server"
OnSelectedIndexChanged="ddtipo_SelectedIndexChanged" >
<asp:ListItem Text="Comum" Value="comum"/>
<asp:ListItem Text="Admin" Value="admin"/>
</asp:DropDownList>
<br /><br />
</html>
Cadastro de Materiais
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="CadastroMaterial.aspx.cs" Inherits="atps.Material" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 435px">
<asp:Label ID="lbcodigo" Text="Codigo:" runat="server"></asp:Label>
&nb
sp;
<asp:TextBox ID="txcodigo" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lbcodigodept" Text="Codigo Departamento:"
runat="server"></asp:Label>
<asp:TextBox ID="txcodigodept" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lbdata" Text="Data:" runat="server"></asp:Label>
&nb
sp; &
nbsp;
<asp:TextBox ID="txdata" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lbtitulo" Text="Titulo:" runat="server"></asp:Label>
&nb
sp; &
nbsp;
<asp:TextBox ID="txtiulo" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lbconteudo" Text="Conteudo:" runat="server"></asp:Label>
&nb
sp;
<asp:TextBox ID="txconteudo" runat="server"></asp:TextBox>
<br />
<asp:Label ID="lbcoduser" Text="Codigo Usuario:" runat="server"></asp:Label>
<asp:TextBox ID="txcoduser" runat="server"></asp:TextBox>
<br /><br />
<asp:Button ID="btenviar" runat="server" Text="Enviar" />
</div>
</form>
</body>
</html>
Consulta de Material
<style type="text/css">
.auto-style1 {
width: 160px;
}
.auto-style2 {
width: 246px;
height: 32px;
}
.auto-style3 {
height: 32px;
}
.auto-style4 {
height: 32px;
width: 317px;
}
.auto-style5 {
width: 317px;
}
.auto-style6 {
width: 246px;
}
</style>
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Consulta.aspx.cs" Inherits="Consulta_de_Material.Consulta" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:Panel ID="Panel1" runat="server" Height="141px">
<td class="auto-style5"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style6"> </td>
<td class="auto-style5"> </td>
<td> </td>
</tr>
</table>
<br />
</asp:Panel>
</form>
</body>
</html>
Consulta de Material
Tela 1
<style type="text/css">
.auto-style1 {
width: 160px;
}
.auto-style2 {
width: 246px;
height: 32px;
}
.auto-style3 {
height: 32px;
}
.auto-style4 {
height: 32px;
width: 317px;
}
.auto-style5 {
width: 317px;
}
.auto-style6 {
width: 246px;
}
</style>
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Consulta.aspx.cs" Inherits="Consulta_de_Material.Consulta" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:Panel ID="Panel1" runat="server" Height="141px">
<asp:Label ID="Label1" runat="server" Text="Departamento"></asp:Label>
</tr>
<tr>
<td class="auto-style6"> </td>
<td class="auto-style5"> </td>
<td> </td>
</tr>
</table>
<br />
</asp:Panel>
</form>
</body>
</html>
Tela 2
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tela2.aspx.cs"
Inherits="Tela2.Tela2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
#TextArea1 {
width: 839px;
height: 132px;
}
</style>
</head>
<body style="height: 314px">
{
}
public int Codigo
{
get { return codigo; }
set { codigo = value; }
}
public DateTime Data
{
get { return data; }
set { data = value; }
}
public String Titulo
{
get { return titulo; }
set { titulo = value; }
}
public String Conteudo
{
get { return conteudo; }
set { conteudo = value; }
}
public int Codigo_Usuario
{
get { return codigo_Usuario; }
set { codigo_Usuario = value; }
}
public int Codigo_Departamento
{
get { return codigo_Departamento; }
set { codigo_Departamento = value; }
}
}
}
Usuario:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Atps.Publicacao.Model
{
public class UsuarioMODEL
{
int codigo;
String nome;
String login;
String senha;
String tipo;
int codigo_departamento;
public UsuarioMODEL()
{
}
{
get { return codigo_departamento; }
set { codigo_departamento = value; }
}
}
}