Site Cadastro de Clientes
Por: rintintin • 11/5/2015 • Abstract • 4.036 Palavras (17 Páginas) • 425 Visualizações
ASPX
<%@ Page Title="" Language="C#" MasterPageFile="~/forum.Master" AutoEventWireup="true"
CodeBehind="frmUsuario.aspx.cs" Inherits="contabiNet.cadastro.frmUsuario" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<script runat="server">
private void On_Inserting(Object sender, SqlDataSourceCommandEventArgs e)
{
System.Data.SqlClient.SqlParameter insertedKey = new System.Data.SqlClient.SqlParameter("@idInsert", System.Data.SqlDbType.Int);
insertedKey.Direction = System.Data.ParameterDirection.Output;
e.Command.Parameters.Add(insertedKey);
}
private void On_Inserted(Object sender, SqlDataSourceStatusEventArgs e)
{
System.Data.Common.DbCommand command = e.Command;
Session["idUser"] = Convert.ToInt32(command.Parameters["@idInsert"].Value);
//tbUsuario.Text = Session["idUser"].ToString();
}
</script>
<div id="principal" style="background-image: url('../imagens/fundoBranco.png');">
<div style="background-image: url('../imagens/bgAmarelo.png');">
<div class="titulo">
<asp:Image ID="Image1" runat="server" ImageUrl="~/imagens/tUsuarioPB.png" />Cadastro
de usuário
</div>
<div>
<div class="tituloDetalhe" style="width: 600px;">
</div>
<div>
<img src="/imagens/tDetalheSeta.png" /></div>
</div>
</div>
<div class="espacoH">
</div>
<div class="subTitulo">
Informações pessoais</div>
<div class="espacoH">
</div>
<div>
Nome</div>
<div>
<asp:TextBox ID="tbNome" Width="775px" runat="server" CssClass="campo"></asp:TextBox></div>
<div>
Nascimento</div>
<div>
<dx:ASPxDateEdit ID="tbNascimento" runat="server" CssClass="campo" Width="125px">
</dx:ASPxDateEdit>
</div>
<div>
Sexo</div>
<div>
<dx:ASPxComboBox ID="cbSexo" runat="server" Width="125px" CssClass="campo">
<Items>
<dx:ListEditItem Text="Masculino" Value="M" />
<dx:ListEditItem Text="Feminino" Value="F" />
</Items>
</dx:ASPxComboBox>
</div>
<div>
CPF</div>
<div>
<asp:TextBox ID="tbCPF" runat="server" Width="120px" CssClass="campo"></asp:TextBox></div>
<div class="espacoH">
</div>
<div class="subTitulo">
Outras informações</div>
<div class="espacoH">
</div>
<div>
Email</div>
<div>
<asp:TextBox ID="tbEmail" runat="server" CssClass="campo" Width="400px"></asp:TextBox></div>
<div>
Facebook</div>
<div>
...