initial commit
This commit is contained in:
276
stuff/Cliente/Cadastro_de_Clientes.Designer.cs
generated
Normal file
276
stuff/Cliente/Cadastro_de_Clientes.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
58
stuff/Cliente/Cadastro_de_Clientes.cs
Normal file
58
stuff/Cliente/Cadastro_de_Clientes.cs
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Cliente/Cadastro_de_Clientes.resx
Normal file
120
stuff/Cliente/Cadastro_de_Clientes.resx
Normal 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
325
stuff/Cliente/ConsultaCliente.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
88
stuff/Cliente/ConsultaCliente.cs
Normal file
88
stuff/Cliente/ConsultaCliente.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Cliente/ConsultaCliente.resx
Normal file
120
stuff/Cliente/ConsultaCliente.resx
Normal 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>
|
67
stuff/Consulta.Designer.cs
generated
Normal file
67
stuff/Consulta.Designer.cs
generated
Normal file
@ -0,0 +1,67 @@
|
||||
namespace CSharpLibrary.stuff
|
||||
{
|
||||
partial class Consulta
|
||||
{
|
||||
/// <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.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToOrderColumns = true;
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(12, 12);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(962, 373);
|
||||
this.dataGridView1.TabIndex = 61;
|
||||
this.dataGridView1.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDoubleClick);
|
||||
//
|
||||
// Consulta
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(985, 445);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "Consulta";
|
||||
this.Text = "Ver Empréstimos";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
}
|
||||
}
|
53
stuff/Consulta.cs
Normal file
53
stuff/Consulta.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using CSharpLibrary.SqlTypes;
|
||||
using CSharpLibrary.stuff.Item;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CSharpLibrary.stuff
|
||||
{
|
||||
public partial class Consulta : Form
|
||||
{
|
||||
public Consulta()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataSet ds = ReturnTypes.DSReturnEmprestimoAtivo();
|
||||
dataGridView1.DataSource = ds;
|
||||
dataGridView1.DataMember = ds.Tables[0].TableName;
|
||||
}
|
||||
public void Restart()
|
||||
{
|
||||
DataSet ds = ReturnTypes.DSReturnEmprestimoAtivo();
|
||||
dataGridView1.DataSource = ds;
|
||||
dataGridView1.DataMember = ds.Tables[0].TableName;
|
||||
}
|
||||
|
||||
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
|
||||
{
|
||||
int tmp = 0, i = e.RowIndex;
|
||||
List<Tuple<int, string>> a = new List<Tuple<int, string>>();
|
||||
foreach (DataGridViewRow datarow in dataGridView1.Rows)
|
||||
{
|
||||
foreach (DataGridViewCell c in datarow.Cells)
|
||||
{
|
||||
if (c.RowIndex == i)
|
||||
{
|
||||
if (c.ColumnIndex == 0)
|
||||
tmp = (int)c.Value;
|
||||
else
|
||||
{
|
||||
a.Add(
|
||||
new Tuple<int, string>(tmp, c.Value.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
AlterarEmprestimo f = new AlterarEmprestimo(tmp, this);
|
||||
f.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Consulta.resx
Normal file
120
stuff/Consulta.resx
Normal 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>
|
253
stuff/Item/AlterarEmprestimo.Designer.cs
generated
Normal file
253
stuff/Item/AlterarEmprestimo.Designer.cs
generated
Normal file
@ -0,0 +1,253 @@
|
||||
namespace CSharpLibrary.stuff.Item
|
||||
{
|
||||
partial class AlterarEmprestimo
|
||||
{
|
||||
/// <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.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
|
||||
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
|
||||
this.psqItem = new System.Windows.Forms.Button();
|
||||
this.psqCli = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtNomeFuncionario = new System.Windows.Forms.TextBox();
|
||||
this.btnSalvar = new System.Windows.Forms.Button();
|
||||
this.btnLimpar = new System.Windows.Forms.Button();
|
||||
this.txtNomeItem = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtNomeCliente = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnAlterar = new System.Windows.Forms.Button();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dateTimePicker2
|
||||
//
|
||||
this.dateTimePicker2.Location = new System.Drawing.Point(155, 147);
|
||||
this.dateTimePicker2.Name = "dateTimePicker2";
|
||||
this.dateTimePicker2.Size = new System.Drawing.Size(262, 20);
|
||||
this.dateTimePicker2.TabIndex = 78;
|
||||
//
|
||||
// dateTimePicker1
|
||||
//
|
||||
this.dateTimePicker1.Location = new System.Drawing.Point(155, 119);
|
||||
this.dateTimePicker1.Name = "dateTimePicker1";
|
||||
this.dateTimePicker1.Size = new System.Drawing.Size(262, 20);
|
||||
this.dateTimePicker1.TabIndex = 77;
|
||||
//
|
||||
// psqItem
|
||||
//
|
||||
this.psqItem.Enabled = false;
|
||||
this.psqItem.Location = new System.Drawing.Point(440, 81);
|
||||
this.psqItem.Name = "psqItem";
|
||||
this.psqItem.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqItem.TabIndex = 76;
|
||||
this.psqItem.Text = "Pesquisar";
|
||||
this.psqItem.UseVisualStyleBackColor = true;
|
||||
this.psqItem.Click += new System.EventHandler(this.psqItem_Click);
|
||||
//
|
||||
// psqCli
|
||||
//
|
||||
this.psqCli.Enabled = false;
|
||||
this.psqCli.Location = new System.Drawing.Point(440, 25);
|
||||
this.psqCli.Name = "psqCli";
|
||||
this.psqCli.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqCli.TabIndex = 74;
|
||||
this.psqCli.Text = "Pesquisar";
|
||||
this.psqCli.UseVisualStyleBackColor = true;
|
||||
this.psqCli.Click += new System.EventHandler(this.psqCli_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(23, 58);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(93, 16);
|
||||
this.label2.TabIndex = 73;
|
||||
this.label2.Text = "Funcionario:";
|
||||
//
|
||||
// txtNomeFuncionario
|
||||
//
|
||||
this.txtNomeFuncionario.Enabled = false;
|
||||
this.txtNomeFuncionario.Location = new System.Drawing.Point(137, 54);
|
||||
this.txtNomeFuncionario.Name = "txtNomeFuncionario";
|
||||
this.txtNomeFuncionario.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeFuncionario.TabIndex = 72;
|
||||
//
|
||||
// btnSalvar
|
||||
//
|
||||
this.btnSalvar.Enabled = false;
|
||||
this.btnSalvar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSalvar.Location = new System.Drawing.Point(188, 195);
|
||||
this.btnSalvar.Name = "btnSalvar";
|
||||
this.btnSalvar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSalvar.TabIndex = 71;
|
||||
this.btnSalvar.Text = "Salvar";
|
||||
this.btnSalvar.UseVisualStyleBackColor = true;
|
||||
this.btnSalvar.Click += new System.EventHandler(this.btnSalvar_Click);
|
||||
//
|
||||
// btnLimpar
|
||||
//
|
||||
this.btnLimpar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLimpar.Location = new System.Drawing.Point(26, 195);
|
||||
this.btnLimpar.Name = "btnLimpar";
|
||||
this.btnLimpar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnLimpar.TabIndex = 70;
|
||||
this.btnLimpar.Text = "Limpar";
|
||||
this.btnLimpar.UseVisualStyleBackColor = true;
|
||||
this.btnLimpar.Click += new System.EventHandler(this.btnLimpar_Click);
|
||||
//
|
||||
// txtNomeItem
|
||||
//
|
||||
this.txtNomeItem.Enabled = false;
|
||||
this.txtNomeItem.Location = new System.Drawing.Point(137, 83);
|
||||
this.txtNomeItem.Name = "txtNomeItem";
|
||||
this.txtNomeItem.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeItem.TabIndex = 69;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label7.Location = new System.Drawing.Point(23, 147);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(125, 16);
|
||||
this.label7.TabIndex = 68;
|
||||
this.label7.Text = "Data de Entrega:";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label6.Location = new System.Drawing.Point(23, 119);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(125, 16);
|
||||
this.label6.TabIndex = 67;
|
||||
this.label6.Text = "Data de retirada:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point(23, 83);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(41, 16);
|
||||
this.label5.TabIndex = 66;
|
||||
this.label5.Text = "Item:";
|
||||
//
|
||||
// txtNomeCliente
|
||||
//
|
||||
this.txtNomeCliente.Enabled = false;
|
||||
this.txtNomeCliente.Location = new System.Drawing.Point(137, 27);
|
||||
this.txtNomeCliente.Name = "txtNomeCliente";
|
||||
this.txtNomeCliente.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeCliente.TabIndex = 65;
|
||||
//
|
||||
// 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(22, 31);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(60, 16);
|
||||
this.label1.TabIndex = 64;
|
||||
this.label1.Text = "Cliente:";
|
||||
//
|
||||
// btnAlterar
|
||||
//
|
||||
this.btnAlterar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAlterar.Location = new System.Drawing.Point(107, 195);
|
||||
this.btnAlterar.Name = "btnAlterar";
|
||||
this.btnAlterar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnAlterar.TabIndex = 79;
|
||||
this.btnAlterar.Text = "Alterar";
|
||||
this.btnAlterar.UseVisualStyleBackColor = true;
|
||||
this.btnAlterar.Click += new System.EventHandler(this.btnAlterar_Click);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(440, 149);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.checkBox1.Size = new System.Drawing.Size(75, 17);
|
||||
this.checkBox1.TabIndex = 80;
|
||||
this.checkBox1.Text = "Entregue?";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// AlterarEmprestimo
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(529, 243);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.btnAlterar);
|
||||
this.Controls.Add(this.dateTimePicker2);
|
||||
this.Controls.Add(this.dateTimePicker1);
|
||||
this.Controls.Add(this.psqItem);
|
||||
this.Controls.Add(this.psqCli);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.txtNomeFuncionario);
|
||||
this.Controls.Add(this.btnSalvar);
|
||||
this.Controls.Add(this.btnLimpar);
|
||||
this.Controls.Add(this.txtNomeItem);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.txtNomeCliente);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "AlterarEmprestimo";
|
||||
this.Text = "AlterarEmprestimo";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AlterarEmprestimo_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DateTimePicker dateTimePicker2;
|
||||
private System.Windows.Forms.DateTimePicker dateTimePicker1;
|
||||
private System.Windows.Forms.Button psqItem;
|
||||
private System.Windows.Forms.Button psqCli;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtNomeFuncionario;
|
||||
private System.Windows.Forms.Button btnSalvar;
|
||||
private System.Windows.Forms.Button btnLimpar;
|
||||
private System.Windows.Forms.TextBox txtNomeItem;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtNomeCliente;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnAlterar;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
}
|
||||
}
|
106
stuff/Item/AlterarEmprestimo.cs
Normal file
106
stuff/Item/AlterarEmprestimo.cs
Normal file
@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Windows.Forms;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
|
||||
namespace CSharpLibrary.stuff.Item
|
||||
{
|
||||
public partial class AlterarEmprestimo : Form
|
||||
{
|
||||
public Emprestimo ed = null;
|
||||
public CSharpLibrary.SqlTypes.Item i = null;
|
||||
public Funcionario f = null;
|
||||
public Cliente c = null;
|
||||
string str;
|
||||
Consulta ce = null;
|
||||
public AlterarEmprestimo(int id, Consulta ce)
|
||||
{
|
||||
|
||||
this.ce = ce;
|
||||
InitializeComponent();
|
||||
ed = ReturnTypes.AReturnEmprestimo(id);
|
||||
i = ReturnTypes.AReturnItem(ed.idItem);
|
||||
f = ReturnTypes.AReturnFuncionario(ed.idFunc);
|
||||
c = ReturnTypes.AReturnCliente(ed.idCliente);
|
||||
|
||||
txtNomeCliente.Text = c.nome;
|
||||
txtNomeItem.Text = i.nomeItem;
|
||||
txtNomeFuncionario.Text = f.nome;
|
||||
dateTimePicker1.Value = ed.dtEmprestimo;
|
||||
dateTimePicker2.Value = ed.dtDevolucao;
|
||||
checkBox1.Checked = (ed.statusEmprestimo.ToUpper() == "EMPRESTADO") ? false : true;
|
||||
|
||||
}
|
||||
|
||||
private void btnLimpar_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNomeCliente.Clear();
|
||||
txtNomeItem.Clear();
|
||||
dateTimePicker1.ResetText();
|
||||
dateTimePicker2.ResetText();
|
||||
checkBox1.Checked = false;
|
||||
}
|
||||
|
||||
private void btnAlterar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(ed != null && f != null && i != null && c != null)
|
||||
{
|
||||
btnSalvar.Enabled = true;
|
||||
psqCli.Enabled = true;
|
||||
psqItem.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void psqCli_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 7);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 5);
|
||||
srch.Show();
|
||||
}
|
||||
public void UpdateTxt()
|
||||
{
|
||||
txtNomeCliente.Text = c.nome;
|
||||
txtNomeItem.Text = i.nomeItem;
|
||||
txtNomeFuncionario.Text = f.nome;
|
||||
dateTimePicker1.Value = ed.dtEmprestimo;
|
||||
dateTimePicker2.Value = ed.dtDevolucao;
|
||||
checkBox1.Checked = (ed.statusEmprestimo.ToUpper() == "EMPRESTADO") ? false : true;
|
||||
}
|
||||
private void btnSalvar_Click(object sender, EventArgs e)
|
||||
{
|
||||
SqlException sql = null;
|
||||
try {
|
||||
str = (checkBox1.Checked == true) ? "ENTREGUE" : "EMPRESTADO";
|
||||
ed.Edit(ed.idEmprestimo, new List<string> {
|
||||
f.nome,
|
||||
c.nome,
|
||||
i.nomeItem,
|
||||
dateTimePicker1.Value.ToString(),
|
||||
dateTimePicker2.Value.ToString(),
|
||||
str
|
||||
});
|
||||
}
|
||||
catch (SqlException g)
|
||||
{
|
||||
sql = g;
|
||||
MessageBox.Show("Falha na alteração de dados!");
|
||||
}
|
||||
if (sql == null)
|
||||
{
|
||||
MessageBox.Show("Dados atualizados!");
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void AlterarEmprestimo_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
ce.Restart();
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Item/AlterarEmprestimo.resx
Normal file
120
stuff/Item/AlterarEmprestimo.resx
Normal 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>
|
292
stuff/Item/AlterarLivro.Designer.cs
generated
Normal file
292
stuff/Item/AlterarLivro.Designer.cs
generated
Normal file
@ -0,0 +1,292 @@
|
||||
namespace TelasProjeto
|
||||
{
|
||||
partial class formAlterarLivro
|
||||
{
|
||||
/// <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.lblAlterarLivro = new System.Windows.Forms.Label();
|
||||
this.txtISBN = new System.Windows.Forms.TextBox();
|
||||
this.lblISBN = new System.Windows.Forms.Label();
|
||||
this.lblTipoMidia = new System.Windows.Forms.Label();
|
||||
this.txtEditora = new System.Windows.Forms.TextBox();
|
||||
this.lblEditora = new System.Windows.Forms.Label();
|
||||
this.txtGenero = new System.Windows.Forms.TextBox();
|
||||
this.lblGenero = new System.Windows.Forms.Label();
|
||||
this.lblAutor = new System.Windows.Forms.Label();
|
||||
this.btnAlterarLivro = new System.Windows.Forms.Button();
|
||||
this.lblNomeLivro = new System.Windows.Forms.Label();
|
||||
this.txtNomeLivro = new System.Windows.Forms.TextBox();
|
||||
this.txtAutor = new System.Windows.Forms.TextBox();
|
||||
this.txtTipoMidia = new System.Windows.Forms.TextBox();
|
||||
this.statusLivro = new System.Windows.Forms.ComboBox();
|
||||
this.psqAutor = new System.Windows.Forms.Button();
|
||||
this.psqGenero = new System.Windows.Forms.Button();
|
||||
this.psqEditora = new System.Windows.Forms.Button();
|
||||
this.psqTipo = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblAlterarLivro
|
||||
//
|
||||
this.lblAlterarLivro.AutoSize = true;
|
||||
this.lblAlterarLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAlterarLivro.Location = new System.Drawing.Point(235, 35);
|
||||
this.lblAlterarLivro.Name = "lblAlterarLivro";
|
||||
this.lblAlterarLivro.Size = new System.Drawing.Size(49, 24);
|
||||
this.lblAlterarLivro.TabIndex = 0;
|
||||
this.lblAlterarLivro.Text = "Item";
|
||||
//
|
||||
// txtISBN
|
||||
//
|
||||
this.txtISBN.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtISBN.Location = new System.Drawing.Point(105, 267);
|
||||
this.txtISBN.Name = "txtISBN";
|
||||
this.txtISBN.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtISBN.TabIndex = 32;
|
||||
//
|
||||
// lblISBN
|
||||
//
|
||||
this.lblISBN.AutoSize = true;
|
||||
this.lblISBN.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblISBN.Location = new System.Drawing.Point(46, 270);
|
||||
this.lblISBN.Name = "lblISBN";
|
||||
this.lblISBN.Size = new System.Drawing.Size(46, 18);
|
||||
this.lblISBN.TabIndex = 31;
|
||||
this.lblISBN.Text = "ISBN:";
|
||||
//
|
||||
// lblTipoMidia
|
||||
//
|
||||
this.lblTipoMidia.AutoSize = true;
|
||||
this.lblTipoMidia.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblTipoMidia.Location = new System.Drawing.Point(46, 231);
|
||||
this.lblTipoMidia.Name = "lblTipoMidia";
|
||||
this.lblTipoMidia.Size = new System.Drawing.Size(41, 18);
|
||||
this.lblTipoMidia.TabIndex = 27;
|
||||
this.lblTipoMidia.Text = "Tipo:";
|
||||
//
|
||||
// txtEditora
|
||||
//
|
||||
this.txtEditora.Enabled = false;
|
||||
this.txtEditora.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtEditora.Location = new System.Drawing.Point(105, 190);
|
||||
this.txtEditora.Name = "txtEditora";
|
||||
this.txtEditora.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtEditora.TabIndex = 24;
|
||||
//
|
||||
// lblEditora
|
||||
//
|
||||
this.lblEditora.AutoSize = true;
|
||||
this.lblEditora.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblEditora.Location = new System.Drawing.Point(46, 193);
|
||||
this.lblEditora.Name = "lblEditora";
|
||||
this.lblEditora.Size = new System.Drawing.Size(59, 18);
|
||||
this.lblEditora.TabIndex = 23;
|
||||
this.lblEditora.Text = "Editora:";
|
||||
//
|
||||
// txtGenero
|
||||
//
|
||||
this.txtGenero.Enabled = false;
|
||||
this.txtGenero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtGenero.Location = new System.Drawing.Point(105, 151);
|
||||
this.txtGenero.Name = "txtGenero";
|
||||
this.txtGenero.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtGenero.TabIndex = 22;
|
||||
//
|
||||
// lblGenero
|
||||
//
|
||||
this.lblGenero.AutoSize = true;
|
||||
this.lblGenero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblGenero.Location = new System.Drawing.Point(46, 154);
|
||||
this.lblGenero.Name = "lblGenero";
|
||||
this.lblGenero.Size = new System.Drawing.Size(62, 18);
|
||||
this.lblGenero.TabIndex = 21;
|
||||
this.lblGenero.Text = "Gênero:";
|
||||
//
|
||||
// lblAutor
|
||||
//
|
||||
this.lblAutor.AutoSize = true;
|
||||
this.lblAutor.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAutor.Location = new System.Drawing.Point(46, 117);
|
||||
this.lblAutor.Name = "lblAutor";
|
||||
this.lblAutor.Size = new System.Drawing.Size(47, 18);
|
||||
this.lblAutor.TabIndex = 20;
|
||||
this.lblAutor.Text = "Autor:";
|
||||
//
|
||||
// btnAlterarLivro
|
||||
//
|
||||
this.btnAlterarLivro.FlatAppearance.BorderSize = 3;
|
||||
this.btnAlterarLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAlterarLivro.Location = new System.Drawing.Point(289, 324);
|
||||
this.btnAlterarLivro.Name = "btnAlterarLivro";
|
||||
this.btnAlterarLivro.Size = new System.Drawing.Size(130, 32);
|
||||
this.btnAlterarLivro.TabIndex = 34;
|
||||
this.btnAlterarLivro.Text = "Alterar";
|
||||
this.btnAlterarLivro.UseMnemonic = false;
|
||||
this.btnAlterarLivro.UseVisualStyleBackColor = true;
|
||||
this.btnAlterarLivro.Click += new System.EventHandler(this.btnAlterarLivro_Click);
|
||||
//
|
||||
// lblNomeLivro
|
||||
//
|
||||
this.lblNomeLivro.AutoSize = true;
|
||||
this.lblNomeLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblNomeLivro.Location = new System.Drawing.Point(46, 77);
|
||||
this.lblNomeLivro.Name = "lblNomeLivro";
|
||||
this.lblNomeLivro.Size = new System.Drawing.Size(53, 18);
|
||||
this.lblNomeLivro.TabIndex = 19;
|
||||
this.lblNomeLivro.Text = "Nome:";
|
||||
//
|
||||
// txtNomeLivro
|
||||
//
|
||||
this.txtNomeLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtNomeLivro.Location = new System.Drawing.Point(105, 74);
|
||||
this.txtNomeLivro.Name = "txtNomeLivro";
|
||||
this.txtNomeLivro.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtNomeLivro.TabIndex = 17;
|
||||
//
|
||||
// txtAutor
|
||||
//
|
||||
this.txtAutor.Enabled = false;
|
||||
this.txtAutor.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtAutor.Location = new System.Drawing.Point(105, 114);
|
||||
this.txtAutor.Name = "txtAutor";
|
||||
this.txtAutor.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtAutor.TabIndex = 18;
|
||||
//
|
||||
// txtTipoMidia
|
||||
//
|
||||
this.txtTipoMidia.Enabled = false;
|
||||
this.txtTipoMidia.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtTipoMidia.Location = new System.Drawing.Point(105, 228);
|
||||
this.txtTipoMidia.Name = "txtTipoMidia";
|
||||
this.txtTipoMidia.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtTipoMidia.TabIndex = 28;
|
||||
//
|
||||
// statusLivro
|
||||
//
|
||||
this.statusLivro.FormattingEnabled = true;
|
||||
this.statusLivro.Items.AddRange(new object[] {
|
||||
"ATIVO",
|
||||
"DESATIVADO"});
|
||||
this.statusLivro.Location = new System.Drawing.Point(105, 297);
|
||||
this.statusLivro.Name = "statusLivro";
|
||||
this.statusLivro.Size = new System.Drawing.Size(314, 21);
|
||||
this.statusLivro.TabIndex = 39;
|
||||
//
|
||||
// psqAutor
|
||||
//
|
||||
this.psqAutor.Location = new System.Drawing.Point(425, 114);
|
||||
this.psqAutor.Name = "psqAutor";
|
||||
this.psqAutor.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqAutor.TabIndex = 40;
|
||||
this.psqAutor.Text = "Pesquisar";
|
||||
this.psqAutor.UseVisualStyleBackColor = true;
|
||||
this.psqAutor.Click += new System.EventHandler(this.psqAutor_Click);
|
||||
//
|
||||
// psqGenero
|
||||
//
|
||||
this.psqGenero.Location = new System.Drawing.Point(425, 151);
|
||||
this.psqGenero.Name = "psqGenero";
|
||||
this.psqGenero.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqGenero.TabIndex = 41;
|
||||
this.psqGenero.Text = "Pesquisar";
|
||||
this.psqGenero.UseVisualStyleBackColor = true;
|
||||
this.psqGenero.Click += new System.EventHandler(this.psqGenero_Click);
|
||||
//
|
||||
// psqEditora
|
||||
//
|
||||
this.psqEditora.Location = new System.Drawing.Point(425, 190);
|
||||
this.psqEditora.Name = "psqEditora";
|
||||
this.psqEditora.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqEditora.TabIndex = 42;
|
||||
this.psqEditora.Text = "Pesquisar";
|
||||
this.psqEditora.UseVisualStyleBackColor = true;
|
||||
this.psqEditora.Click += new System.EventHandler(this.psqEditora_Click);
|
||||
//
|
||||
// psqTipo
|
||||
//
|
||||
this.psqTipo.Location = new System.Drawing.Point(425, 228);
|
||||
this.psqTipo.Name = "psqTipo";
|
||||
this.psqTipo.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqTipo.TabIndex = 43;
|
||||
this.psqTipo.Text = "Pesquisar";
|
||||
this.psqTipo.UseVisualStyleBackColor = true;
|
||||
this.psqTipo.Click += new System.EventHandler(this.psqTipo_Click);
|
||||
//
|
||||
// formAlterarLivro
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(524, 404);
|
||||
this.Controls.Add(this.psqTipo);
|
||||
this.Controls.Add(this.psqEditora);
|
||||
this.Controls.Add(this.psqGenero);
|
||||
this.Controls.Add(this.psqAutor);
|
||||
this.Controls.Add(this.statusLivro);
|
||||
this.Controls.Add(this.btnAlterarLivro);
|
||||
this.Controls.Add(this.txtISBN);
|
||||
this.Controls.Add(this.lblISBN);
|
||||
this.Controls.Add(this.txtTipoMidia);
|
||||
this.Controls.Add(this.lblTipoMidia);
|
||||
this.Controls.Add(this.txtEditora);
|
||||
this.Controls.Add(this.lblEditora);
|
||||
this.Controls.Add(this.txtGenero);
|
||||
this.Controls.Add(this.lblGenero);
|
||||
this.Controls.Add(this.lblAutor);
|
||||
this.Controls.Add(this.lblNomeLivro);
|
||||
this.Controls.Add(this.txtAutor);
|
||||
this.Controls.Add(this.txtNomeLivro);
|
||||
this.Controls.Add(this.lblAlterarLivro);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "formAlterarLivro";
|
||||
this.Text = "Alterar Livro";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblAlterarLivro;
|
||||
private System.Windows.Forms.TextBox txtISBN;
|
||||
private System.Windows.Forms.Label lblISBN;
|
||||
private System.Windows.Forms.Label lblTipoMidia;
|
||||
private System.Windows.Forms.TextBox txtEditora;
|
||||
private System.Windows.Forms.Label lblEditora;
|
||||
private System.Windows.Forms.TextBox txtGenero;
|
||||
private System.Windows.Forms.Label lblGenero;
|
||||
private System.Windows.Forms.Label lblAutor;
|
||||
private System.Windows.Forms.Button btnAlterarLivro;
|
||||
private System.Windows.Forms.Label lblNomeLivro;
|
||||
private System.Windows.Forms.TextBox txtNomeLivro;
|
||||
private System.Windows.Forms.TextBox txtAutor;
|
||||
private System.Windows.Forms.TextBox txtTipoMidia;
|
||||
private System.Windows.Forms.ComboBox statusLivro;
|
||||
private System.Windows.Forms.Button psqAutor;
|
||||
private System.Windows.Forms.Button psqGenero;
|
||||
private System.Windows.Forms.Button psqEditora;
|
||||
private System.Windows.Forms.Button psqTipo;
|
||||
}
|
||||
}
|
110
stuff/Item/AlterarLivro.cs
Normal file
110
stuff/Item/AlterarLivro.cs
Normal file
@ -0,0 +1,110 @@
|
||||
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 formAlterarLivro : Form
|
||||
{
|
||||
public int? id1, id2, id3, id4;
|
||||
public int idI = -9999;
|
||||
|
||||
private void psqAutor_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 1);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqGenero_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 2);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqEditora_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 3);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqTipo_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 4);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void btnAlterarLivro_Click(object sender, EventArgs e)
|
||||
{
|
||||
Item i = new Item(idI,"1", 1, 1, 1, 1, "1","1");
|
||||
SqlException sql = null;
|
||||
try {
|
||||
i.Edit(idI, new List<string>
|
||||
{ txtNomeLivro.Text, //0
|
||||
txtAutor.Text, // 1
|
||||
txtGenero.Text, // 2
|
||||
txtEditora.Text, // 3
|
||||
txtTipoMidia.Text, // 4
|
||||
txtISBN.Text, // 5
|
||||
statusLivro.SelectedItem.ToString()} // 6
|
||||
|
||||
// (string Autor, string Genero, string Editora, string Tipo)
|
||||
// Return para pegar PK!!
|
||||
// Vlr[0], [5], [6] -> nomeItem, isbnItem, statusItem;
|
||||
// Vlr[1], [2], [3], [4] -> idAutor,generoItem,editoraItem,tipoItem;
|
||||
);
|
||||
}
|
||||
catch(SqlException g)
|
||||
{
|
||||
sql = g;
|
||||
MessageBox.Show("Falha na alteração de dados!");
|
||||
}
|
||||
if(sql == null)
|
||||
{
|
||||
MessageBox.Show("Dados atualizados!");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string n1, n2, n3, n4;
|
||||
|
||||
public formAlterarLivro(List<Tuple<int,string>> a)
|
||||
{
|
||||
idI = a[0].Item1;
|
||||
List<string> tmp = new List<string>();
|
||||
foreach (Tuple<int, string> b in a)
|
||||
tmp.Add(b.Item2);
|
||||
InitializeComponent();
|
||||
txtNomeLivro.Text = tmp[0];
|
||||
txtAutor.Text = tmp[1];
|
||||
txtGenero.Text = tmp[2];
|
||||
txtEditora.Text = tmp[3];
|
||||
txtTipoMidia.Text = tmp[4];
|
||||
txtISBN.Text = tmp[5];
|
||||
statusLivro.SelectedItem = tmp[6];
|
||||
}
|
||||
public void UpdateTxt()
|
||||
{
|
||||
if(n1 != null)
|
||||
{
|
||||
txtAutor.Text = n1;
|
||||
}
|
||||
if (n2 != null)
|
||||
{
|
||||
txtGenero.Text = n2;
|
||||
}
|
||||
if (n3 != null)
|
||||
{
|
||||
txtEditora.Text = n3;
|
||||
}
|
||||
if (n4 != null)
|
||||
{
|
||||
txtTipoMidia.Text = n4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Item/AlterarLivro.resx
Normal file
120
stuff/Item/AlterarLivro.resx
Normal 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>
|
303
stuff/Item/CadastroLivros.Designer.cs
generated
Normal file
303
stuff/Item/CadastroLivros.Designer.cs
generated
Normal file
@ -0,0 +1,303 @@
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
partial class Cadastro_de_Livros
|
||||
{
|
||||
/// <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.btnSalvar = new System.Windows.Forms.Button();
|
||||
this.btnLimpar = new System.Windows.Forms.Button();
|
||||
this.psqTipo = new System.Windows.Forms.Button();
|
||||
this.psqEditora = new System.Windows.Forms.Button();
|
||||
this.psqGenero = new System.Windows.Forms.Button();
|
||||
this.psqAutor = new System.Windows.Forms.Button();
|
||||
this.statusLivro = new System.Windows.Forms.ComboBox();
|
||||
this.txtISBN = new System.Windows.Forms.TextBox();
|
||||
this.lblISBN = new System.Windows.Forms.Label();
|
||||
this.txtTipoMidia = new System.Windows.Forms.TextBox();
|
||||
this.lblTipoMidia = new System.Windows.Forms.Label();
|
||||
this.txtEditora = new System.Windows.Forms.TextBox();
|
||||
this.lblEditora = new System.Windows.Forms.Label();
|
||||
this.txtGenero = new System.Windows.Forms.TextBox();
|
||||
this.lblGenero = new System.Windows.Forms.Label();
|
||||
this.lblAutor = new System.Windows.Forms.Label();
|
||||
this.lblNomeLivro = new System.Windows.Forms.Label();
|
||||
this.txtAutor = new System.Windows.Forms.TextBox();
|
||||
this.txtNomeLivro = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnSalvar
|
||||
//
|
||||
this.btnSalvar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSalvar.Location = new System.Drawing.Point(29, 371);
|
||||
this.btnSalvar.Name = "btnSalvar";
|
||||
this.btnSalvar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSalvar.TabIndex = 12;
|
||||
this.btnSalvar.Text = "Salvar";
|
||||
this.btnSalvar.UseVisualStyleBackColor = true;
|
||||
this.btnSalvar.Click += new System.EventHandler(this.btnSalvar_Click);
|
||||
//
|
||||
// btnLimpar
|
||||
//
|
||||
this.btnLimpar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLimpar.Location = new System.Drawing.Point(110, 371);
|
||||
this.btnLimpar.Name = "btnLimpar";
|
||||
this.btnLimpar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnLimpar.TabIndex = 13;
|
||||
this.btnLimpar.Text = "Limpar";
|
||||
this.btnLimpar.UseVisualStyleBackColor = true;
|
||||
this.btnLimpar.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// psqTipo
|
||||
//
|
||||
this.psqTipo.Location = new System.Drawing.Point(405, 245);
|
||||
this.psqTipo.Name = "psqTipo";
|
||||
this.psqTipo.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqTipo.TabIndex = 60;
|
||||
this.psqTipo.Text = "Pesquisar";
|
||||
this.psqTipo.UseVisualStyleBackColor = true;
|
||||
this.psqTipo.Click += new System.EventHandler(this.psqTipo_Click);
|
||||
//
|
||||
// psqEditora
|
||||
//
|
||||
this.psqEditora.Location = new System.Drawing.Point(405, 207);
|
||||
this.psqEditora.Name = "psqEditora";
|
||||
this.psqEditora.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqEditora.TabIndex = 59;
|
||||
this.psqEditora.Text = "Pesquisar";
|
||||
this.psqEditora.UseVisualStyleBackColor = true;
|
||||
this.psqEditora.Click += new System.EventHandler(this.psqEditora_Click);
|
||||
//
|
||||
// psqGenero
|
||||
//
|
||||
this.psqGenero.Location = new System.Drawing.Point(405, 168);
|
||||
this.psqGenero.Name = "psqGenero";
|
||||
this.psqGenero.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqGenero.TabIndex = 58;
|
||||
this.psqGenero.Text = "Pesquisar";
|
||||
this.psqGenero.UseVisualStyleBackColor = true;
|
||||
this.psqGenero.Click += new System.EventHandler(this.psqGenero_Click);
|
||||
//
|
||||
// psqAutor
|
||||
//
|
||||
this.psqAutor.Location = new System.Drawing.Point(405, 131);
|
||||
this.psqAutor.Name = "psqAutor";
|
||||
this.psqAutor.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqAutor.TabIndex = 57;
|
||||
this.psqAutor.Text = "Pesquisar";
|
||||
this.psqAutor.UseVisualStyleBackColor = true;
|
||||
this.psqAutor.Click += new System.EventHandler(this.psqAutor_Click);
|
||||
//
|
||||
// statusLivro
|
||||
//
|
||||
this.statusLivro.FormattingEnabled = true;
|
||||
this.statusLivro.Items.AddRange(new object[] {
|
||||
"ATIVO",
|
||||
"DESATIVADO"});
|
||||
this.statusLivro.Location = new System.Drawing.Point(85, 314);
|
||||
this.statusLivro.Name = "statusLivro";
|
||||
this.statusLivro.Size = new System.Drawing.Size(314, 21);
|
||||
this.statusLivro.TabIndex = 56;
|
||||
//
|
||||
// txtISBN
|
||||
//
|
||||
this.txtISBN.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtISBN.Location = new System.Drawing.Point(85, 284);
|
||||
this.txtISBN.Name = "txtISBN";
|
||||
this.txtISBN.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtISBN.TabIndex = 55;
|
||||
//
|
||||
// lblISBN
|
||||
//
|
||||
this.lblISBN.AutoSize = true;
|
||||
this.lblISBN.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblISBN.Location = new System.Drawing.Point(26, 287);
|
||||
this.lblISBN.Name = "lblISBN";
|
||||
this.lblISBN.Size = new System.Drawing.Size(46, 18);
|
||||
this.lblISBN.TabIndex = 54;
|
||||
this.lblISBN.Text = "ISBN:";
|
||||
//
|
||||
// txtTipoMidia
|
||||
//
|
||||
this.txtTipoMidia.Enabled = false;
|
||||
this.txtTipoMidia.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtTipoMidia.Location = new System.Drawing.Point(85, 245);
|
||||
this.txtTipoMidia.Name = "txtTipoMidia";
|
||||
this.txtTipoMidia.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtTipoMidia.TabIndex = 53;
|
||||
//
|
||||
// lblTipoMidia
|
||||
//
|
||||
this.lblTipoMidia.AutoSize = true;
|
||||
this.lblTipoMidia.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblTipoMidia.Location = new System.Drawing.Point(26, 248);
|
||||
this.lblTipoMidia.Name = "lblTipoMidia";
|
||||
this.lblTipoMidia.Size = new System.Drawing.Size(41, 18);
|
||||
this.lblTipoMidia.TabIndex = 52;
|
||||
this.lblTipoMidia.Text = "Tipo:";
|
||||
//
|
||||
// txtEditora
|
||||
//
|
||||
this.txtEditora.Enabled = false;
|
||||
this.txtEditora.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtEditora.Location = new System.Drawing.Point(85, 207);
|
||||
this.txtEditora.Name = "txtEditora";
|
||||
this.txtEditora.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtEditora.TabIndex = 51;
|
||||
//
|
||||
// lblEditora
|
||||
//
|
||||
this.lblEditora.AutoSize = true;
|
||||
this.lblEditora.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblEditora.Location = new System.Drawing.Point(26, 210);
|
||||
this.lblEditora.Name = "lblEditora";
|
||||
this.lblEditora.Size = new System.Drawing.Size(59, 18);
|
||||
this.lblEditora.TabIndex = 50;
|
||||
this.lblEditora.Text = "Editora:";
|
||||
//
|
||||
// txtGenero
|
||||
//
|
||||
this.txtGenero.Enabled = false;
|
||||
this.txtGenero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtGenero.Location = new System.Drawing.Point(85, 168);
|
||||
this.txtGenero.Name = "txtGenero";
|
||||
this.txtGenero.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtGenero.TabIndex = 49;
|
||||
//
|
||||
// lblGenero
|
||||
//
|
||||
this.lblGenero.AutoSize = true;
|
||||
this.lblGenero.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblGenero.Location = new System.Drawing.Point(26, 171);
|
||||
this.lblGenero.Name = "lblGenero";
|
||||
this.lblGenero.Size = new System.Drawing.Size(62, 18);
|
||||
this.lblGenero.TabIndex = 48;
|
||||
this.lblGenero.Text = "Gênero:";
|
||||
//
|
||||
// lblAutor
|
||||
//
|
||||
this.lblAutor.AutoSize = true;
|
||||
this.lblAutor.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAutor.Location = new System.Drawing.Point(26, 134);
|
||||
this.lblAutor.Name = "lblAutor";
|
||||
this.lblAutor.Size = new System.Drawing.Size(47, 18);
|
||||
this.lblAutor.TabIndex = 47;
|
||||
this.lblAutor.Text = "Autor:";
|
||||
//
|
||||
// lblNomeLivro
|
||||
//
|
||||
this.lblNomeLivro.AutoSize = true;
|
||||
this.lblNomeLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblNomeLivro.Location = new System.Drawing.Point(26, 94);
|
||||
this.lblNomeLivro.Name = "lblNomeLivro";
|
||||
this.lblNomeLivro.Size = new System.Drawing.Size(53, 18);
|
||||
this.lblNomeLivro.TabIndex = 46;
|
||||
this.lblNomeLivro.Text = "Nome:";
|
||||
//
|
||||
// txtAutor
|
||||
//
|
||||
this.txtAutor.Enabled = false;
|
||||
this.txtAutor.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtAutor.Location = new System.Drawing.Point(85, 131);
|
||||
this.txtAutor.Name = "txtAutor";
|
||||
this.txtAutor.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtAutor.TabIndex = 45;
|
||||
//
|
||||
// txtNomeLivro
|
||||
//
|
||||
this.txtNomeLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtNomeLivro.Location = new System.Drawing.Point(85, 91);
|
||||
this.txtNomeLivro.Name = "txtNomeLivro";
|
||||
this.txtNomeLivro.Size = new System.Drawing.Size(314, 24);
|
||||
this.txtNomeLivro.TabIndex = 44;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(24, 34);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(199, 25);
|
||||
this.label1.TabIndex = 61;
|
||||
this.label1.Text = "Cadastro de Livro";
|
||||
//
|
||||
// Cadastro_de_Livros
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(514, 425);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.psqTipo);
|
||||
this.Controls.Add(this.psqEditora);
|
||||
this.Controls.Add(this.psqGenero);
|
||||
this.Controls.Add(this.psqAutor);
|
||||
this.Controls.Add(this.statusLivro);
|
||||
this.Controls.Add(this.txtISBN);
|
||||
this.Controls.Add(this.lblISBN);
|
||||
this.Controls.Add(this.txtTipoMidia);
|
||||
this.Controls.Add(this.lblTipoMidia);
|
||||
this.Controls.Add(this.txtEditora);
|
||||
this.Controls.Add(this.lblEditora);
|
||||
this.Controls.Add(this.txtGenero);
|
||||
this.Controls.Add(this.lblGenero);
|
||||
this.Controls.Add(this.lblAutor);
|
||||
this.Controls.Add(this.lblNomeLivro);
|
||||
this.Controls.Add(this.txtAutor);
|
||||
this.Controls.Add(this.txtNomeLivro);
|
||||
this.Controls.Add(this.btnLimpar);
|
||||
this.Controls.Add(this.btnSalvar);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "Cadastro_de_Livros";
|
||||
this.Text = "Cadastro de Livros";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button btnSalvar;
|
||||
private System.Windows.Forms.Button btnLimpar;
|
||||
private System.Windows.Forms.Button psqTipo;
|
||||
private System.Windows.Forms.Button psqEditora;
|
||||
private System.Windows.Forms.Button psqGenero;
|
||||
private System.Windows.Forms.Button psqAutor;
|
||||
private System.Windows.Forms.ComboBox statusLivro;
|
||||
private System.Windows.Forms.TextBox txtISBN;
|
||||
private System.Windows.Forms.Label lblISBN;
|
||||
private System.Windows.Forms.TextBox txtTipoMidia;
|
||||
private System.Windows.Forms.Label lblTipoMidia;
|
||||
private System.Windows.Forms.TextBox txtEditora;
|
||||
private System.Windows.Forms.Label lblEditora;
|
||||
private System.Windows.Forms.TextBox txtGenero;
|
||||
private System.Windows.Forms.Label lblGenero;
|
||||
private System.Windows.Forms.Label lblAutor;
|
||||
private System.Windows.Forms.Label lblNomeLivro;
|
||||
private System.Windows.Forms.TextBox txtAutor;
|
||||
private System.Windows.Forms.TextBox txtNomeLivro;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
98
stuff/Item/CadastroLivros.cs
Normal file
98
stuff/Item/CadastroLivros.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CSharpLibrary.stuff;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
public partial class Cadastro_de_Livros : Form
|
||||
{
|
||||
public int? id1, id2, id3, id4;
|
||||
public string n1, n2, n3, n4;
|
||||
public int idI = -9999;
|
||||
public Cadastro_de_Livros()
|
||||
{
|
||||
InitializeComponent();
|
||||
Clean();
|
||||
}
|
||||
|
||||
private void Clean()
|
||||
{
|
||||
txtAutor.Clear();
|
||||
txtEditora.Clear();
|
||||
txtGenero.Clear();
|
||||
txtISBN.Clear();
|
||||
txtNomeLivro.Clear();
|
||||
txtTipoMidia.Clear();
|
||||
statusLivro.Text = "";
|
||||
}
|
||||
|
||||
private void btnSalvar_Click(object sender, EventArgs e)
|
||||
{
|
||||
SqlException sql = null;
|
||||
try {
|
||||
Item i = new Item(null, txtNomeLivro.Text, (int)id1,(int)id2,(int)id3,(int)id4,txtISBN.Text.ToString(),statusLivro.SelectedItem.ToString());
|
||||
i.Add();
|
||||
}
|
||||
catch (SqlException g)
|
||||
{
|
||||
sql = g;
|
||||
MessageBox.Show("Falha no cadastro!");
|
||||
}
|
||||
if (sql == null)
|
||||
{
|
||||
MessageBox.Show("Item Cadastrado!");
|
||||
Clean();
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
private void psqAutor_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 1);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqGenero_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 2);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqEditora_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 3);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqTipo_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 4);
|
||||
srch.Show();
|
||||
}
|
||||
public void UpdateTxt()
|
||||
{
|
||||
if (n1 != null)
|
||||
{
|
||||
txtAutor.Text = n1;
|
||||
}
|
||||
if (n2 != null)
|
||||
{
|
||||
txtGenero.Text = n2;
|
||||
}
|
||||
if (n3 != null)
|
||||
{
|
||||
txtEditora.Text = n3;
|
||||
}
|
||||
if (n4 != null)
|
||||
{
|
||||
txtTipoMidia.Text = n4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Item/CadastroLivros.resx
Normal file
120
stuff/Item/CadastroLivros.resx
Normal 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>
|
121
stuff/Item/ConsultaLivro.Designer.cs
generated
Normal file
121
stuff/Item/ConsultaLivro.Designer.cs
generated
Normal file
@ -0,0 +1,121 @@
|
||||
namespace TelasProjeto
|
||||
{
|
||||
partial class Form5
|
||||
{
|
||||
/// <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.lblConsultarLivro = new System.Windows.Forms.Label();
|
||||
this.lblLivro = new System.Windows.Forms.Label();
|
||||
this.txtLivro = new System.Windows.Forms.TextBox();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.btnConsultar = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblConsultarLivro
|
||||
//
|
||||
this.lblConsultarLivro.AutoSize = true;
|
||||
this.lblConsultarLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblConsultarLivro.Location = new System.Drawing.Point(48, 26);
|
||||
this.lblConsultarLivro.Name = "lblConsultarLivro";
|
||||
this.lblConsultarLivro.Size = new System.Drawing.Size(143, 24);
|
||||
this.lblConsultarLivro.TabIndex = 54;
|
||||
this.lblConsultarLivro.Text = "Consultar Item";
|
||||
//
|
||||
// lblLivro
|
||||
//
|
||||
this.lblLivro.AutoSize = true;
|
||||
this.lblLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblLivro.Location = new System.Drawing.Point(49, 72);
|
||||
this.lblLivro.Name = "lblLivro";
|
||||
this.lblLivro.Size = new System.Drawing.Size(40, 18);
|
||||
this.lblLivro.TabIndex = 56;
|
||||
this.lblLivro.Text = "Item:";
|
||||
//
|
||||
// txtLivro
|
||||
//
|
||||
this.txtLivro.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtLivro.Location = new System.Drawing.Point(95, 69);
|
||||
this.txtLivro.Name = "txtLivro";
|
||||
this.txtLivro.Size = new System.Drawing.Size(919, 24);
|
||||
this.txtLivro.TabIndex = 55;
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToOrderColumns = true;
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(52, 110);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(962, 373);
|
||||
this.dataGridView1.TabIndex = 59;
|
||||
this.dataGridView1.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDoubleClick);
|
||||
//
|
||||
// btnConsultar
|
||||
//
|
||||
this.btnConsultar.FlatAppearance.BorderSize = 3;
|
||||
this.btnConsultar.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnConsultar.Location = new System.Drawing.Point(52, 498);
|
||||
this.btnConsultar.Name = "btnConsultar";
|
||||
this.btnConsultar.Size = new System.Drawing.Size(102, 32);
|
||||
this.btnConsultar.TabIndex = 58;
|
||||
this.btnConsultar.Text = "Consultar";
|
||||
this.btnConsultar.UseMnemonic = false;
|
||||
this.btnConsultar.UseVisualStyleBackColor = true;
|
||||
this.btnConsultar.Click += new System.EventHandler(this.btnConsultar_Click);
|
||||
//
|
||||
// Form5
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1058, 565);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Controls.Add(this.btnConsultar);
|
||||
this.Controls.Add(this.lblLivro);
|
||||
this.Controls.Add(this.txtLivro);
|
||||
this.Controls.Add(this.lblConsultarLivro);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "Form5";
|
||||
this.Text = "Consultar Item";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblConsultarLivro;
|
||||
private System.Windows.Forms.Label lblLivro;
|
||||
private System.Windows.Forms.TextBox txtLivro;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.Button btnConsultar;
|
||||
}
|
||||
}
|
51
stuff/Item/ConsultaLivro.cs
Normal file
51
stuff/Item/ConsultaLivro.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using CSharpLibrary;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
|
||||
namespace TelasProjeto
|
||||
{
|
||||
public partial class Form5 : Form
|
||||
{
|
||||
public Form5()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataSet ds = ReturnTypes.DSReturnItemByName(txtLivro.Text);
|
||||
dataGridView1.DataSource = ds;
|
||||
dataGridView1.DataMember = ds.Tables[0].TableName;
|
||||
}
|
||||
|
||||
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if(e.RowIndex >= 0 && e.ColumnIndex >= 0)
|
||||
{
|
||||
int tmp = 0,i = e.RowIndex;
|
||||
List<Tuple<int, string>> a = new List<Tuple<int, string>>();
|
||||
foreach(DataGridViewRow datarow in dataGridView1.Rows)
|
||||
{
|
||||
foreach(DataGridViewCell c in datarow.Cells)
|
||||
{
|
||||
if (c.RowIndex == i)
|
||||
{
|
||||
if (c.ColumnIndex == 0)
|
||||
tmp = (int)c.Value;
|
||||
else
|
||||
{
|
||||
a.Add(
|
||||
new Tuple<int,string>(tmp, c.Value.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
formAlterarLivro f = new formAlterarLivro(a);
|
||||
f.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Item/ConsultaLivro.resx
Normal file
120
stuff/Item/ConsultaLivro.resx
Normal 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>
|
91
stuff/Item/search.Designer.cs
generated
Normal file
91
stuff/Item/search.Designer.cs
generated
Normal file
@ -0,0 +1,91 @@
|
||||
namespace CSharpLibrary.stuff
|
||||
{
|
||||
partial class search
|
||||
{
|
||||
/// <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.txtQuery = new System.Windows.Forms.TextBox();
|
||||
this.btnQuery = new System.Windows.Forms.Button();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtQuery
|
||||
//
|
||||
this.txtQuery.Location = new System.Drawing.Point(12, 29);
|
||||
this.txtQuery.Name = "txtQuery";
|
||||
this.txtQuery.Size = new System.Drawing.Size(295, 20);
|
||||
this.txtQuery.TabIndex = 0;
|
||||
//
|
||||
// btnQuery
|
||||
//
|
||||
this.btnQuery.Location = new System.Drawing.Point(327, 27);
|
||||
this.btnQuery.Name = "btnQuery";
|
||||
this.btnQuery.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnQuery.TabIndex = 1;
|
||||
this.btnQuery.Text = "Pesquisar";
|
||||
this.btnQuery.UseVisualStyleBackColor = true;
|
||||
this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(12, 56);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.ShowEditingIcon = false;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(479, 250);
|
||||
this.dataGridView1.TabIndex = 2;
|
||||
this.dataGridView1.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDoubleClick);
|
||||
//
|
||||
// search
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(503, 318);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Controls.Add(this.btnQuery);
|
||||
this.Controls.Add(this.txtQuery);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Name = "search";
|
||||
this.Text = "Pesquisar";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtQuery;
|
||||
private System.Windows.Forms.Button btnQuery;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
}
|
||||
}
|
185
stuff/Item/search.cs
Normal file
185
stuff/Item/search.cs
Normal file
@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
using TelasProjeto;
|
||||
using ProjetoLPVIII;
|
||||
using CSharpLibrary.stuff.Item;
|
||||
|
||||
namespace CSharpLibrary.stuff
|
||||
{
|
||||
public partial class search : Form
|
||||
{
|
||||
int f = 0;
|
||||
object Frm;
|
||||
public search(object frm, int i)
|
||||
{
|
||||
f = i;
|
||||
Frm = frm;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
switch (f)
|
||||
{
|
||||
case 1:
|
||||
ds = ReturnTypes.DSReturnAutorByName(txtQuery.Text);
|
||||
break;
|
||||
case 3:
|
||||
ds = ReturnTypes.DSReturnEditoraByName(txtQuery.Text);
|
||||
break;
|
||||
case 2:
|
||||
ds = ReturnTypes.DSReturnGeneroByName(txtQuery.Text);
|
||||
break;
|
||||
case 4:
|
||||
ds = ReturnTypes.DSReturnTipoByName(txtQuery.Text);
|
||||
break;
|
||||
case 5:
|
||||
ds = ReturnTypes.DSReturnItemByName(txtQuery.Text);
|
||||
break;
|
||||
case 6:
|
||||
ds = ReturnTypes.DSReturnFuncionarioByName(txtQuery.Text);
|
||||
break;
|
||||
case 7:
|
||||
ds = ReturnTypes.DSReturnClienteByName(txtQuery.Text);
|
||||
break;
|
||||
case 8:
|
||||
ds = ReturnTypes.DSReturnEmprestimoByName(txtQuery.Text);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dataGridView1.DataSource = ds;
|
||||
dataGridView1.DataMember = ds.Tables[0].TableName;
|
||||
}
|
||||
|
||||
Cliente GetCliente(int i)
|
||||
{
|
||||
return ReturnTypes.AReturnCliente(i);
|
||||
}
|
||||
CSharpLibrary.SqlTypes.Item GetItem(int i)
|
||||
{
|
||||
return ReturnTypes.AReturnItem(i);
|
||||
}
|
||||
|
||||
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
int tmp = -9999;
|
||||
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
|
||||
{
|
||||
int i = e.RowIndex;
|
||||
string a = "";
|
||||
|
||||
foreach (DataGridViewRow datarow in dataGridView1.Rows)
|
||||
{
|
||||
foreach (DataGridViewCell c in datarow.Cells)
|
||||
{
|
||||
if (c.RowIndex == i)
|
||||
{
|
||||
if (c.ColumnIndex == 0)
|
||||
tmp = (int)c.Value;
|
||||
else
|
||||
a = (string)c.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Frm.GetType() == typeof(Retirada_de_livros))
|
||||
{
|
||||
switch (f)
|
||||
{
|
||||
case 7:
|
||||
(Frm as Retirada_de_livros).c = GetCliente(tmp);
|
||||
(Frm as Retirada_de_livros).UpdateTxt();
|
||||
break;
|
||||
case 5:
|
||||
(Frm as Retirada_de_livros).i = GetItem(tmp);
|
||||
(Frm as Retirada_de_livros).UpdateTxt();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (Frm.GetType() == typeof(AlterarEmprestimo))
|
||||
{
|
||||
switch (f)
|
||||
{
|
||||
case 7:
|
||||
(Frm as AlterarEmprestimo).c = GetCliente(tmp);
|
||||
(Frm as AlterarEmprestimo).UpdateTxt();
|
||||
break;
|
||||
case 5:
|
||||
(Frm as AlterarEmprestimo).i = GetItem(tmp);
|
||||
(Frm as AlterarEmprestimo).UpdateTxt();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Frm.GetType() == typeof(formConsultarCliente))
|
||||
{
|
||||
(Frm as formConsultarCliente).c1 = GetCliente(tmp);
|
||||
(Frm as formConsultarCliente).UpdateTxt();
|
||||
}
|
||||
|
||||
|
||||
if (Frm.GetType() == typeof(formAlterarLivro))
|
||||
{
|
||||
switch (f)
|
||||
{
|
||||
case 1:
|
||||
(Frm as formAlterarLivro).id1 = tmp;
|
||||
(Frm as formAlterarLivro).n1 = a;
|
||||
break;
|
||||
case 2:
|
||||
(Frm as formAlterarLivro).id2 = tmp;
|
||||
(Frm as formAlterarLivro).n2 = a;
|
||||
break;
|
||||
case 3:
|
||||
(Frm as formAlterarLivro).id3 = tmp;
|
||||
(Frm as formAlterarLivro).n3 = a;
|
||||
break;
|
||||
case 4:
|
||||
(Frm as formAlterarLivro).id4 = tmp;
|
||||
(Frm as formAlterarLivro).n4 = a;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
(Frm as formAlterarLivro).UpdateTxt();
|
||||
}
|
||||
if (Frm.GetType() == typeof(Cadastro_de_Livros))
|
||||
{
|
||||
switch (f)
|
||||
{
|
||||
case 1:
|
||||
(Frm as Cadastro_de_Livros).id1 = tmp;
|
||||
(Frm as Cadastro_de_Livros).n1 = a;
|
||||
break;
|
||||
case 2:
|
||||
(Frm as Cadastro_de_Livros).id2 = tmp;
|
||||
(Frm as Cadastro_de_Livros).n2 = a;
|
||||
break;
|
||||
case 3:
|
||||
(Frm as Cadastro_de_Livros).id3 = tmp;
|
||||
(Frm as Cadastro_de_Livros).n3 = a;
|
||||
break;
|
||||
case 4:
|
||||
(Frm as Cadastro_de_Livros).id4 = tmp;
|
||||
(Frm as Cadastro_de_Livros).n4 = a;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
(Frm as Cadastro_de_Livros).UpdateTxt();
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Item/search.resx
Normal file
120
stuff/Item/search.resx
Normal 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>
|
127
stuff/Login.Designer.cs
generated
Normal file
127
stuff/Login.Designer.cs
generated
Normal file
@ -0,0 +1,127 @@
|
||||
namespace TelasProjeto
|
||||
{
|
||||
partial class FormLogin
|
||||
{
|
||||
/// <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.lblLogin = new System.Windows.Forms.Label();
|
||||
this.btnAcessar = new System.Windows.Forms.Button();
|
||||
this.lblSenha = new System.Windows.Forms.Label();
|
||||
this.lblUsuario = new System.Windows.Forms.Label();
|
||||
this.txtSenha = new System.Windows.Forms.TextBox();
|
||||
this.txtUsuario = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblLogin
|
||||
//
|
||||
this.lblLogin.AutoSize = true;
|
||||
this.lblLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblLogin.Location = new System.Drawing.Point(192, 20);
|
||||
this.lblLogin.Name = "lblLogin";
|
||||
this.lblLogin.Size = new System.Drawing.Size(62, 24);
|
||||
this.lblLogin.TabIndex = 53;
|
||||
this.lblLogin.Text = "Login";
|
||||
//
|
||||
// btnAcessar
|
||||
//
|
||||
this.btnAcessar.FlatAppearance.BorderSize = 3;
|
||||
this.btnAcessar.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAcessar.Location = new System.Drawing.Point(173, 137);
|
||||
this.btnAcessar.Name = "btnAcessar";
|
||||
this.btnAcessar.Size = new System.Drawing.Size(102, 32);
|
||||
this.btnAcessar.TabIndex = 38;
|
||||
this.btnAcessar.Text = "Acessar";
|
||||
this.btnAcessar.UseMnemonic = false;
|
||||
this.btnAcessar.UseVisualStyleBackColor = true;
|
||||
this.btnAcessar.Click += new System.EventHandler(this.btnAcessar_Click);
|
||||
//
|
||||
// lblSenha
|
||||
//
|
||||
this.lblSenha.AutoSize = true;
|
||||
this.lblSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblSenha.Location = new System.Drawing.Point(34, 101);
|
||||
this.lblSenha.Name = "lblSenha";
|
||||
this.lblSenha.Size = new System.Drawing.Size(54, 18);
|
||||
this.lblSenha.TabIndex = 41;
|
||||
this.lblSenha.Text = "Senha:";
|
||||
//
|
||||
// lblUsuario
|
||||
//
|
||||
this.lblUsuario.AutoSize = true;
|
||||
this.lblUsuario.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblUsuario.Location = new System.Drawing.Point(34, 64);
|
||||
this.lblUsuario.Name = "lblUsuario";
|
||||
this.lblUsuario.Size = new System.Drawing.Size(64, 18);
|
||||
this.lblUsuario.TabIndex = 40;
|
||||
this.lblUsuario.Text = "Usuário:";
|
||||
//
|
||||
// txtSenha
|
||||
//
|
||||
this.txtSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtSenha.Location = new System.Drawing.Point(104, 98);
|
||||
this.txtSenha.Name = "txtSenha";
|
||||
this.txtSenha.PasswordChar = '*';
|
||||
this.txtSenha.Size = new System.Drawing.Size(303, 24);
|
||||
this.txtSenha.TabIndex = 42;
|
||||
//
|
||||
// txtUsuario
|
||||
//
|
||||
this.txtUsuario.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtUsuario.Location = new System.Drawing.Point(104, 61);
|
||||
this.txtUsuario.Name = "txtUsuario";
|
||||
this.txtUsuario.Size = new System.Drawing.Size(303, 24);
|
||||
this.txtUsuario.TabIndex = 37;
|
||||
//
|
||||
// FormLogin
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(464, 196);
|
||||
this.Controls.Add(this.lblLogin);
|
||||
this.Controls.Add(this.txtSenha);
|
||||
this.Controls.Add(this.lblSenha);
|
||||
this.Controls.Add(this.lblUsuario);
|
||||
this.Controls.Add(this.btnAcessar);
|
||||
this.Controls.Add(this.txtUsuario);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "FormLogin";
|
||||
this.Text = "Login";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblLogin;
|
||||
private System.Windows.Forms.Button btnAcessar;
|
||||
private System.Windows.Forms.Label lblSenha;
|
||||
private System.Windows.Forms.Label lblUsuario;
|
||||
private System.Windows.Forms.TextBox txtSenha;
|
||||
private System.Windows.Forms.TextBox txtUsuario;
|
||||
}
|
||||
}
|
33
stuff/Login.cs
Normal file
33
stuff/Login.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ProjetoLPVIII;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
|
||||
namespace TelasProjeto
|
||||
{
|
||||
public partial class FormLogin : Form
|
||||
{
|
||||
public FormLogin()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnAcessar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Funcionario f = ReturnTypes.AReturnFuncionarioByName(txtUsuario.Text);
|
||||
if (ReturnTypes.CheckLogin(txtUsuario.Text, txtSenha.Text) && f.STATUS_PESSOA=="ATIVO")
|
||||
{
|
||||
MessageBox.Show("Login com Sucesso!");
|
||||
|
||||
Form1 frm = new Form1(f);
|
||||
frm.Show();
|
||||
this.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Login errado! Tente Novamente");
|
||||
txtSenha.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Login.resx
Normal file
120
stuff/Login.resx
Normal 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>
|
221
stuff/Retirada_de_livros.Designer.cs
generated
Normal file
221
stuff/Retirada_de_livros.Designer.cs
generated
Normal file
@ -0,0 +1,221 @@
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
partial class Retirada_de_livros
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.txtNomeCliente = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtNomeItem = new System.Windows.Forms.TextBox();
|
||||
this.btnLimpar = new System.Windows.Forms.Button();
|
||||
this.btnSalvar = new System.Windows.Forms.Button();
|
||||
this.txtNomeFuncionario = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.psqCli = new System.Windows.Forms.Button();
|
||||
this.psqItem = new System.Windows.Forms.Button();
|
||||
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
|
||||
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// 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(33, 62);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(60, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Cliente:";
|
||||
//
|
||||
// txtNomeCliente
|
||||
//
|
||||
this.txtNomeCliente.Enabled = false;
|
||||
this.txtNomeCliente.Location = new System.Drawing.Point(148, 58);
|
||||
this.txtNomeCliente.Name = "txtNomeCliente";
|
||||
this.txtNomeCliente.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeCliente.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point(34, 114);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(41, 16);
|
||||
this.label5.TabIndex = 5;
|
||||
this.label5.Text = "Item:";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label6.Location = new System.Drawing.Point(34, 150);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(125, 16);
|
||||
this.label6.TabIndex = 6;
|
||||
this.label6.Text = "Data de retirada:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label7.Location = new System.Drawing.Point(34, 178);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(125, 16);
|
||||
this.label7.TabIndex = 7;
|
||||
this.label7.Text = "Data de Entrega:";
|
||||
//
|
||||
// txtNomeItem
|
||||
//
|
||||
this.txtNomeItem.Enabled = false;
|
||||
this.txtNomeItem.Location = new System.Drawing.Point(148, 114);
|
||||
this.txtNomeItem.Name = "txtNomeItem";
|
||||
this.txtNomeItem.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeItem.TabIndex = 11;
|
||||
//
|
||||
// btnLimpar
|
||||
//
|
||||
this.btnLimpar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLimpar.Location = new System.Drawing.Point(37, 226);
|
||||
this.btnLimpar.Name = "btnLimpar";
|
||||
this.btnLimpar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnLimpar.TabIndex = 14;
|
||||
this.btnLimpar.Text = "Limpar";
|
||||
this.btnLimpar.UseVisualStyleBackColor = true;
|
||||
this.btnLimpar.Click += new System.EventHandler(this.btnLimpar_Click);
|
||||
//
|
||||
// btnSalvar
|
||||
//
|
||||
this.btnSalvar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSalvar.Location = new System.Drawing.Point(118, 226);
|
||||
this.btnSalvar.Name = "btnSalvar";
|
||||
this.btnSalvar.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSalvar.TabIndex = 15;
|
||||
this.btnSalvar.Text = "Salvar";
|
||||
this.btnSalvar.UseVisualStyleBackColor = true;
|
||||
this.btnSalvar.Click += new System.EventHandler(this.btnSalvar_Click);
|
||||
//
|
||||
// txtNomeFuncionario
|
||||
//
|
||||
this.txtNomeFuncionario.Enabled = false;
|
||||
this.txtNomeFuncionario.Location = new System.Drawing.Point(148, 85);
|
||||
this.txtNomeFuncionario.Name = "txtNomeFuncionario";
|
||||
this.txtNomeFuncionario.Size = new System.Drawing.Size(280, 20);
|
||||
this.txtNomeFuncionario.TabIndex = 16;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(34, 89);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(93, 16);
|
||||
this.label2.TabIndex = 17;
|
||||
this.label2.Text = "Funcionario:";
|
||||
//
|
||||
// psqCli
|
||||
//
|
||||
this.psqCli.Location = new System.Drawing.Point(451, 56);
|
||||
this.psqCli.Name = "psqCli";
|
||||
this.psqCli.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqCli.TabIndex = 59;
|
||||
this.psqCli.Text = "Pesquisar";
|
||||
this.psqCli.UseVisualStyleBackColor = true;
|
||||
this.psqCli.Click += new System.EventHandler(this.psqCli_Click);
|
||||
//
|
||||
// psqItem
|
||||
//
|
||||
this.psqItem.Location = new System.Drawing.Point(451, 112);
|
||||
this.psqItem.Name = "psqItem";
|
||||
this.psqItem.Size = new System.Drawing.Size(75, 23);
|
||||
this.psqItem.TabIndex = 61;
|
||||
this.psqItem.Text = "Pesquisar";
|
||||
this.psqItem.UseVisualStyleBackColor = true;
|
||||
this.psqItem.Click += new System.EventHandler(this.psqItem_Click);
|
||||
//
|
||||
// dateTimePicker1
|
||||
//
|
||||
this.dateTimePicker1.Location = new System.Drawing.Point(166, 150);
|
||||
this.dateTimePicker1.Name = "dateTimePicker1";
|
||||
this.dateTimePicker1.Size = new System.Drawing.Size(262, 20);
|
||||
this.dateTimePicker1.TabIndex = 62;
|
||||
//
|
||||
// dateTimePicker2
|
||||
//
|
||||
this.dateTimePicker2.Location = new System.Drawing.Point(166, 178);
|
||||
this.dateTimePicker2.Name = "dateTimePicker2";
|
||||
this.dateTimePicker2.Size = new System.Drawing.Size(262, 20);
|
||||
this.dateTimePicker2.TabIndex = 63;
|
||||
//
|
||||
// Retirada_de_livros
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(602, 278);
|
||||
this.Controls.Add(this.dateTimePicker2);
|
||||
this.Controls.Add(this.dateTimePicker1);
|
||||
this.Controls.Add(this.psqItem);
|
||||
this.Controls.Add(this.psqCli);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.txtNomeFuncionario);
|
||||
this.Controls.Add(this.btnSalvar);
|
||||
this.Controls.Add(this.btnLimpar);
|
||||
this.Controls.Add(this.txtNomeItem);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.txtNomeCliente);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "Retirada_de_livros";
|
||||
this.Text = "Retirada de livros";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtNomeCliente;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtNomeItem;
|
||||
private System.Windows.Forms.Button btnLimpar;
|
||||
private System.Windows.Forms.Button btnSalvar;
|
||||
private System.Windows.Forms.TextBox txtNomeFuncionario;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button psqCli;
|
||||
private System.Windows.Forms.Button psqItem;
|
||||
private System.Windows.Forms.DateTimePicker dateTimePicker1;
|
||||
private System.Windows.Forms.DateTimePicker dateTimePicker2;
|
||||
}
|
||||
}
|
79
stuff/Retirada_de_livros.cs
Normal file
79
stuff/Retirada_de_livros.cs
Normal file
@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Windows.Forms;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
using CSharpLibrary.stuff;
|
||||
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
public partial class Retirada_de_livros : Form
|
||||
{
|
||||
public Cliente c;
|
||||
public Funcionario f;
|
||||
public Item i;
|
||||
|
||||
DateTime d1, d2;
|
||||
|
||||
public Retirada_de_livros(Funcionario f)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.f = f;
|
||||
txtNomeFuncionario.Text = f.nome;
|
||||
}
|
||||
public void UpdateTxt()
|
||||
{
|
||||
if(i != null)
|
||||
txtNomeItem.Text = i.nomeItem;
|
||||
if(c != null)
|
||||
txtNomeCliente.Text = c.nome;
|
||||
}
|
||||
|
||||
private void psqCli_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 7);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqFunc_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 6);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void psqItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
search srch = new search(this, 5);
|
||||
srch.Show();
|
||||
}
|
||||
|
||||
private void btnLimpar_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNomeCliente.Clear();
|
||||
txtNomeItem.Clear();
|
||||
dateTimePicker1.ResetText();
|
||||
dateTimePicker2.ResetText();
|
||||
}
|
||||
|
||||
private void btnSalvar_Click(object sender, EventArgs e)
|
||||
{
|
||||
d1 = dateTimePicker1.Value;
|
||||
d2 = dateTimePicker2.Value;
|
||||
SqlException sql = null;
|
||||
try
|
||||
{
|
||||
Emprestimo ef = new Emprestimo(null, (int)f.id, (int)c.id, i.idItem, d1, d2, "EMPRESTADO");
|
||||
ef.Add();
|
||||
}
|
||||
catch (SqlException g)
|
||||
{
|
||||
sql = g;
|
||||
MessageBox.Show("Falha no empréstimo!");
|
||||
}
|
||||
if (sql == null)
|
||||
{
|
||||
MessageBox.Show("Empréstimo realizado!");
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
stuff/Retirada_de_livros.resx
Normal file
120
stuff/Retirada_de_livros.resx
Normal 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>
|
168
stuff/Tela_Principal.Designer.cs
generated
Normal file
168
stuff/Tela_Principal.Designer.cs
generated
Normal file
@ -0,0 +1,168 @@
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Variável de designer necessária.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Limpar os recursos que estão sendo usados.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true se for necessário descartar os recursos gerenciados; caso contrário, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Código gerado pelo Windows Form Designer
|
||||
|
||||
/// <summary>
|
||||
/// Método necessário para suporte ao Designer - não modifique
|
||||
/// o conteúdo deste método com o editor de código.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.cadastroDeClientesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cadastroDeClientesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.consultarClienteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.livroToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cadastroDeLivrosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.retiraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.registroDeRetiradasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.consultarItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.sairToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cadastroDeClientesToolStripMenuItem,
|
||||
this.livroToolStripMenuItem,
|
||||
this.sairToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(800, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// cadastroDeClientesToolStripMenuItem
|
||||
//
|
||||
this.cadastroDeClientesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cadastroDeClientesToolStripMenuItem1,
|
||||
this.consultarClienteToolStripMenuItem});
|
||||
this.cadastroDeClientesToolStripMenuItem.Name = "cadastroDeClientesToolStripMenuItem";
|
||||
this.cadastroDeClientesToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.cadastroDeClientesToolStripMenuItem.Text = "Clientes";
|
||||
//
|
||||
// cadastroDeClientesToolStripMenuItem1
|
||||
//
|
||||
this.cadastroDeClientesToolStripMenuItem1.Name = "cadastroDeClientesToolStripMenuItem1";
|
||||
this.cadastroDeClientesToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
||||
this.cadastroDeClientesToolStripMenuItem1.Text = "Cadastro de clientes";
|
||||
this.cadastroDeClientesToolStripMenuItem1.Click += new System.EventHandler(this.cadastroDeClientesToolStripMenuItem1_Click);
|
||||
//
|
||||
// consultarClienteToolStripMenuItem
|
||||
//
|
||||
this.consultarClienteToolStripMenuItem.Name = "consultarClienteToolStripMenuItem";
|
||||
this.consultarClienteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.consultarClienteToolStripMenuItem.Text = "Consultar Cliente";
|
||||
this.consultarClienteToolStripMenuItem.Click += new System.EventHandler(this.consultarClienteToolStripMenuItem_Click);
|
||||
//
|
||||
// livroToolStripMenuItem
|
||||
//
|
||||
this.livroToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cadastroDeLivrosToolStripMenuItem,
|
||||
this.retiraToolStripMenuItem,
|
||||
this.registroDeRetiradasToolStripMenuItem,
|
||||
this.consultarItemToolStripMenuItem});
|
||||
this.livroToolStripMenuItem.Name = "livroToolStripMenuItem";
|
||||
this.livroToolStripMenuItem.Size = new System.Drawing.Size(83, 20);
|
||||
this.livroToolStripMenuItem.Text = "Empréstimo";
|
||||
//
|
||||
// cadastroDeLivrosToolStripMenuItem
|
||||
//
|
||||
this.cadastroDeLivrosToolStripMenuItem.Name = "cadastroDeLivrosToolStripMenuItem";
|
||||
this.cadastroDeLivrosToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.cadastroDeLivrosToolStripMenuItem.Text = "Cadastro de Item";
|
||||
this.cadastroDeLivrosToolStripMenuItem.Click += new System.EventHandler(this.cadastroDeLivrosToolStripMenuItem_Click);
|
||||
//
|
||||
// retiraToolStripMenuItem
|
||||
//
|
||||
this.retiraToolStripMenuItem.Name = "retiraToolStripMenuItem";
|
||||
this.retiraToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.retiraToolStripMenuItem.Text = "Criar Empréstimo";
|
||||
this.retiraToolStripMenuItem.Click += new System.EventHandler(this.retiraToolStripMenuItem_Click);
|
||||
//
|
||||
// registroDeRetiradasToolStripMenuItem
|
||||
//
|
||||
this.registroDeRetiradasToolStripMenuItem.Name = "registroDeRetiradasToolStripMenuItem";
|
||||
this.registroDeRetiradasToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.registroDeRetiradasToolStripMenuItem.Text = "Registro de Empréstimos";
|
||||
this.registroDeRetiradasToolStripMenuItem.Click += new System.EventHandler(this.registroDeRetiradasToolStripMenuItem_Click);
|
||||
//
|
||||
// consultarItemToolStripMenuItem
|
||||
//
|
||||
this.consultarItemToolStripMenuItem.Name = "consultarItemToolStripMenuItem";
|
||||
this.consultarItemToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.consultarItemToolStripMenuItem.Text = "Consultar Item";
|
||||
this.consultarItemToolStripMenuItem.Click += new System.EventHandler(this.consultarItemToolStripMenuItem_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(297, 408);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(491, 33);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Sistema Gerenciador Bibliotecário";
|
||||
//
|
||||
// sairToolStripMenuItem
|
||||
//
|
||||
this.sairToolStripMenuItem.Name = "sairToolStripMenuItem";
|
||||
this.sairToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
|
||||
this.sairToolStripMenuItem.Text = "Sair";
|
||||
this.sairToolStripMenuItem.Click += new System.EventHandler(this.sairToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Form1";
|
||||
this.Text = "Tela Principal";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem cadastroDeClientesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem cadastroDeClientesToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem livroToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem cadastroDeLivrosToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem retiraToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem registroDeRetiradasToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem consultarClienteToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem consultarItemToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem sairToolStripMenuItem;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
|
59
stuff/Tela_Principal.cs
Normal file
59
stuff/Tela_Principal.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using CSharpLibrary.SqlTypes;
|
||||
using CSharpLibrary.stuff;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TelasProjeto;
|
||||
|
||||
namespace ProjetoLPVIII
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
Funcionario f = null;
|
||||
public Form1(Funcionario f)
|
||||
{
|
||||
this.f = f;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void retiraToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Retirada_de_livros emp = new Retirada_de_livros(f);
|
||||
emp.Show();
|
||||
}
|
||||
|
||||
private void cadastroDeLivrosToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Cadastro_de_Livros c = new Cadastro_de_Livros();
|
||||
c.Show();
|
||||
}
|
||||
|
||||
private void cadastroDeClientesToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Cadastro_de_Clientes c = new Cadastro_de_Clientes();
|
||||
c.Show();
|
||||
}
|
||||
|
||||
private void consultarClienteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
formConsultarCliente c = new formConsultarCliente();
|
||||
c.Show();
|
||||
}
|
||||
|
||||
private void consultarItemToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form5 c = new Form5();
|
||||
c.Show();
|
||||
}
|
||||
|
||||
private void registroDeRetiradasToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta c = new Consulta();
|
||||
c.Show();
|
||||
}
|
||||
|
||||
private void sairToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
123
stuff/Tela_Principal.resx
Normal file
123
stuff/Tela_Principal.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Reference in New Issue
Block a user