initial commit

This commit is contained in:
2021-09-02 08:04:56 -03:00
commit 6c991cf4a3
48 changed files with 16698 additions and 0 deletions

View File

@@ -0,0 +1,276 @@
namespace ProjetoLPVIII
{
partial class Cadastro_de_Clientes
{
/// <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();
}
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.lblNome = new System.Windows.Forms.Label();
this.txtNome = new System.Windows.Forms.TextBox();
this.lblCpf = new System.Windows.Forms.Label();
this.txtCpf = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.lblRg = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtRg = new System.Windows.Forms.TextBox();
this.txtTel = new System.Windows.Forms.TextBox();
this.txtCelular = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtRua = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtNumero = new System.Windows.Forms.TextBox();
this.txtCidade = new System.Windows.Forms.TextBox();
this.btnSalvar = new System.Windows.Forms.Button();
this.btnLimpar = new System.Windows.Forms.Button();
this.statusLivro = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// lblNome
//
this.lblNome.AutoSize = true;
this.lblNome.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblNome.Location = new System.Drawing.Point(24, 39);
this.lblNome.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblNome.Name = "lblNome";
this.lblNome.Size = new System.Drawing.Size(53, 16);
this.lblNome.TabIndex = 0;
this.lblNome.Text = "Nome:";
//
// txtNome
//
this.txtNome.Location = new System.Drawing.Point(98, 39);
this.txtNome.Margin = new System.Windows.Forms.Padding(4);
this.txtNome.Name = "txtNome";
this.txtNome.Size = new System.Drawing.Size(326, 22);
this.txtNome.TabIndex = 1;
//
// lblCpf
//
this.lblCpf.AutoSize = true;
this.lblCpf.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCpf.Location = new System.Drawing.Point(24, 69);
this.lblCpf.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblCpf.Name = "lblCpf";
this.lblCpf.Size = new System.Drawing.Size(41, 16);
this.lblCpf.TabIndex = 2;
this.lblCpf.Text = "CPF:";
//
// txtCpf
//
this.txtCpf.Location = new System.Drawing.Point(98, 69);
this.txtCpf.Margin = new System.Windows.Forms.Padding(4);
this.txtCpf.Name = "txtCpf";
this.txtCpf.Size = new System.Drawing.Size(326, 22);
this.txtCpf.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(24, 101);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 16);
this.label1.TabIndex = 4;
this.label1.Text = "Celular: ";
//
// lblRg
//
this.lblRg.AutoSize = true;
this.lblRg.Location = new System.Drawing.Point(467, 45);
this.lblRg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblRg.Name = "lblRg";
this.lblRg.Size = new System.Drawing.Size(34, 16);
this.lblRg.TabIndex = 5;
this.lblRg.Text = "RG:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(467, 70);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 16);
this.label2.TabIndex = 6;
this.label2.Text = "Telefone:";
//
// txtRg
//
this.txtRg.Location = new System.Drawing.Point(508, 39);
this.txtRg.Name = "txtRg";
this.txtRg.Size = new System.Drawing.Size(282, 22);
this.txtRg.TabIndex = 7;
//
// txtTel
//
this.txtTel.Location = new System.Drawing.Point(547, 67);
this.txtTel.Name = "txtTel";
this.txtTel.Size = new System.Drawing.Size(242, 22);
this.txtTel.TabIndex = 8;
//
// txtCelular
//
this.txtCelular.Location = new System.Drawing.Point(98, 98);
this.txtCelular.Name = "txtCelular";
this.txtCelular.Size = new System.Drawing.Size(326, 22);
this.txtCelular.TabIndex = 9;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(467, 101);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 16);
this.label3.TabIndex = 10;
this.label3.Text = "Rua:";
//
// txtRua
//
this.txtRua.Location = new System.Drawing.Point(523, 98);
this.txtRua.Name = "txtRua";
this.txtRua.Size = new System.Drawing.Size(267, 22);
this.txtRua.TabIndex = 11;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(26, 132);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(66, 16);
this.label4.TabIndex = 12;
this.label4.Text = "Número:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(467, 129);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(62, 16);
this.label5.TabIndex = 13;
this.label5.Text = "Cidade:";
//
// txtNumero
//
this.txtNumero.Location = new System.Drawing.Point(98, 129);
this.txtNumero.Name = "txtNumero";
this.txtNumero.Size = new System.Drawing.Size(326, 22);
this.txtNumero.TabIndex = 14;
//
// txtCidade
//
this.txtCidade.Location = new System.Drawing.Point(553, 126);
this.txtCidade.Name = "txtCidade";
this.txtCidade.Size = new System.Drawing.Size(237, 22);
this.txtCidade.TabIndex = 15;
//
// btnSalvar
//
this.btnSalvar.Location = new System.Drawing.Point(430, 194);
this.btnSalvar.Name = "btnSalvar";
this.btnSalvar.Size = new System.Drawing.Size(75, 23);
this.btnSalvar.TabIndex = 16;
this.btnSalvar.Text = "Salvar";
this.btnSalvar.UseVisualStyleBackColor = true;
this.btnSalvar.Click += new System.EventHandler(this.btnSalvar_Click);
//
// btnLimpar
//
this.btnLimpar.Location = new System.Drawing.Point(349, 194);
this.btnLimpar.Name = "btnLimpar";
this.btnLimpar.Size = new System.Drawing.Size(75, 23);
this.btnLimpar.TabIndex = 17;
this.btnLimpar.Text = "Limpar";
this.btnLimpar.UseVisualStyleBackColor = true;
//
// statusLivro
//
this.statusLivro.FormattingEnabled = true;
this.statusLivro.Items.AddRange(new object[] {
"ATIVO",
"DESATIVADO"});
this.statusLivro.Location = new System.Drawing.Point(27, 193);
this.statusLivro.Name = "statusLivro";
this.statusLivro.Size = new System.Drawing.Size(314, 24);
this.statusLivro.TabIndex = 57;
this.statusLivro.Text = "Ativado?";
//
// Cadastro_de_Clientes
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(842, 238);
this.Controls.Add(this.statusLivro);
this.Controls.Add(this.btnLimpar);
this.Controls.Add(this.btnSalvar);
this.Controls.Add(this.txtCidade);
this.Controls.Add(this.txtNumero);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.txtRua);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtCelular);
this.Controls.Add(this.txtTel);
this.Controls.Add(this.txtRg);
this.Controls.Add(this.label2);
this.Controls.Add(this.lblRg);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtCpf);
this.Controls.Add(this.lblCpf);
this.Controls.Add(this.txtNome);
this.Controls.Add(this.lblNome);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Cadastro_de_Clientes";
this.Text = "Cadastro de Clientes";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblNome;
private System.Windows.Forms.TextBox txtNome;
private System.Windows.Forms.Label lblCpf;
private System.Windows.Forms.TextBox txtCpf;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblRg;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtRg;
private System.Windows.Forms.TextBox txtTel;
private System.Windows.Forms.TextBox txtCelular;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtRua;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtNumero;
private System.Windows.Forms.TextBox txtCidade;
private System.Windows.Forms.Button btnSalvar;
private System.Windows.Forms.Button btnLimpar;
private System.Windows.Forms.ComboBox statusLivro;
}
}

View File

@@ -0,0 +1,58 @@
using System;
using System.Data.SqlClient;
using System.Windows.Forms;
using CSharpLibrary.SqlTypes;
namespace ProjetoLPVIII
{
public partial class Cadastro_de_Clientes : Form
{
public Cadastro_de_Clientes()
{
InitializeComponent();
}
private void Clean()
{
txtNome.Clear();
txtRg.Clear();
txtCpf.Clear();
txtTel.Clear();
txtCelular.Clear();
txtRua.Clear();
txtNumero.Clear();
txtCidade.Clear();
statusLivro.SelectedIndex = 0;
}
private void btnSalvar_Click(object sender, EventArgs e)
{
SqlException sql = null;
try
{
Cliente c1 = new Cliente(null,
txtNome.Text,
txtRg.Text,
txtCpf.Text,
txtTel.Text,
txtCelular.Text,
txtRua.Text,
txtNumero.Text,
txtCidade.Text,
statusLivro.SelectedItem.ToString()
);
c1.Add();
}
catch (SqlException g)
{
sql = g;
MessageBox.Show("Falha no cadastro!");
}
if (sql == null)
{
MessageBox.Show("Cliente Cadastrado!");
Clean();
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

325
stuff/Cliente/ConsultaCliente.Designer.cs generated Normal file
View File

@@ -0,0 +1,325 @@
namespace TelasProjeto
{
partial class formConsultarCliente
{
/// <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();
}
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.lblCadastrarCliente = new System.Windows.Forms.Label();
this.txtCidade = new System.Windows.Forms.TextBox();
this.lblCidade = new System.Windows.Forms.Label();
this.txtNumero = new System.Windows.Forms.TextBox();
this.lblNumero = new System.Windows.Forms.Label();
this.txtRua = new System.Windows.Forms.TextBox();
this.lblRua = new System.Windows.Forms.Label();
this.txtTel = new System.Windows.Forms.TextBox();
this.lblTel = new System.Windows.Forms.Label();
this.txtCelular = new System.Windows.Forms.TextBox();
this.lblCel = new System.Windows.Forms.Label();
this.txtCPF = new System.Windows.Forms.TextBox();
this.lblCPF = new System.Windows.Forms.Label();
this.lblRG = new System.Windows.Forms.Label();
this.lblNomeCliente = new System.Windows.Forms.Label();
this.btnConsultarCliente = new System.Windows.Forms.Button();
this.txtRG = new System.Windows.Forms.TextBox();
this.txtNomeCliente = new System.Windows.Forms.TextBox();
this.btnAlterarCliente = new System.Windows.Forms.Button();
this.statusCliente = new System.Windows.Forms.ComboBox();
this.btnSalvarCliente = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblCadastrarCliente
//
this.lblCadastrarCliente.AutoSize = true;
this.lblCadastrarCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCadastrarCliente.Location = new System.Drawing.Point(155, 34);
this.lblCadastrarCliente.Name = "lblCadastrarCliente";
this.lblCadastrarCliente.Size = new System.Drawing.Size(169, 24);
this.lblCadastrarCliente.TabIndex = 35;
this.lblCadastrarCliente.Text = "Consultar Cliente";
//
// txtCidade
//
this.txtCidade.Enabled = false;
this.txtCidade.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCidade.Location = new System.Drawing.Point(105, 261);
this.txtCidade.Name = "txtCidade";
this.txtCidade.Size = new System.Drawing.Size(314, 24);
this.txtCidade.TabIndex = 34;
//
// lblCidade
//
this.lblCidade.AutoSize = true;
this.lblCidade.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCidade.Location = new System.Drawing.Point(46, 264);
this.lblCidade.Name = "lblCidade";
this.lblCidade.Size = new System.Drawing.Size(58, 18);
this.lblCidade.TabIndex = 33;
this.lblCidade.Text = "Cidade:";
//
// txtNumero
//
this.txtNumero.Enabled = false;
this.txtNumero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtNumero.Location = new System.Drawing.Point(369, 222);
this.txtNumero.Name = "txtNumero";
this.txtNumero.Size = new System.Drawing.Size(50, 24);
this.txtNumero.TabIndex = 32;
//
// lblNumero
//
this.lblNumero.AutoSize = true;
this.lblNumero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblNumero.Location = new System.Drawing.Point(345, 225);
this.lblNumero.Name = "lblNumero";
this.lblNumero.Size = new System.Drawing.Size(28, 18);
this.lblNumero.TabIndex = 31;
this.lblNumero.Text = "Nº:";
//
// txtRua
//
this.txtRua.Enabled = false;
this.txtRua.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRua.Location = new System.Drawing.Point(105, 222);
this.txtRua.Name = "txtRua";
this.txtRua.Size = new System.Drawing.Size(234, 24);
this.txtRua.TabIndex = 30;
//
// lblRua
//
this.lblRua.AutoSize = true;
this.lblRua.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRua.Location = new System.Drawing.Point(46, 225);
this.lblRua.Name = "lblRua";
this.lblRua.Size = new System.Drawing.Size(39, 18);
this.lblRua.TabIndex = 29;
this.lblRua.Text = "Rua:";
//
// txtTel
//
this.txtTel.Enabled = false;
this.txtTel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtTel.Location = new System.Drawing.Point(305, 184);
this.txtTel.Name = "txtTel";
this.txtTel.Size = new System.Drawing.Size(114, 24);
this.txtTel.TabIndex = 28;
//
// lblTel
//
this.lblTel.AutoSize = true;
this.lblTel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTel.Location = new System.Drawing.Point(230, 187);
this.lblTel.Name = "lblTel";
this.lblTel.Size = new System.Drawing.Size(69, 18);
this.lblTel.TabIndex = 27;
this.lblTel.Text = "Telefone:";
//
// txtCelular
//
this.txtCelular.Enabled = false;
this.txtCelular.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCelular.Location = new System.Drawing.Point(105, 184);
this.txtCelular.Name = "txtCelular";
this.txtCelular.Size = new System.Drawing.Size(119, 24);
this.txtCelular.TabIndex = 26;
//
// lblCel
//
this.lblCel.AutoSize = true;
this.lblCel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCel.Location = new System.Drawing.Point(46, 187);
this.lblCel.Name = "lblCel";
this.lblCel.Size = new System.Drawing.Size(58, 18);
this.lblCel.TabIndex = 25;
this.lblCel.Text = "Celular:";
//
// txtCPF
//
this.txtCPF.Enabled = false;
this.txtCPF.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCPF.Location = new System.Drawing.Point(105, 145);
this.txtCPF.Name = "txtCPF";
this.txtCPF.Size = new System.Drawing.Size(314, 24);
this.txtCPF.TabIndex = 24;
//
// lblCPF
//
this.lblCPF.AutoSize = true;
this.lblCPF.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCPF.Location = new System.Drawing.Point(46, 148);
this.lblCPF.Name = "lblCPF";
this.lblCPF.Size = new System.Drawing.Size(42, 18);
this.lblCPF.TabIndex = 23;
this.lblCPF.Text = "CPF:";
//
// lblRG
//
this.lblRG.AutoSize = true;
this.lblRG.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRG.Location = new System.Drawing.Point(46, 111);
this.lblRG.Name = "lblRG";
this.lblRG.Size = new System.Drawing.Size(35, 18);
this.lblRG.TabIndex = 22;
this.lblRG.Text = "RG:";
//
// lblNomeCliente
//
this.lblNomeCliente.AutoSize = true;
this.lblNomeCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblNomeCliente.Location = new System.Drawing.Point(46, 71);
this.lblNomeCliente.Name = "lblNomeCliente";
this.lblNomeCliente.Size = new System.Drawing.Size(53, 18);
this.lblNomeCliente.TabIndex = 21;
this.lblNomeCliente.Text = "Nome:";
//
// btnConsultarCliente
//
this.btnConsultarCliente.FlatAppearance.BorderSize = 3;
this.btnConsultarCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnConsultarCliente.Location = new System.Drawing.Point(73, 347);
this.btnConsultarCliente.Name = "btnConsultarCliente";
this.btnConsultarCliente.Size = new System.Drawing.Size(102, 32);
this.btnConsultarCliente.TabIndex = 20;
this.btnConsultarCliente.Text = "Consultar";
this.btnConsultarCliente.UseMnemonic = false;
this.btnConsultarCliente.UseVisualStyleBackColor = true;
this.btnConsultarCliente.Click += new System.EventHandler(this.btnConsultarCliente_Click);
//
// txtRG
//
this.txtRG.Enabled = false;
this.txtRG.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRG.Location = new System.Drawing.Point(105, 108);
this.txtRG.Name = "txtRG";
this.txtRG.Size = new System.Drawing.Size(314, 24);
this.txtRG.TabIndex = 19;
//
// txtNomeCliente
//
this.txtNomeCliente.Enabled = false;
this.txtNomeCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtNomeCliente.Location = new System.Drawing.Point(105, 68);
this.txtNomeCliente.Name = "txtNomeCliente";
this.txtNomeCliente.Size = new System.Drawing.Size(314, 24);
this.txtNomeCliente.TabIndex = 18;
//
// btnAlterarCliente
//
this.btnAlterarCliente.FlatAppearance.BorderSize = 3;
this.btnAlterarCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAlterarCliente.Location = new System.Drawing.Point(181, 347);
this.btnAlterarCliente.Name = "btnAlterarCliente";
this.btnAlterarCliente.Size = new System.Drawing.Size(102, 32);
this.btnAlterarCliente.TabIndex = 36;
this.btnAlterarCliente.Text = "Alterar";
this.btnAlterarCliente.UseMnemonic = false;
this.btnAlterarCliente.UseVisualStyleBackColor = true;
this.btnAlterarCliente.Click += new System.EventHandler(this.btnAlterarCliente_Click);
//
// statusCliente
//
this.statusCliente.Enabled = false;
this.statusCliente.FormattingEnabled = true;
this.statusCliente.Items.AddRange(new object[] {
"ATIVO",
"DESATIVADO"});
this.statusCliente.Location = new System.Drawing.Point(289, 291);
this.statusCliente.Name = "statusCliente";
this.statusCliente.Size = new System.Drawing.Size(130, 21);
this.statusCliente.TabIndex = 38;
//
// btnSalvarCliente
//
this.btnSalvarCliente.FlatAppearance.BorderSize = 3;
this.btnSalvarCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSalvarCliente.Location = new System.Drawing.Point(289, 347);
this.btnSalvarCliente.Name = "btnSalvarCliente";
this.btnSalvarCliente.Size = new System.Drawing.Size(102, 32);
this.btnSalvarCliente.TabIndex = 37;
this.btnSalvarCliente.Text = "Salvar";
this.btnSalvarCliente.UseMnemonic = false;
this.btnSalvarCliente.UseVisualStyleBackColor = true;
this.btnSalvarCliente.Click += new System.EventHandler(this.btnSalvarCliente_Click);
//
// formConsultarCliente
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(476, 423);
this.Controls.Add(this.statusCliente);
this.Controls.Add(this.btnSalvarCliente);
this.Controls.Add(this.btnAlterarCliente);
this.Controls.Add(this.lblCadastrarCliente);
this.Controls.Add(this.txtCidade);
this.Controls.Add(this.lblCidade);
this.Controls.Add(this.txtNumero);
this.Controls.Add(this.lblNumero);
this.Controls.Add(this.txtRua);
this.Controls.Add(this.lblRua);
this.Controls.Add(this.txtTel);
this.Controls.Add(this.lblTel);
this.Controls.Add(this.txtCelular);
this.Controls.Add(this.lblCel);
this.Controls.Add(this.txtCPF);
this.Controls.Add(this.lblCPF);
this.Controls.Add(this.lblRG);
this.Controls.Add(this.lblNomeCliente);
this.Controls.Add(this.btnConsultarCliente);
this.Controls.Add(this.txtRG);
this.Controls.Add(this.txtNomeCliente);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "formConsultarCliente";
this.Text = "Consultar Cliente";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblCadastrarCliente;
private System.Windows.Forms.TextBox txtCidade;
private System.Windows.Forms.Label lblCidade;
private System.Windows.Forms.TextBox txtNumero;
private System.Windows.Forms.Label lblNumero;
private System.Windows.Forms.TextBox txtRua;
private System.Windows.Forms.Label lblRua;
private System.Windows.Forms.TextBox txtTel;
private System.Windows.Forms.Label lblTel;
private System.Windows.Forms.TextBox txtCelular;
private System.Windows.Forms.Label lblCel;
private System.Windows.Forms.TextBox txtCPF;
private System.Windows.Forms.Label lblCPF;
private System.Windows.Forms.Label lblRG;
private System.Windows.Forms.Label lblNomeCliente;
private System.Windows.Forms.Button btnConsultarCliente;
private System.Windows.Forms.TextBox txtRG;
private System.Windows.Forms.TextBox txtNomeCliente;
private System.Windows.Forms.Button btnAlterarCliente;
private System.Windows.Forms.ComboBox statusCliente;
private System.Windows.Forms.Button btnSalvarCliente;
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Windows.Forms;
using CSharpLibrary.SqlTypes;
using CSharpLibrary.stuff;
namespace TelasProjeto
{
public partial class formConsultarCliente : Form
{
public Cliente c1;
int id;
public formConsultarCliente()
{
InitializeComponent();
}
private void btnConsultarCliente_Click(object sender, EventArgs e)
{
search srch = new search(this, 7);
srch.Show();
}
public void UpdateTxt()
{
id = (int)c1.id;
txtNomeCliente.Text = c1.nome;
txtNumero.Text = c1.num;
txtCelular.Text = c1.cel;
txtCidade.Text = c1.cidade;
txtCPF.Text = c1.cpf;
txtRG.Text = c1.rg;
txtRua.Text = c1.rua;
txtTel.Text = c1.tel;
statusCliente.Text = c1.STATUS_PESSOA;
}
private void btnAlterarCliente_Click(object sender, EventArgs e)
{
if (c1 != null)
{
txtNomeCliente.Enabled =
txtNumero.Enabled =
txtCelular.Enabled =
txtCidade.Enabled =
txtCPF.Enabled =
txtRG.Enabled =
txtRua.Enabled =
txtTel.Enabled =
statusCliente.Enabled = true;
}
}
private void btnSalvarCliente_Click(object sender, EventArgs e)
{
SqlException sql = null;
try
{
if (c1 != null)
{
c1.Edit(
id, new List<string>
{
txtNomeCliente.Text,
txtNumero.Text,
txtCelular.Text,
txtCidade.Text,
txtCPF.Text,
txtRG.Text ,
txtRua.Text,
txtTel.Text,
statusCliente.SelectedItem.ToString()
});
}
}
catch (SqlException g)
{
sql = g;
MessageBox.Show("Falha na alteração de dados!");
}
if (sql == null)
{
MessageBox.Show("Dados atualizados!");
this.Close();
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>