initial commit
This commit is contained in:
commit
6c991cf4a3
13
App.config
Normal file
13
App.config
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
</configSections>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="CSharpLibrary.Properties.Settings.tbTrabalhoConnectionString"
|
||||||
|
connectionString="Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"
|
||||||
|
providerName="System.Data.SqlClient" />
|
||||||
|
</connectionStrings>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
191
CSharpLibrary.csproj
Normal file
191
CSharpLibrary.csproj
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>CSharpLibrary</RootNamespace>
|
||||||
|
<AssemblyName>CSharpLibrary</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject>
|
||||||
|
</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="SqlTypes\Objeto.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SqlTypes\Abstratos.cs" />
|
||||||
|
<Compile Include="SqlTypes\Pessoa.cs" />
|
||||||
|
<Compile Include="stuff\Cliente\Cadastro_de_Clientes.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Cliente\Cadastro_de_Clientes.Designer.cs">
|
||||||
|
<DependentUpon>Cadastro_de_Clientes.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Consulta.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Consulta.Designer.cs">
|
||||||
|
<DependentUpon>Consulta.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\AlterarEmprestimo.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\AlterarEmprestimo.Designer.cs">
|
||||||
|
<DependentUpon>AlterarEmprestimo.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\CadastroLivros.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\CadastroLivros.Designer.cs">
|
||||||
|
<DependentUpon>CadastroLivros.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\AlterarLivro.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\AlterarLivro.Designer.cs">
|
||||||
|
<DependentUpon>AlterarLivro.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Cliente\ConsultaCliente.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Cliente\ConsultaCliente.Designer.cs">
|
||||||
|
<DependentUpon>ConsultaCliente.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Login.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Login.Designer.cs">
|
||||||
|
<DependentUpon>Login.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\ConsultaLivro.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\ConsultaLivro.Designer.cs">
|
||||||
|
<DependentUpon>ConsultaLivro.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Retirada_de_livros.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Retirada_de_livros.Designer.cs">
|
||||||
|
<DependentUpon>Retirada_de_livros.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\search.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Item\search.Designer.cs">
|
||||||
|
<DependentUpon>search.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Tela_Principal.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="stuff\Tela_Principal.Designer.cs">
|
||||||
|
<DependentUpon>Tela_Principal.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="tbTrabalhoDataSet.cs">
|
||||||
|
<DependentUpon>tbTrabalhoDataSet.xsd</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="tbTrabalhoDataSet.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>tbTrabalhoDataSet.xsd</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<EmbeddedResource Include="stuff\Cliente\Cadastro_de_Clientes.resx">
|
||||||
|
<DependentUpon>Cadastro_de_Clientes.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Consulta.resx">
|
||||||
|
<DependentUpon>Consulta.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Item\AlterarEmprestimo.resx">
|
||||||
|
<DependentUpon>AlterarEmprestimo.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Item\CadastroLivros.resx">
|
||||||
|
<DependentUpon>CadastroLivros.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Item\AlterarLivro.resx">
|
||||||
|
<DependentUpon>AlterarLivro.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Cliente\ConsultaCliente.resx">
|
||||||
|
<DependentUpon>ConsultaCliente.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Login.resx">
|
||||||
|
<DependentUpon>Login.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Item\ConsultaLivro.resx">
|
||||||
|
<DependentUpon>ConsultaLivro.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Retirada_de_livros.resx">
|
||||||
|
<DependentUpon>Retirada_de_livros.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Item\search.resx">
|
||||||
|
<DependentUpon>search.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="stuff\Tela_Principal.resx">
|
||||||
|
<DependentUpon>Tela_Principal.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<None Include="tbTrabalhoDataSet.xsc">
|
||||||
|
<DependentUpon>tbTrabalhoDataSet.xsd</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<None Include="tbTrabalhoDataSet.xsd">
|
||||||
|
<Generator>MSDataSetGenerator</Generator>
|
||||||
|
<LastGenOutput>tbTrabalhoDataSet.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
|
<None Include="tbTrabalhoDataSet.xss">
|
||||||
|
<DependentUpon>tbTrabalhoDataSet.xsd</DependentUpon>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
24
Program.cs
Normal file
24
Program.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TelasProjeto;
|
||||||
|
using ProjetoLPVIII;
|
||||||
|
|
||||||
|
namespace CSharpLibrary
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Ponto de entrada principal para o aplicativo.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new FormLogin());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
Properties/AssemblyInfo.cs
Normal file
36
Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// As informações gerais sobre um assembly são controladas por
|
||||||
|
// conjunto de atributos. Altere estes valores de atributo para modificar as informações
|
||||||
|
// associadas a um assembly.
|
||||||
|
[assembly: AssemblyTitle("CSharpLibrary")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("CSharpLibrary")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Definir ComVisible como false torna os tipos neste assembly invisíveis
|
||||||
|
// para componentes COM. Caso precise acessar um tipo neste assembly de
|
||||||
|
// COM, defina o atributo ComVisible como true nesse tipo.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// O GUID a seguir será destinado à ID de typelib se este projeto for exposto para COM
|
||||||
|
[assembly: Guid("beda9585-dde2-44e3-bbca-634dbdeef886")]
|
||||||
|
|
||||||
|
// As informações da versão de um assembly consistem nos quatro valores a seguir:
|
||||||
|
//
|
||||||
|
// Versão Principal
|
||||||
|
// Versão Secundária
|
||||||
|
// Número da Versão
|
||||||
|
// Revisão
|
||||||
|
//
|
||||||
|
// É possível especificar todos os valores ou usar como padrão os Números de Build e da Revisão
|
||||||
|
// usando o "*" como mostrado abaixo:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
36
Properties/Settings.Designer.cs
generated
Normal file
36
Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// O código foi gerado por uma ferramenta.
|
||||||
|
// Versão de Tempo de Execução:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
|
||||||
|
// o código for gerado novamente.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace CSharpLibrary.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True")]
|
||||||
|
public string tbTrabalhoConnectionString {
|
||||||
|
get {
|
||||||
|
return ((string)(this["tbTrabalhoConnectionString"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
Properties/Settings.settings
Normal file
14
Properties/Settings.settings
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CSharpLibrary.Properties" GeneratedClassName="Settings">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="tbTrabalhoConnectionString" Type="(Connection string)" Scope="Application">
|
||||||
|
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||||
|
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<ConnectionString>Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True</ConnectionString>
|
||||||
|
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||||
|
</SerializableConnectionString></DesignTimeValue>
|
||||||
|
<Value Profile="(Default)">Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True</Value>
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
25
ProvaCSharp.sln
Normal file
25
ProvaCSharp.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.30523.141
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpLibrary", "CSharpLibrary.csproj", "{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BEDA9585-DDE2-44E3-BBCA-634DBDEEF886}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {D324444E-D9CB-46AA-A282-E7BB69847F70}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
586
SqlTypes/Abstratos.cs
Normal file
586
SqlTypes/Abstratos.cs
Normal file
@ -0,0 +1,586 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace CSharpLibrary.SqlTypes
|
||||||
|
{
|
||||||
|
public abstract class Component
|
||||||
|
{
|
||||||
|
public static readonly string strcon = "Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True";
|
||||||
|
|
||||||
|
public static SqlCommand select, insert, delete, update;
|
||||||
|
|
||||||
|
public SqlConnection con = new SqlConnection(strcon);
|
||||||
|
|
||||||
|
public abstract void Add();
|
||||||
|
public abstract void Edit(int id, List<string> vlr);
|
||||||
|
public abstract bool Remove(int id);
|
||||||
|
|
||||||
|
// Retornar valores -- implementados dps...
|
||||||
|
|
||||||
|
public bool checkLen(int len, int intent)
|
||||||
|
{
|
||||||
|
if (len <= (intent + 1))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class Pessoa : Component
|
||||||
|
{
|
||||||
|
public int? id;
|
||||||
|
public string nome;
|
||||||
|
public string rg;
|
||||||
|
public string cpf;
|
||||||
|
public string tel;
|
||||||
|
public string cel;
|
||||||
|
public string rua;
|
||||||
|
public string num;
|
||||||
|
public string cidade;
|
||||||
|
public string STATUS_PESSOA;
|
||||||
|
|
||||||
|
protected Pessoa(int? id, string nome, string rg, string cpf, string tel, string cel, string rua, string num, string cidade, string STATUS_PESSOA)
|
||||||
|
{
|
||||||
|
if(id != null)
|
||||||
|
this.id = id;
|
||||||
|
this.nome = checkLen(nome.Length, 50) ? nome : throw new Exception();
|
||||||
|
this.rg = checkLen(rg.Length, 12) ? cel : throw new Exception();
|
||||||
|
this.cpf = checkLen(cpf.Length, 11) ? cpf : throw new Exception();
|
||||||
|
this.tel = checkLen(tel.Length, 10) ? tel : throw new Exception();
|
||||||
|
this.cel = checkLen(cel.Length, 11) ? cel : throw new Exception();
|
||||||
|
this.rua = checkLen(rua.Length, 100) ? rua : throw new Exception();
|
||||||
|
this.num = checkLen(num.Length, 4) ? num : throw new Exception();
|
||||||
|
this.cidade = checkLen(cidade.Length, 30) ? cidade : throw new Exception();
|
||||||
|
this.STATUS_PESSOA = STATUS_PESSOA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ReturnTypes
|
||||||
|
{
|
||||||
|
|
||||||
|
// ------------------- Returns Normais ------------------- //
|
||||||
|
public static Autor AReturnAutorByName(string nome)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public static Emprestimo AReturnEmprestimo(int i)
|
||||||
|
{
|
||||||
|
Emprestimo g = null;
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
|
||||||
|
con.Open();
|
||||||
|
Emprestimo.select = new SqlCommand("SELECT * from tbEmprestimo WHERE idEmprestimo = @nome", con);
|
||||||
|
Emprestimo.select.Parameters.Add("@nome", SqlDbType.Int).Value = i;
|
||||||
|
Emprestimo.select.Prepare();
|
||||||
|
|
||||||
|
SqlDataReader r2 = Emprestimo.select.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
{
|
||||||
|
g = new Emprestimo(
|
||||||
|
r2.GetInt32(0),
|
||||||
|
r2.GetInt32(1),
|
||||||
|
r2.GetInt32(2),
|
||||||
|
r2.GetInt32(3),
|
||||||
|
r2.GetDateTime(4),
|
||||||
|
r2.GetDateTime(5),
|
||||||
|
r2.GetString(6)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
public static Item AReturnItem(int i)
|
||||||
|
{
|
||||||
|
Item g = null;
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
|
||||||
|
con.Open();
|
||||||
|
Item.select = new SqlCommand("SELECT * from tbItem WHERE idItem = @nome", con);
|
||||||
|
Item.select.Parameters.Add("@nome", SqlDbType.Int).Value = i;
|
||||||
|
Item.select.Prepare();
|
||||||
|
|
||||||
|
SqlDataReader r2 = Item.select.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
{
|
||||||
|
g = new Item(r2.GetInt32(0), r2.GetString(1), r2.GetInt32(2), r2.GetInt32(3), r2.GetInt32(4), r2.GetInt32(5), r2.GetString(6), r2.GetString(7));
|
||||||
|
}
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cliente AReturnCliente(int i)
|
||||||
|
{
|
||||||
|
Cliente g = null;
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
|
||||||
|
con.Open();
|
||||||
|
Cliente.select = new SqlCommand("SELECT * from tbCliente WHERE idCliente = @nome", con);
|
||||||
|
Cliente.select.Parameters.Add("@nome", SqlDbType.Int).Value = i;
|
||||||
|
Cliente.select.Prepare();
|
||||||
|
|
||||||
|
SqlDataReader r2 = Cliente.select.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
{
|
||||||
|
g = new Cliente(
|
||||||
|
r2.GetInt32(0),
|
||||||
|
r2.GetString(1),
|
||||||
|
r2.GetString(2),
|
||||||
|
r2.GetString(3),
|
||||||
|
r2.GetString(4),
|
||||||
|
r2.GetString(5),
|
||||||
|
r2.GetString(6),
|
||||||
|
r2.GetString(7),
|
||||||
|
r2.GetString(8),
|
||||||
|
r2.GetString(9)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
public static Funcionario AReturnFuncionario(int i)
|
||||||
|
{
|
||||||
|
Funcionario g = null;
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
|
||||||
|
con.Open();
|
||||||
|
Funcionario.select = new SqlCommand("SELECT * from tbFuncionario WHERE idFunc = @nome", con);
|
||||||
|
Funcionario.select.Parameters.Add("@nome", SqlDbType.Int).Value = i;
|
||||||
|
Funcionario.select.Prepare();
|
||||||
|
|
||||||
|
SqlDataReader r2 = Funcionario.select.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
{
|
||||||
|
g = new Funcionario(
|
||||||
|
r2.GetInt32(0),
|
||||||
|
r2.GetString(1),
|
||||||
|
r2.GetString(2),
|
||||||
|
r2.GetString(3),
|
||||||
|
r2.GetString(4),
|
||||||
|
r2.GetString(5),
|
||||||
|
r2.GetString(6),
|
||||||
|
r2.GetString(7),
|
||||||
|
r2.GetString(8),
|
||||||
|
r2.GetString(9),
|
||||||
|
r2.GetString(10),
|
||||||
|
r2.GetString(11)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
public static Funcionario AReturnFuncionarioByName(string i)
|
||||||
|
{
|
||||||
|
Funcionario g = null;
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
|
||||||
|
con.Open();
|
||||||
|
Funcionario.select = new SqlCommand("SELECT * from tbFuncionario WHERE usuarioFunc = @user", con);
|
||||||
|
Funcionario.select.Parameters.Add("@user", SqlDbType.NVarChar,15).Value = i;
|
||||||
|
Funcionario.select.Prepare();
|
||||||
|
|
||||||
|
SqlDataReader r2 = Item.select.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
{
|
||||||
|
g = new Funcionario(
|
||||||
|
r2.GetInt32(0),
|
||||||
|
r2.GetString(1),
|
||||||
|
r2.GetString(2),
|
||||||
|
r2.GetString(3),
|
||||||
|
r2.GetString(4),
|
||||||
|
r2.GetString(5),
|
||||||
|
r2.GetString(6),
|
||||||
|
r2.GetString(7),
|
||||||
|
r2.GetString(8),
|
||||||
|
r2.GetString(9),
|
||||||
|
r2.GetString(10),
|
||||||
|
r2.GetString(11)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------- DataSets ------------------- //
|
||||||
|
public static DataSet DSReturnAutorByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Autor.select = new SqlCommand("SELECT * from tbAutor WHERE nomeAutor LIKE @nome", con);
|
||||||
|
Autor.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Autor.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Autor.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DataSet DSReturnGeneroByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Genero.select = new SqlCommand("SELECT * from tbGenero WHERE nomeGenero LIKE @nome", con);
|
||||||
|
Genero.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Genero.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Genero.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnClienteByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Cliente.select = new SqlCommand("SELECT * from tbCliente WHERE nomeCliente LIKE @nome", con);
|
||||||
|
Cliente.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Cliente.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Cliente.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnFuncionarioByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Funcionario.select = new SqlCommand("SELECT * from tbFuncionario WHERE nomeFunc LIKE @nome", con);
|
||||||
|
Funcionario.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Funcionario.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Funcionario.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnTipoByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Item.select = new SqlCommand("SELECT * from tbTipo WHERE nomeTipo LIKE @nome", con);
|
||||||
|
Item.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Item.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Item.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnItemByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Item.select = new SqlCommand("SELECT " +
|
||||||
|
"i.idItem, i.nomeItem, a.nomeAutor, g.nomeGenero, e.nomeEditora, t.nomeTipo, i.isbnItem, i.statusItem " +
|
||||||
|
"from tbItem i " +
|
||||||
|
"INNER JOIN tbAutor a ON i.idAutor = a.idAutor " +
|
||||||
|
"INNER JOIN tbGenero g ON i.generoItem = g.idGenero " +
|
||||||
|
"INNER JOIN tbEditora e on i.editoraItem = e.idEditora " +
|
||||||
|
"INNER JOIN tbTipo t on i.tipoItem = t.idTipo " +
|
||||||
|
"WHERE i.nomeItem LIKE @nome", con);
|
||||||
|
Item.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%"+nome+"%";
|
||||||
|
Item.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Item.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnEditoraByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Editora.select = new SqlCommand("SELECT * from tbEditora WHERE nomeEditora LIKE @nome", con);
|
||||||
|
Editora.select.Parameters.Add("@nome", SqlDbType.NVarChar).Value = "%" + nome + "%";
|
||||||
|
Editora.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Editora.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnEmprestimoByName(string nome)
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Emprestimo.select = new SqlCommand("SELECT " +
|
||||||
|
"e.idEmprestimo as #, c.nomeCliente as Cliente, f.nomeFunc as Funcionario, i.nomeItem as Item, e.dataEmprestimo as Emprestado, e.dataDevolucao as Devolvido, e.statusEmprestimo as Estado " +
|
||||||
|
"FROM tbEmprestimo e " +
|
||||||
|
"INNER JOIN tbCliente c ON e.idCliente = c.idCliente " +
|
||||||
|
"INNER JOIN tbFuncionario f ON e.idFunc = f.idFunc " +
|
||||||
|
"INNER JOIN tbItem i on e.idItem = i.idItem " +
|
||||||
|
"WHERE c.nomeCliente LIKE @nomeCliente", con);
|
||||||
|
|
||||||
|
Emprestimo.select.Parameters.Add("@nomeCliente", SqlDbType.NVarChar, 50).Value = "%" + nome + "%";
|
||||||
|
Emprestimo.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Emprestimo.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static DataSet DSReturnEmprestimoAtivo()
|
||||||
|
{
|
||||||
|
DataSet tmp = new DataSet();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Emprestimo.select = new SqlCommand("SELECT " +
|
||||||
|
"e.idEmprestimo as #, c.nomeCliente as Cliente, f.nomeFunc as Funcionario, i.nomeItem as Item, e.dataEmprestimo as Emprestado, e.dataDevolucao as Devolvido, e.statusEmprestimo as Estado " +
|
||||||
|
"FROM tbEmprestimo e " +
|
||||||
|
"INNER JOIN tbCliente c ON e.idCliente = c.idCliente " +
|
||||||
|
"INNER JOIN tbFuncionario f ON e.idFunc = f.idFunc " +
|
||||||
|
"INNER JOIN tbItem i on e.idItem = i.idItem", con);
|
||||||
|
|
||||||
|
Emprestimo.select.ExecuteNonQuery();
|
||||||
|
|
||||||
|
SqlDataAdapter da = new SqlDataAdapter();
|
||||||
|
da.SelectCommand = Emprestimo.select;
|
||||||
|
|
||||||
|
da.Fill(tmp);
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------------------------------------- //
|
||||||
|
public static List<int> ReturnEmprestimoVals(string nomeFunc, string nomeCliente, string nomeItem)
|
||||||
|
{
|
||||||
|
List<int> tmp = new List<int>();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
SqlCommand tmpSql1 = new SqlCommand("SELECT idFunc from tbFuncionario WHERE nomeFunc = @nomeFunc", con);
|
||||||
|
SqlCommand tmpSql2 = new SqlCommand("SELECT idCliente from tbCliente WHERE nomeCliente = @nomeCliente", con);
|
||||||
|
SqlCommand tmpSql3 = new SqlCommand("SELECT idItem from tbItem WHERE nomeItem = @nomeItem", con);
|
||||||
|
|
||||||
|
tmpSql1.Parameters.Add("@nomeFunc", SqlDbType.NVarChar, 50).Value = nomeFunc;
|
||||||
|
tmpSql1.Prepare();
|
||||||
|
SqlDataReader r1 = tmpSql1.ExecuteReader();
|
||||||
|
while (r1.Read())
|
||||||
|
tmp.Add(r1.GetInt32(0));
|
||||||
|
r1.Close();
|
||||||
|
|
||||||
|
tmpSql2.Parameters.Add("@nomeCliente", SqlDbType.NVarChar, 50).Value = nomeCliente;
|
||||||
|
tmpSql2.Prepare();
|
||||||
|
SqlDataReader r2 = tmpSql2.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
tmp.Add(r2.GetInt32(0));
|
||||||
|
r2.Close();
|
||||||
|
|
||||||
|
tmpSql3.Parameters.Add("@nomeItem", SqlDbType.NVarChar, 50).Value = nomeItem;
|
||||||
|
tmpSql3.Prepare();
|
||||||
|
SqlDataReader r3 = tmpSql3.ExecuteReader();
|
||||||
|
while (r3.Read())
|
||||||
|
tmp.Add(r3.GetInt32(0));
|
||||||
|
r3.Close();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<int> ReturnItemVals(string Autor, string Genero, string Editora, string Tipo)
|
||||||
|
{
|
||||||
|
List<int> tmp = new List<int>();
|
||||||
|
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
SqlCommand tmpSql1 = new SqlCommand("SELECT idAutor from tbAutor WHERE nomeAutor = @nomeAutor", con);
|
||||||
|
SqlCommand tmpSql2 = new SqlCommand("SELECT idGenero from tbGenero WHERE nomeGenero = @nomeGenero", con);
|
||||||
|
SqlCommand tmpSql3 = new SqlCommand("SELECT idEditora from tbEditora WHERE nomeEditora = @nomeEditora", con);
|
||||||
|
SqlCommand tmpSql4 = new SqlCommand("SELECT idTipo from tbTipo WHERE nomeTipo = @nomeTipo", con);
|
||||||
|
|
||||||
|
tmpSql1.Parameters.Add("@nomeAutor", SqlDbType.NVarChar, 200).Value = Autor;
|
||||||
|
tmpSql1.Prepare();
|
||||||
|
SqlDataReader r1 = tmpSql1.ExecuteReader();
|
||||||
|
while (r1.Read())
|
||||||
|
tmp.Add(r1.GetInt32(0));
|
||||||
|
r1.Close();
|
||||||
|
|
||||||
|
tmpSql2.Parameters.Add("@nomeGenero", SqlDbType.NVarChar, 30).Value = Genero;
|
||||||
|
tmpSql2.Prepare();
|
||||||
|
SqlDataReader r2 = tmpSql1.ExecuteReader();
|
||||||
|
while (r2.Read())
|
||||||
|
tmp.Add(r2.GetInt32(0));
|
||||||
|
r2.Close();
|
||||||
|
|
||||||
|
tmpSql3.Parameters.Add("@nomeEditora", SqlDbType.NVarChar, 30).Value = Editora;
|
||||||
|
tmpSql3.Prepare();
|
||||||
|
SqlDataReader r3 = tmpSql1.ExecuteReader();
|
||||||
|
while (r3.Read())
|
||||||
|
tmp.Add(r3.GetInt32(0));
|
||||||
|
r3.Close();
|
||||||
|
|
||||||
|
tmpSql4.Parameters.Add("@nomeTipo", SqlDbType.NVarChar, 30).Value = Tipo;
|
||||||
|
tmpSql4.Prepare();
|
||||||
|
SqlDataReader r4 = tmpSql1.ExecuteReader();
|
||||||
|
while (r4.Read())
|
||||||
|
tmp.Add(r4.GetInt32(0));
|
||||||
|
r4.Close();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public static List<Tuple<int,string,string,string,DateTime,DateTime,string>> ReturnEmprestimoByName(string nomeCliente)
|
||||||
|
{
|
||||||
|
List<Tuple<int, string, string, string, DateTime, DateTime, string>> tmp = new List<Tuple<int, string, string, string, DateTime, DateTime, string>>();
|
||||||
|
using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True"))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
Emprestimo.select = new SqlCommand("SELECT " +
|
||||||
|
"e.idEmprestimo, f.nomeFunc, c.nomeCliente, i.nomeItem, e.dataEmprestimo, e.dataDevolucao, e.statusEmprestimo " +
|
||||||
|
"FROM tbEmprestimo e " +
|
||||||
|
"INNER JOIN tbCliente c ON e.idCliente = c.idCliente " +
|
||||||
|
"INNER JOIN tbFuncionario f ON e.idFunc = f.idFunc " +
|
||||||
|
"INNER JOIN tbItem i on e.idItem = i.idItem " +
|
||||||
|
"WHERE c.nomeCliente LIKE @nomeCliente", con);
|
||||||
|
|
||||||
|
Emprestimo.select.Parameters.Add("@nomeCliente", SqlDbType.NVarChar, 50).Value = "%" + nomeCliente + "%";
|
||||||
|
Emprestimo.select.Prepare();
|
||||||
|
|
||||||
|
using (SqlDataReader r = Emprestimo.select.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (r.Read())
|
||||||
|
{
|
||||||
|
tmp.Add(
|
||||||
|
new Tuple<int,string, string, string, DateTime, DateTime, string>
|
||||||
|
(
|
||||||
|
r.GetInt32(0),
|
||||||
|
r.GetString(1),
|
||||||
|
r.GetString(2),
|
||||||
|
r.GetString(3),
|
||||||
|
r.GetDateTime(4),
|
||||||
|
r.GetDateTime(5),
|
||||||
|
r.GetString(6)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Verificar Login * //
|
||||||
|
public static bool CheckLogin(string USER, string PASSWD)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlConnection con = new SqlConnection("Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True");
|
||||||
|
con.Open();
|
||||||
|
List < Tuple<string, string>> a = new List<Tuple<string, string>>();
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
Funcionario.select = new SqlCommand("SELECT usuarioFunc, senhaFunc FROM " +
|
||||||
|
"tbFuncionario", con);
|
||||||
|
|
||||||
|
using (SqlDataReader r = Funcionario.select.ExecuteReader())
|
||||||
|
{
|
||||||
|
while(r.Read())
|
||||||
|
{
|
||||||
|
a.Add(
|
||||||
|
new Tuple<string,string>
|
||||||
|
(
|
||||||
|
r.GetString(0),
|
||||||
|
r.GetString(1)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
con.Close();
|
||||||
|
|
||||||
|
foreach(Tuple<string,string> e in a)
|
||||||
|
{
|
||||||
|
if(e.Item1 == USER)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (e.Item2 == PASSWD)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == 2)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
522
SqlTypes/Objeto.cs
Normal file
522
SqlTypes/Objeto.cs
Normal file
@ -0,0 +1,522 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace CSharpLibrary.SqlTypes
|
||||||
|
{
|
||||||
|
public class Emprestimo : Component
|
||||||
|
{
|
||||||
|
public int idEmprestimo, idFunc, idItem, idCliente;
|
||||||
|
public DateTime dtEmprestimo;
|
||||||
|
public DateTime dtDevolucao;
|
||||||
|
public string statusEmprestimo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Emprestimo(int? idE, int idF, int idC, int idI, DateTime dtE, DateTime dtD, string stE)
|
||||||
|
{
|
||||||
|
if(idE != null)
|
||||||
|
idEmprestimo = (int)idE;
|
||||||
|
idFunc = idF;
|
||||||
|
idItem = idI;
|
||||||
|
idCliente = idC;
|
||||||
|
dtEmprestimo = dtE;
|
||||||
|
dtDevolucao = dtD;
|
||||||
|
statusEmprestimo = stE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Tuple<int, string , string, DateTime , DateTime , string>> ReturnList()
|
||||||
|
{
|
||||||
|
List<Tuple<int, string, string, DateTime, DateTime, string>> tmp = new List<Tuple<int, string, string, DateTime, DateTime, string>>();
|
||||||
|
|
||||||
|
using(con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
select = new SqlCommand("SELECT " +
|
||||||
|
"e.idEmprestimo, f.nomeFunc, c.nomeCliente, i.nomeItem, e.dataEmprestimo, e.dataDevolucao, e.statusEmprestimo " +
|
||||||
|
"FROM tbEmprestimo e " +
|
||||||
|
"INNER JOIN tbCliente c ON e.idCliente = c.idCliente " +
|
||||||
|
"INNER JOIN tbFuncionario f ON e.idFunc = f.idFunc " +
|
||||||
|
"INNER JOIN tbItem i on e.idItem = i.idItem", con);
|
||||||
|
con.Close();
|
||||||
|
|
||||||
|
using (SqlDataReader r = select.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (r.Read())
|
||||||
|
{
|
||||||
|
tmp.Add(
|
||||||
|
new Tuple<int, string, string, DateTime, DateTime, string>
|
||||||
|
(
|
||||||
|
r.GetInt32(0),
|
||||||
|
r.GetString(1),
|
||||||
|
r.GetString(2),
|
||||||
|
r.GetDateTime(3),
|
||||||
|
r.GetDateTime(4),
|
||||||
|
r.GetString(5)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using(con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
insert = new SqlCommand("INSERT INTO tbEmprestimo(idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo) " +
|
||||||
|
"VALUES (@idFunc, @idCliente, @idItem, @dtEmprestimo, @dtDevolucao, @statusEmprestimo)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@idFunc", SqlDbType.Int).Value = idFunc;
|
||||||
|
insert.Parameters.Add("@idCliente", SqlDbType.Int).Value = idCliente;
|
||||||
|
insert.Parameters.Add("@idItem", SqlDbType.Int).Value = idItem;
|
||||||
|
insert.Parameters.Add("@dtEmprestimo", SqlDbType.DateTime).Value = dtEmprestimo;
|
||||||
|
insert.Parameters.Add("@dtDevolucao", SqlDbType.DateTime).Value = dtDevolucao;
|
||||||
|
insert.Parameters.Add("@statusEmprestimo", SqlDbType.NVarChar, 10).Value = statusEmprestimo;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
List<int> tmp = ReturnTypes.ReturnEmprestimoVals(vlr[0], vlr[1], vlr[2]);
|
||||||
|
|
||||||
|
idEmprestimo = id;
|
||||||
|
idFunc = tmp[0];
|
||||||
|
idCliente = tmp[1];
|
||||||
|
idItem = tmp[2];
|
||||||
|
|
||||||
|
dtEmprestimo = DateTime.Parse(vlr[3]);
|
||||||
|
dtDevolucao = DateTime.Parse(vlr[4]);
|
||||||
|
|
||||||
|
statusEmprestimo = vlr[5];
|
||||||
|
using (con) {
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand(
|
||||||
|
"UPDATE tbEmprestimo " +
|
||||||
|
"SET idFunc = @idFunc, " +
|
||||||
|
"idCliente = @idCliente, " +
|
||||||
|
"idItem = @idItem, " +
|
||||||
|
"dataEmprestimo = @dtEmprestimo, " +
|
||||||
|
"dataDevolucao = @dtDevolucao, " +
|
||||||
|
"statusEmprestimo = @statusEmprestimo " +
|
||||||
|
"WHERE idEmprestimo = @idEmprestimo", con
|
||||||
|
);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idFunc", SqlDbType.Int).Value = idFunc;
|
||||||
|
update.Parameters.Add("@idCliente", SqlDbType.Int).Value = idCliente;
|
||||||
|
update.Parameters.Add("@idItem", SqlDbType.Int).Value = idItem;
|
||||||
|
update.Parameters.Add("@dtEmprestimo", SqlDbType.DateTime).Value = dtEmprestimo;
|
||||||
|
update.Parameters.Add("@dtDevolucao", SqlDbType.DateTime).Value = dtDevolucao;
|
||||||
|
update.Parameters.Add("@statusEmprestimo", SqlDbType.NVarChar, 10).Value = statusEmprestimo;
|
||||||
|
update.Parameters.Add("@idEmprestimo", SqlDbType.Int).Value = idEmprestimo;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
con.Open();
|
||||||
|
delete = new SqlCommand(
|
||||||
|
"UPDATE tbEmprestimo " +
|
||||||
|
"SET statusEmprestimo = 'ENTREGUE' " +
|
||||||
|
"WHERE idEmprestimo = @idEmprestimo", con
|
||||||
|
);
|
||||||
|
delete.Parameters.Add("@idEmprestimo", SqlDbType.Int).Value = id;
|
||||||
|
delete.Prepare();
|
||||||
|
delete.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
catch(SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Genero : Component
|
||||||
|
{
|
||||||
|
int idGenero;
|
||||||
|
string nomeGenero;
|
||||||
|
|
||||||
|
public Genero(int? idG, string nome)
|
||||||
|
{
|
||||||
|
if (idG != null)
|
||||||
|
idGenero = (int)idG;
|
||||||
|
nomeGenero = nome;
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using(con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
insert = new SqlCommand("INSERT INTO tbGenero(nomeGenero) VALUES (@nomeGenero)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeGenero", SqlDbType.NVarChar, 30).Value = nomeGenero;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
idGenero = id;
|
||||||
|
nomeGenero = vlr[0];
|
||||||
|
|
||||||
|
using(con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbGenero SET nomeGenero = @nomeGenero WHERE idGenero = @idGenero",con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idGenero", SqlDbType.Int).Value = idGenero;
|
||||||
|
update.Parameters.Add("@nomeGenero", SqlDbType.NVarChar, 30).Value = nomeGenero;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
List<string> tmp = new List<string>{"DELETADO"};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Edit(id, tmp);
|
||||||
|
}
|
||||||
|
catch(SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Item : Component
|
||||||
|
{
|
||||||
|
public int idItem, idAutor, generoItem, editoraItem, tipoItem;
|
||||||
|
public string nomeItem, isbnItem, statusItem;
|
||||||
|
public Item(int? idT, string nI, int idA, int gI, int edI, int tpI, string isbn, string stI) {
|
||||||
|
if (idT != null)
|
||||||
|
idItem = (int)idT;
|
||||||
|
nomeItem = nI;
|
||||||
|
idAutor = idA;
|
||||||
|
generoItem = gI;
|
||||||
|
editoraItem = edI;
|
||||||
|
tipoItem = tpI;
|
||||||
|
isbnItem = isbn;
|
||||||
|
statusItem = stI;
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
insert = new SqlCommand("INSERT INTO tbItem(nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem) " +
|
||||||
|
"VALUES (@nomeItem, @idAutor, @generoItem, @editoraItem, @tipoItem, @isbnItem, @statusItem)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeItem", SqlDbType.NVarChar, 50).Value = nomeItem;
|
||||||
|
insert.Parameters.Add("@isbnItem", SqlDbType.NVarChar, 13).Value = isbnItem;
|
||||||
|
insert.Parameters.Add("@statusItem", SqlDbType.NVarChar, 10).Value = statusItem;
|
||||||
|
insert.Parameters.Add("@idAutor", SqlDbType.Int).Value = idAutor;
|
||||||
|
insert.Parameters.Add("@generoItem", SqlDbType.Int).Value = generoItem;
|
||||||
|
insert.Parameters.Add("@editoraItem", SqlDbType.Int).Value = editoraItem;
|
||||||
|
insert.Parameters.Add("@tipoItem", SqlDbType.Int).Value = tipoItem;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
List<int> ids = ReturnTypes.ReturnItemVals(vlr[1], vlr[2], vlr[3], vlr[4]);
|
||||||
|
idItem = id;
|
||||||
|
idAutor = ids[0];
|
||||||
|
generoItem = ids[1];
|
||||||
|
editoraItem = ids[2];
|
||||||
|
tipoItem = ids[3];
|
||||||
|
|
||||||
|
nomeItem = vlr[0];
|
||||||
|
// Return para pegar PK!!
|
||||||
|
// Vlr[0], [5], [6] -> nomeItem, isbnItem, statusItem;
|
||||||
|
// Vlr[1], [2], [3], [4] -> idAutor,generoItem,editoraItem,tipoItem;
|
||||||
|
|
||||||
|
isbnItem = vlr[5];
|
||||||
|
statusItem = vlr[6];
|
||||||
|
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand(
|
||||||
|
"UPDATE tbItem " +
|
||||||
|
"SET nomeItem = @nomeItem, " +
|
||||||
|
"idAutor = @idAutor, " +
|
||||||
|
"generoItem = @generoItem, " +
|
||||||
|
"editoraItem = @editoraItem, " +
|
||||||
|
"tipoItem = @tipoItem, " +
|
||||||
|
"isbnItem = @isbnItem, " +
|
||||||
|
"statusItem = @statusItem " +
|
||||||
|
"WHERE idItem = @idItem", con
|
||||||
|
);
|
||||||
|
|
||||||
|
update.Parameters.Add("@nomeItem", SqlDbType.NVarChar,50).Value = nomeItem;
|
||||||
|
update.Parameters.Add("@idAutor", SqlDbType.Int).Value = idAutor;
|
||||||
|
update.Parameters.Add("@generoItem", SqlDbType.Int).Value = generoItem;
|
||||||
|
update.Parameters.Add("@editoraItem", SqlDbType.Int).Value = editoraItem;
|
||||||
|
update.Parameters.Add("@tipoItem", SqlDbType.Int).Value = tipoItem;
|
||||||
|
update.Parameters.Add("@isbnItem", SqlDbType.NVarChar, 13).Value = isbnItem;
|
||||||
|
update.Parameters.Add("@statusItem", SqlDbType.NVarChar,10).Value = statusItem;
|
||||||
|
|
||||||
|
update.Parameters.Add("@idItem", SqlDbType.Int).Value = idItem;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
delete = new SqlCommand(
|
||||||
|
"UPDATE tbItem " +
|
||||||
|
"SET statusItem = 'DESATIVADO' " +
|
||||||
|
"WHERE idItem = @idItem", con
|
||||||
|
);
|
||||||
|
delete.Parameters.Add("@idItem", SqlDbType.Int).Value = id;
|
||||||
|
delete.Prepare();
|
||||||
|
delete.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Tipo : Component
|
||||||
|
{
|
||||||
|
int idTipo;
|
||||||
|
string nomeTipo;
|
||||||
|
|
||||||
|
public Tipo(int? id, string nome)
|
||||||
|
{
|
||||||
|
if (id != null)
|
||||||
|
idTipo = (int)id;
|
||||||
|
|
||||||
|
nomeTipo = nome;
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
insert = new SqlCommand("INSERT INTO tbTipo(nomeTipo) VALUES (@nomeTipo)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeTipo", SqlDbType.NVarChar, 30).Value = nomeTipo;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
idTipo = id;
|
||||||
|
nomeTipo = vlr[0];
|
||||||
|
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbTipo SET nomeTipo = @nomeTipo WHERE idTipo = @idTipo", con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idTipo", SqlDbType.Int).Value = idTipo;
|
||||||
|
update.Parameters.Add("@nomeTipo", SqlDbType.NVarChar, 30).Value = nomeTipo;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
List<string> tmp = new List<string> { "DELETADO" };
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Edit(id, tmp);
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Editora : Component
|
||||||
|
{
|
||||||
|
int idEditora;
|
||||||
|
string nomeEditora;
|
||||||
|
|
||||||
|
public Editora(int? id, string nome)
|
||||||
|
{
|
||||||
|
if (id != null)
|
||||||
|
idEditora = (int)id;
|
||||||
|
nomeEditora = nome;
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
insert = new SqlCommand("INSERT INTO tbEditora(nomeEditora) VALUES (@nomeEditora)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeEditora", SqlDbType.NVarChar, 30).Value = nomeEditora;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
idEditora = id;
|
||||||
|
nomeEditora = vlr[0];
|
||||||
|
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbEditora SET nomeEditora = @nomeEditora WHERE idEditora = @idEditora", con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idEditora", SqlDbType.Int).Value = idEditora;
|
||||||
|
update.Parameters.Add("@nomeEditora", SqlDbType.NVarChar, 30).Value = nomeEditora;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
List<string> tmp = new List<string> { "DELETADO" };
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Edit(id, tmp);
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Autor : Component
|
||||||
|
{
|
||||||
|
int idAutor;
|
||||||
|
string nomeAutor;
|
||||||
|
|
||||||
|
public Autor(int? id, string nome)
|
||||||
|
{
|
||||||
|
if (id != null)
|
||||||
|
idAutor = (int)id;
|
||||||
|
|
||||||
|
nomeAutor = nome;
|
||||||
|
}
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
insert = new SqlCommand("INSERT INTO tbAutor(nomeAutor) VALUES (@nomeAutor)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeAutor", SqlDbType.NVarChar, 30).Value = nomeAutor;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
idAutor = id;
|
||||||
|
nomeAutor = vlr[0];
|
||||||
|
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbAutor SET nomeAutor = @nomeAutor WHERE idAutor = @idAutor", con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idAutor", SqlDbType.Int).Value = idAutor;
|
||||||
|
update.Parameters.Add("@nomeAutor", SqlDbType.NVarChar, 200).Value = nomeAutor;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
List<string> tmp = new List<string> { "DELETADO" };
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Edit(id, tmp);
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
234
SqlTypes/Pessoa.cs
Normal file
234
SqlTypes/Pessoa.cs
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace CSharpLibrary.SqlTypes
|
||||||
|
{
|
||||||
|
public class Funcionario : Pessoa
|
||||||
|
{
|
||||||
|
public string user;
|
||||||
|
public string senha;
|
||||||
|
|
||||||
|
public Funcionario(int? id, string nome, string rg, string cpf,
|
||||||
|
string tel, string cel, string rua, string num, string cidade,
|
||||||
|
string STATUS_PESSOA, string user, string senha):
|
||||||
|
|
||||||
|
base(id, nome, rg, cpf,
|
||||||
|
tel, cel, rua,
|
||||||
|
num, cidade,
|
||||||
|
STATUS_PESSOA)
|
||||||
|
|
||||||
|
{
|
||||||
|
this.user = checkLen(user.Length, 15) ? user : throw new Exception();
|
||||||
|
this.senha = checkLen(senha.Length, 15) ? senha : throw new Exception();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
insert = new SqlCommand("INSERT INTO tbFuncionario(nomeFunc,rgFunc,cpfFunc,telFunc,celFunc,ruaFunc,numeroFunc,cidadeFunc,statusFunc,usuarioFunc,senhaFunc) " +
|
||||||
|
"VALUES (@nomeFunc,@rgFunc,@cpfFunc,@telFunc,@celFunc,@ruaFunc,@numeroFunc,@cidadeFunc,@statusFunc,@usuarioFunc,@senhaFunc)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeFunc", SqlDbType.NVarChar, 50).Value = nome;
|
||||||
|
insert.Parameters.Add("@rgFunc", SqlDbType.NVarChar, 12).Value = rg;
|
||||||
|
insert.Parameters.Add("@cpfFunc", SqlDbType.NVarChar, 11).Value = cpf;
|
||||||
|
insert.Parameters.Add("@telFunc", SqlDbType.NVarChar, 10).Value = tel;
|
||||||
|
insert.Parameters.Add("@celFunc", SqlDbType.NVarChar, 11).Value = cel;
|
||||||
|
insert.Parameters.Add("@ruaFunc", SqlDbType.NVarChar, 100).Value = rua;
|
||||||
|
insert.Parameters.Add("@numeroFunc", SqlDbType.NVarChar, 4).Value = num;
|
||||||
|
insert.Parameters.Add("@cidadeFunc", SqlDbType.NVarChar, 30).Value = cidade;
|
||||||
|
insert.Parameters.Add("@statusFunc", SqlDbType.NVarChar, 10).Value = STATUS_PESSOA;
|
||||||
|
insert.Parameters.Add("@usuarioFunc", SqlDbType.NVarChar, 15).Value = user;
|
||||||
|
insert.Parameters.Add("@senhaFunc", SqlDbType.NVarChar, 15).Value = senha;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
nome = vlr[0];
|
||||||
|
rg = vlr[1];
|
||||||
|
cpf = vlr[2];
|
||||||
|
tel = vlr[3];
|
||||||
|
cel = vlr[4];
|
||||||
|
rua = vlr[5];
|
||||||
|
num = vlr[6];
|
||||||
|
cidade = vlr[7];
|
||||||
|
STATUS_PESSOA = vlr[8];
|
||||||
|
user = vlr[9];
|
||||||
|
senha = vlr[10];
|
||||||
|
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbFuncionario SET nomeFunc = @nomeFunc, " +
|
||||||
|
"rgFunc = @rgFunc, " +
|
||||||
|
"cpfFunc = @cpfFunc, " +
|
||||||
|
"telFunc = @telFunc, " +
|
||||||
|
"celFunc = @celFunc, " +
|
||||||
|
"ruaFunc = @ruaFunc, " +
|
||||||
|
"numeroFunc = @numeroFunc, " +
|
||||||
|
"cidadeFunc = @cidadeFunc, " +
|
||||||
|
"statusFunc = @statusFunc, " +
|
||||||
|
"usuarioFunc = @usuarioFunc, " +
|
||||||
|
"senhaFunc = @senhaFunc " +
|
||||||
|
"WHERE idFunc = @idFunc", con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idFunc", SqlDbType.Int).Value = this.id;
|
||||||
|
update.Parameters.Add("@nomeFunc", SqlDbType.NVarChar, 50).Value = nome;
|
||||||
|
update.Parameters.Add("@rgFunc", SqlDbType.NVarChar, 12).Value = rg;
|
||||||
|
update.Parameters.Add("@cpfFunc", SqlDbType.NVarChar, 11).Value = cpf;
|
||||||
|
update.Parameters.Add("@telFunc", SqlDbType.NVarChar, 10).Value = tel;
|
||||||
|
update.Parameters.Add("@celFunc", SqlDbType.NVarChar, 11).Value = cel;
|
||||||
|
update.Parameters.Add("@ruaFunc", SqlDbType.NVarChar, 100).Value = rua;
|
||||||
|
update.Parameters.Add("@numeroFunc", SqlDbType.NVarChar, 4).Value = num;
|
||||||
|
update.Parameters.Add("@cidadeFunc", SqlDbType.NVarChar, 30).Value = cidade;
|
||||||
|
update.Parameters.Add("@statusFunc", SqlDbType.NVarChar, 10).Value = STATUS_PESSOA;
|
||||||
|
update.Parameters.Add("@usuarioFunc", SqlDbType.NVarChar, 15).Value = user;
|
||||||
|
update.Parameters.Add("@senhaFunc", SqlDbType.NVarChar, 15).Value = senha;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
delete = new SqlCommand(
|
||||||
|
"UPDATE tbFuncionario " +
|
||||||
|
"SET statusFuncionario = 'DESATIVADO' " +
|
||||||
|
"WHERE idFunc = @idFunc", con
|
||||||
|
);
|
||||||
|
delete.Parameters.Add("@idFunc", SqlDbType.Int).Value = id;
|
||||||
|
delete.Prepare();
|
||||||
|
delete.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Cliente : Pessoa
|
||||||
|
{
|
||||||
|
|
||||||
|
public Cliente(int? id, string nome, string rg, string cpf,
|
||||||
|
string tel, string cel, string rua, string num, string cidade,
|
||||||
|
string STATUS_PESSOA) :
|
||||||
|
|
||||||
|
base(id, nome, rg, cpf,
|
||||||
|
tel, cel, rua,
|
||||||
|
num, cidade,
|
||||||
|
STATUS_PESSOA)
|
||||||
|
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Add()
|
||||||
|
{
|
||||||
|
using (con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
insert = new SqlCommand("INSERT INTO tbCliente(nomeCliente,rgCliente,cpfCliente,telCliente,celCliente,ruaCliente,numeroCliente,cidadeCliente,statusCliente) " +
|
||||||
|
"VALUES (@nomeCliente,@rgCliente,@cpfCliente,@telCliente,@celCliente,@ruaCliente,@numeroCliente,@cidadeCliente,@statusCliente)", con);
|
||||||
|
|
||||||
|
insert.Parameters.Add("@nomeCliente", SqlDbType.NVarChar, 50).Value = nome;
|
||||||
|
insert.Parameters.Add("@rgCliente", SqlDbType.NVarChar, 12).Value = rg;
|
||||||
|
insert.Parameters.Add("@cpfCliente", SqlDbType.NVarChar, 11).Value = cpf;
|
||||||
|
insert.Parameters.Add("@telCliente", SqlDbType.NVarChar, 10).Value = tel;
|
||||||
|
insert.Parameters.Add("@celCliente", SqlDbType.NVarChar, 11).Value = cel;
|
||||||
|
insert.Parameters.Add("@ruaCliente", SqlDbType.NVarChar, 100).Value = rua;
|
||||||
|
insert.Parameters.Add("@numeroCliente", SqlDbType.NVarChar, 4).Value = num;
|
||||||
|
insert.Parameters.Add("@cidadeCliente", SqlDbType.NVarChar, 30).Value = cidade;
|
||||||
|
insert.Parameters.Add("@statusCliente", SqlDbType.NVarChar, 10).Value = STATUS_PESSOA;
|
||||||
|
|
||||||
|
insert.Prepare();
|
||||||
|
insert.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Edit(int id, List<string> vlr)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
nome = vlr[0];
|
||||||
|
rg = vlr[1];
|
||||||
|
cpf = vlr[2];
|
||||||
|
tel = vlr[3];
|
||||||
|
cel = vlr[4];
|
||||||
|
rua = vlr[5];
|
||||||
|
num = vlr[6];
|
||||||
|
cidade = vlr[7];
|
||||||
|
STATUS_PESSOA = vlr[8];
|
||||||
|
using(con)
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
update = new SqlCommand("UPDATE tbCliente SET nomeCliente = @nomeCliente, " +
|
||||||
|
"rgCliente = @rgCliente, " +
|
||||||
|
"cpfCliente = @cpfCliente, " +
|
||||||
|
"telCliente = @telCliente, " +
|
||||||
|
"celCliente = @celCliente, " +
|
||||||
|
"ruaCliente = @ruaCliente, " +
|
||||||
|
"numeroCliente = @numeroCliente, " +
|
||||||
|
"cidadeCliente = @cidadeCliente, " +
|
||||||
|
"statusCliente = @statusCliente " +
|
||||||
|
"WHERE idCliente = @idCliente", con);
|
||||||
|
|
||||||
|
update.Parameters.Add("@idCliente", SqlDbType.Int).Value = (int)this.id;
|
||||||
|
update.Parameters.Add("@nomeCliente", SqlDbType.NVarChar,50).Value = nome;
|
||||||
|
update.Parameters.Add("@rgCliente", SqlDbType.NVarChar,12).Value = rg;
|
||||||
|
update.Parameters.Add("@cpfCliente", SqlDbType.NVarChar,11).Value = cpf;
|
||||||
|
update.Parameters.Add("@telCliente", SqlDbType.NVarChar,10).Value = tel;
|
||||||
|
update.Parameters.Add("@celCliente", SqlDbType.NVarChar,11).Value = cel;
|
||||||
|
update.Parameters.Add("@ruaCliente", SqlDbType.NVarChar,100).Value = rua;
|
||||||
|
update.Parameters.Add("@numeroCliente", SqlDbType.NVarChar,4).Value = num;
|
||||||
|
update.Parameters.Add("@cidadeCliente", SqlDbType.NVarChar,30).Value = cidade;
|
||||||
|
update.Parameters.Add("@statusCliente", SqlDbType.NVarChar,10).Value = STATUS_PESSOA;
|
||||||
|
|
||||||
|
update.Prepare();
|
||||||
|
update.ExecuteNonQuery();
|
||||||
|
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Remove(int id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
delete = new SqlCommand(
|
||||||
|
"UPDATE tbCliente " +
|
||||||
|
"SET statusCliente = 'DESATIVADO' " +
|
||||||
|
"WHERE idCliente = @idCliente", con
|
||||||
|
);
|
||||||
|
delete.Parameters.Add("@idCliente", SqlDbType.Int).Value = id;
|
||||||
|
delete.Prepare();
|
||||||
|
delete.ExecuteNonQuery();
|
||||||
|
con.Close();
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
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>
|
9474
tbTrabalhoDataSet.Designer.cs
generated
Normal file
9474
tbTrabalhoDataSet.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
tbTrabalhoDataSet.cs
Normal file
17
tbTrabalhoDataSet.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
namespace CSharpLibrary
|
||||||
|
{
|
||||||
|
}
|
||||||
|
namespace CSharpLibrary
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class tbTrabalhoDataSet
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
namespace CSharpLibrary {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class tbTrabalhoDataSet {
|
||||||
|
}
|
||||||
|
}
|
9
tbTrabalhoDataSet.xsc
Normal file
9
tbTrabalhoDataSet.xsc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--<autogenerated>
|
||||||
|
This code was generated by a tool.
|
||||||
|
Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
the code is regenerated.
|
||||||
|
</autogenerated>-->
|
||||||
|
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
|
<TableUISettings />
|
||||||
|
</DataSetUISetting>
|
926
tbTrabalhoDataSet.xsd
Normal file
926
tbTrabalhoDataSet.xsd
Normal file
@ -0,0 +1,926 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema id="tbTrabalhoDataSet" targetNamespace="http://tempuri.org/tbTrabalhoDataSet.xsd" xmlns:mstns="http://tempuri.org/tbTrabalhoDataSet.xsd" xmlns="http://tempuri.org/tbTrabalhoDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
|
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
|
<Connections>
|
||||||
|
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="tbTrabalhoConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="tbTrabalhoConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.CSharpLibrary.Properties.Settings.GlobalReference.Default.tbTrabalhoConnectionString" Provider="System.Data.SqlClient" />
|
||||||
|
</Connections>
|
||||||
|
<Tables>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbClienteTableAdapter" GeneratorDataComponentClassName="tbClienteTableAdapter" Name="tbCliente" UserDataComponentName="tbClienteTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbCliente" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbCliente] WHERE (([idCliente] = @Original_idCliente) AND ((@IsNull_nomeCliente = 1 AND [nomeCliente] IS NULL) OR ([nomeCliente] = @Original_nomeCliente)) AND ((@IsNull_rgCliente = 1 AND [rgCliente] IS NULL) OR ([rgCliente] = @Original_rgCliente)) AND ((@IsNull_cpfCliente = 1 AND [cpfCliente] IS NULL) OR ([cpfCliente] = @Original_cpfCliente)) AND ((@IsNull_telCliente = 1 AND [telCliente] IS NULL) OR ([telCliente] = @Original_telCliente)) AND ((@IsNull_celCliente = 1 AND [celCliente] IS NULL) OR ([celCliente] = @Original_celCliente)) AND ((@IsNull_ruaCliente = 1 AND [ruaCliente] IS NULL) OR ([ruaCliente] = @Original_ruaCliente)) AND ((@IsNull_numeroCliente = 1 AND [numeroCliente] IS NULL) OR ([numeroCliente] = @Original_numeroCliente)) AND ((@IsNull_cidadeCliente = 1 AND [cidadeCliente] IS NULL) OR ([cidadeCliente] = @Original_cidadeCliente)) AND ((@IsNull_statusCliente = 1 AND [statusCliente] IS NULL) OR ([statusCliente] = @Original_statusCliente)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_rgCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_rgCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cpfCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cpfCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_telCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_telCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_celCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_celCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ruaCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ruaCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_numeroCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_numeroCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cidadeCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cidadeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbCliente] ([idCliente], [nomeCliente], [rgCliente], [cpfCliente], [telCliente], [celCliente], [ruaCliente], [numeroCliente], [cidadeCliente], [statusCliente]) VALUES (@idCliente, @nomeCliente, @rgCliente, @cpfCliente, @telCliente, @celCliente, @ruaCliente, @numeroCliente, @cidadeCliente, @statusCliente);
|
||||||
|
SELECT idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, ruaCliente, numeroCliente, cidadeCliente, statusCliente FROM tbCliente WHERE (idCliente = @idCliente)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@rgCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cpfCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@telCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@celCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ruaCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@numeroCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cidadeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, ruaCliente, numeroCliente, cidadeCliente, statusCliente FROM dbo.tbCliente</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbCliente] SET [idCliente] = @idCliente, [nomeCliente] = @nomeCliente, [rgCliente] = @rgCliente, [cpfCliente] = @cpfCliente, [telCliente] = @telCliente, [celCliente] = @celCliente, [ruaCliente] = @ruaCliente, [numeroCliente] = @numeroCliente, [cidadeCliente] = @cidadeCliente, [statusCliente] = @statusCliente WHERE (([idCliente] = @Original_idCliente) AND ((@IsNull_nomeCliente = 1 AND [nomeCliente] IS NULL) OR ([nomeCliente] = @Original_nomeCliente)) AND ((@IsNull_rgCliente = 1 AND [rgCliente] IS NULL) OR ([rgCliente] = @Original_rgCliente)) AND ((@IsNull_cpfCliente = 1 AND [cpfCliente] IS NULL) OR ([cpfCliente] = @Original_cpfCliente)) AND ((@IsNull_telCliente = 1 AND [telCliente] IS NULL) OR ([telCliente] = @Original_telCliente)) AND ((@IsNull_celCliente = 1 AND [celCliente] IS NULL) OR ([celCliente] = @Original_celCliente)) AND ((@IsNull_ruaCliente = 1 AND [ruaCliente] IS NULL) OR ([ruaCliente] = @Original_ruaCliente)) AND ((@IsNull_numeroCliente = 1 AND [numeroCliente] IS NULL) OR ([numeroCliente] = @Original_numeroCliente)) AND ((@IsNull_cidadeCliente = 1 AND [cidadeCliente] IS NULL) OR ([cidadeCliente] = @Original_cidadeCliente)) AND ((@IsNull_statusCliente = 1 AND [statusCliente] IS NULL) OR ([statusCliente] = @Original_statusCliente)));
|
||||||
|
SELECT idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, ruaCliente, numeroCliente, cidadeCliente, statusCliente FROM tbCliente WHERE (idCliente = @idCliente)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@rgCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cpfCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@telCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@celCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ruaCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@numeroCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cidadeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_rgCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_rgCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cpfCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cpfCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_telCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_telCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_celCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_celCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ruaCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ruaCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_numeroCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_numeroCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cidadeCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cidadeCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusCliente" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idCliente" DataSetColumn="idCliente" />
|
||||||
|
<Mapping SourceColumn="nomeCliente" DataSetColumn="nomeCliente" />
|
||||||
|
<Mapping SourceColumn="rgCliente" DataSetColumn="rgCliente" />
|
||||||
|
<Mapping SourceColumn="cpfCliente" DataSetColumn="cpfCliente" />
|
||||||
|
<Mapping SourceColumn="telCliente" DataSetColumn="telCliente" />
|
||||||
|
<Mapping SourceColumn="celCliente" DataSetColumn="celCliente" />
|
||||||
|
<Mapping SourceColumn="ruaCliente" DataSetColumn="ruaCliente" />
|
||||||
|
<Mapping SourceColumn="numeroCliente" DataSetColumn="numeroCliente" />
|
||||||
|
<Mapping SourceColumn="cidadeCliente" DataSetColumn="cidadeCliente" />
|
||||||
|
<Mapping SourceColumn="statusCliente" DataSetColumn="statusCliente" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbEditoraTableAdapter" GeneratorDataComponentClassName="tbEditoraTableAdapter" Name="tbEditora" UserDataComponentName="tbEditoraTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbEditora" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbEditora] WHERE (([idEditora] = @Original_idEditora) AND ((@IsNull_nomeEditora = 1 AND [nomeEditora] IS NULL) OR ([nomeEditora] = @Original_nomeEditora)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEditora" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeEditora" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbEditora] ([idEditora], [nomeEditora]) VALUES (@idEditora, @nomeEditora);
|
||||||
|
SELECT idEditora, nomeEditora FROM tbEditora WHERE (idEditora = @idEditora)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEditora" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeEditora" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idEditora, nomeEditora FROM dbo.tbEditora</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbEditora] SET [idEditora] = @idEditora, [nomeEditora] = @nomeEditora WHERE (([idEditora] = @Original_idEditora) AND ((@IsNull_nomeEditora = 1 AND [nomeEditora] IS NULL) OR ([nomeEditora] = @Original_nomeEditora)));
|
||||||
|
SELECT idEditora, nomeEditora FROM tbEditora WHERE (idEditora = @idEditora)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEditora" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeEditora" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEditora" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeEditora" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeEditora" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeEditora" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idEditora" DataSetColumn="idEditora" />
|
||||||
|
<Mapping SourceColumn="nomeEditora" DataSetColumn="nomeEditora" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbEmprestimoTableAdapter" GeneratorDataComponentClassName="tbEmprestimoTableAdapter" Name="tbEmprestimo" UserDataComponentName="tbEmprestimoTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbEmprestimo" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbEmprestimo] WHERE (([idEmprestimo] = @Original_idEmprestimo) AND ((@IsNull_idFunc = 1 AND [idFunc] IS NULL) OR ([idFunc] = @Original_idFunc)) AND ((@IsNull_idCliente = 1 AND [idCliente] IS NULL) OR ([idCliente] = @Original_idCliente)) AND ((@IsNull_idItem = 1 AND [idItem] IS NULL) OR ([idItem] = @Original_idItem)) AND ((@IsNull_dataEmprestimo = 1 AND [dataEmprestimo] IS NULL) OR ([dataEmprestimo] = @Original_dataEmprestimo)) AND ((@IsNull_dataDevolucao = 1 AND [dataDevolucao] IS NULL) OR ([dataDevolucao] = @Original_dataDevolucao)) AND ((@IsNull_statusEmprestimo = 1 AND [statusEmprestimo] IS NULL) OR ([statusEmprestimo] = @Original_statusEmprestimo)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dataEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dataEmprestimo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dataDevolucao" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dataDevolucao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusEmprestimo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbEmprestimo] ([idEmprestimo], [idFunc], [idCliente], [idItem], [dataEmprestimo], [dataDevolucao], [statusEmprestimo]) VALUES (@idEmprestimo, @idFunc, @idCliente, @idItem, @dataEmprestimo, @dataDevolucao, @statusEmprestimo);
|
||||||
|
SELECT idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo FROM tbEmprestimo WHERE (idEmprestimo = @idEmprestimo)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dataEmprestimo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dataDevolucao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusEmprestimo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo FROM dbo.tbEmprestimo</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbEmprestimo] SET [idEmprestimo] = @idEmprestimo, [idFunc] = @idFunc, [idCliente] = @idCliente, [idItem] = @idItem, [dataEmprestimo] = @dataEmprestimo, [dataDevolucao] = @dataDevolucao, [statusEmprestimo] = @statusEmprestimo WHERE (([idEmprestimo] = @Original_idEmprestimo) AND ((@IsNull_idFunc = 1 AND [idFunc] IS NULL) OR ([idFunc] = @Original_idFunc)) AND ((@IsNull_idCliente = 1 AND [idCliente] IS NULL) OR ([idCliente] = @Original_idCliente)) AND ((@IsNull_idItem = 1 AND [idItem] IS NULL) OR ([idItem] = @Original_idItem)) AND ((@IsNull_dataEmprestimo = 1 AND [dataEmprestimo] IS NULL) OR ([dataEmprestimo] = @Original_dataEmprestimo)) AND ((@IsNull_dataDevolucao = 1 AND [dataDevolucao] IS NULL) OR ([dataDevolucao] = @Original_dataDevolucao)) AND ((@IsNull_statusEmprestimo = 1 AND [statusEmprestimo] IS NULL) OR ([statusEmprestimo] = @Original_statusEmprestimo)));
|
||||||
|
SELECT idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo FROM tbEmprestimo WHERE (idEmprestimo = @idEmprestimo)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dataEmprestimo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dataDevolucao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusEmprestimo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idCliente" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idCliente" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dataEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dataEmprestimo" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dataDevolucao" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dataDevolucao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dataDevolucao" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusEmprestimo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusEmprestimo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusEmprestimo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idEmprestimo" DataSetColumn="idEmprestimo" />
|
||||||
|
<Mapping SourceColumn="idFunc" DataSetColumn="idFunc" />
|
||||||
|
<Mapping SourceColumn="idCliente" DataSetColumn="idCliente" />
|
||||||
|
<Mapping SourceColumn="idItem" DataSetColumn="idItem" />
|
||||||
|
<Mapping SourceColumn="dataEmprestimo" DataSetColumn="dataEmprestimo" />
|
||||||
|
<Mapping SourceColumn="dataDevolucao" DataSetColumn="dataDevolucao" />
|
||||||
|
<Mapping SourceColumn="statusEmprestimo" DataSetColumn="statusEmprestimo" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbFuncionarioTableAdapter" GeneratorDataComponentClassName="tbFuncionarioTableAdapter" Name="tbFuncionario" UserDataComponentName="tbFuncionarioTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbFuncionario" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbFuncionario] WHERE (([idFunc] = @Original_idFunc) AND ((@IsNull_nomeFunc = 1 AND [nomeFunc] IS NULL) OR ([nomeFunc] = @Original_nomeFunc)) AND ((@IsNull_rgFunc = 1 AND [rgFunc] IS NULL) OR ([rgFunc] = @Original_rgFunc)) AND ((@IsNull_cpfFunc = 1 AND [cpfFunc] IS NULL) OR ([cpfFunc] = @Original_cpfFunc)) AND ((@IsNull_telFunc = 1 AND [telFunc] IS NULL) OR ([telFunc] = @Original_telFunc)) AND ((@IsNull_celFunc = 1 AND [celFunc] IS NULL) OR ([celFunc] = @Original_celFunc)) AND ((@IsNull_ruaFunc = 1 AND [ruaFunc] IS NULL) OR ([ruaFunc] = @Original_ruaFunc)) AND ((@IsNull_numeroFunc = 1 AND [numeroFunc] IS NULL) OR ([numeroFunc] = @Original_numeroFunc)) AND ((@IsNull_cidadeFunc = 1 AND [cidadeFunc] IS NULL) OR ([cidadeFunc] = @Original_cidadeFunc)) AND ((@IsNull_statusFunc = 1 AND [statusFunc] IS NULL) OR ([statusFunc] = @Original_statusFunc)) AND ((@IsNull_usuarioFunc = 1 AND [usuarioFunc] IS NULL) OR ([usuarioFunc] = @Original_usuarioFunc)) AND ((@IsNull_senhaFunc = 1 AND [senhaFunc] IS NULL) OR ([senhaFunc] = @Original_senhaFunc)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_rgFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_rgFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cpfFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cpfFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_telFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_telFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_celFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_celFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ruaFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ruaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_numeroFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_numeroFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cidadeFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cidadeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_usuarioFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_usuarioFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_senhaFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_senhaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbFuncionario] ([idFunc], [nomeFunc], [rgFunc], [cpfFunc], [telFunc], [celFunc], [ruaFunc], [numeroFunc], [cidadeFunc], [statusFunc], [usuarioFunc], [senhaFunc]) VALUES (@idFunc, @nomeFunc, @rgFunc, @cpfFunc, @telFunc, @celFunc, @ruaFunc, @numeroFunc, @cidadeFunc, @statusFunc, @usuarioFunc, @senhaFunc);
|
||||||
|
SELECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, cidadeFunc, statusFunc, usuarioFunc, senhaFunc FROM tbFuncionario WHERE (idFunc = @idFunc)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@rgFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cpfFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@telFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@celFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ruaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@numeroFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cidadeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@usuarioFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@senhaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, cidadeFunc, statusFunc, usuarioFunc, senhaFunc FROM dbo.tbFuncionario</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbFuncionario] SET [idFunc] = @idFunc, [nomeFunc] = @nomeFunc, [rgFunc] = @rgFunc, [cpfFunc] = @cpfFunc, [telFunc] = @telFunc, [celFunc] = @celFunc, [ruaFunc] = @ruaFunc, [numeroFunc] = @numeroFunc, [cidadeFunc] = @cidadeFunc, [statusFunc] = @statusFunc, [usuarioFunc] = @usuarioFunc, [senhaFunc] = @senhaFunc WHERE (([idFunc] = @Original_idFunc) AND ((@IsNull_nomeFunc = 1 AND [nomeFunc] IS NULL) OR ([nomeFunc] = @Original_nomeFunc)) AND ((@IsNull_rgFunc = 1 AND [rgFunc] IS NULL) OR ([rgFunc] = @Original_rgFunc)) AND ((@IsNull_cpfFunc = 1 AND [cpfFunc] IS NULL) OR ([cpfFunc] = @Original_cpfFunc)) AND ((@IsNull_telFunc = 1 AND [telFunc] IS NULL) OR ([telFunc] = @Original_telFunc)) AND ((@IsNull_celFunc = 1 AND [celFunc] IS NULL) OR ([celFunc] = @Original_celFunc)) AND ((@IsNull_ruaFunc = 1 AND [ruaFunc] IS NULL) OR ([ruaFunc] = @Original_ruaFunc)) AND ((@IsNull_numeroFunc = 1 AND [numeroFunc] IS NULL) OR ([numeroFunc] = @Original_numeroFunc)) AND ((@IsNull_cidadeFunc = 1 AND [cidadeFunc] IS NULL) OR ([cidadeFunc] = @Original_cidadeFunc)) AND ((@IsNull_statusFunc = 1 AND [statusFunc] IS NULL) OR ([statusFunc] = @Original_statusFunc)) AND ((@IsNull_usuarioFunc = 1 AND [usuarioFunc] IS NULL) OR ([usuarioFunc] = @Original_usuarioFunc)) AND ((@IsNull_senhaFunc = 1 AND [senhaFunc] IS NULL) OR ([senhaFunc] = @Original_senhaFunc)));
|
||||||
|
SELECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, cidadeFunc, statusFunc, usuarioFunc, senhaFunc FROM tbFuncionario WHERE (idFunc = @idFunc)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@rgFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cpfFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@telFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@celFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ruaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@numeroFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@cidadeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@usuarioFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@senhaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_rgFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_rgFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="rgFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cpfFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cpfFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cpfFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_telFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_telFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="telFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_celFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_celFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="celFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ruaFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ruaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ruaFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_numeroFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_numeroFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="numeroFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_cidadeFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_cidadeFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="cidadeFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_usuarioFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_usuarioFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="usuarioFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_senhaFunc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_senhaFunc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="senhaFunc" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idFunc" DataSetColumn="idFunc" />
|
||||||
|
<Mapping SourceColumn="nomeFunc" DataSetColumn="nomeFunc" />
|
||||||
|
<Mapping SourceColumn="rgFunc" DataSetColumn="rgFunc" />
|
||||||
|
<Mapping SourceColumn="cpfFunc" DataSetColumn="cpfFunc" />
|
||||||
|
<Mapping SourceColumn="telFunc" DataSetColumn="telFunc" />
|
||||||
|
<Mapping SourceColumn="celFunc" DataSetColumn="celFunc" />
|
||||||
|
<Mapping SourceColumn="ruaFunc" DataSetColumn="ruaFunc" />
|
||||||
|
<Mapping SourceColumn="numeroFunc" DataSetColumn="numeroFunc" />
|
||||||
|
<Mapping SourceColumn="cidadeFunc" DataSetColumn="cidadeFunc" />
|
||||||
|
<Mapping SourceColumn="statusFunc" DataSetColumn="statusFunc" />
|
||||||
|
<Mapping SourceColumn="usuarioFunc" DataSetColumn="usuarioFunc" />
|
||||||
|
<Mapping SourceColumn="senhaFunc" DataSetColumn="senhaFunc" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbGeneroTableAdapter" GeneratorDataComponentClassName="tbGeneroTableAdapter" Name="tbGenero" UserDataComponentName="tbGeneroTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbGenero" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbGenero] WHERE (([idGenero] = @Original_idGenero) AND ((@IsNull_nomeGenero = 1 AND [nomeGenero] IS NULL) OR ([nomeGenero] = @Original_nomeGenero)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idGenero" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeGenero" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbGenero] ([idGenero], [nomeGenero]) VALUES (@idGenero, @nomeGenero);
|
||||||
|
SELECT idGenero, nomeGenero FROM tbGenero WHERE (idGenero = @idGenero)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idGenero" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeGenero" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idGenero, nomeGenero FROM dbo.tbGenero</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbGenero] SET [idGenero] = @idGenero, [nomeGenero] = @nomeGenero WHERE (([idGenero] = @Original_idGenero) AND ((@IsNull_nomeGenero = 1 AND [nomeGenero] IS NULL) OR ([nomeGenero] = @Original_nomeGenero)));
|
||||||
|
SELECT idGenero, nomeGenero FROM tbGenero WHERE (idGenero = @idGenero)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idGenero" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeGenero" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idGenero" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeGenero" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeGenero" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeGenero" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idGenero" DataSetColumn="idGenero" />
|
||||||
|
<Mapping SourceColumn="nomeGenero" DataSetColumn="nomeGenero" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbItemTableAdapter" GeneratorDataComponentClassName="tbItemTableAdapter" Name="tbItem" UserDataComponentName="tbItemTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbItem" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbItem] WHERE (([idItem] = @Original_idItem) AND ((@IsNull_nomeItem = 1 AND [nomeItem] IS NULL) OR ([nomeItem] = @Original_nomeItem)) AND ((@IsNull_idAutor = 1 AND [idAutor] IS NULL) OR ([idAutor] = @Original_idAutor)) AND ((@IsNull_generoItem = 1 AND [generoItem] IS NULL) OR ([generoItem] = @Original_generoItem)) AND ((@IsNull_editoraItem = 1 AND [editoraItem] IS NULL) OR ([editoraItem] = @Original_editoraItem)) AND ((@IsNull_tipoItem = 1 AND [tipoItem] IS NULL) OR ([tipoItem] = @Original_tipoItem)) AND ((@IsNull_isbnItem = 1 AND [isbnItem] IS NULL) OR ([isbnItem] = @Original_isbnItem)) AND ((@IsNull_statusItem = 1 AND [statusItem] IS NULL) OR ([statusItem] = @Original_statusItem)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_isbnItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_isbnItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbItem] ([idItem], [nomeItem], [idAutor], [generoItem], [editoraItem], [tipoItem], [isbnItem], [statusItem]) VALUES (@idItem, @nomeItem, @idAutor, @generoItem, @editoraItem, @tipoItem, @isbnItem, @statusItem);
|
||||||
|
SELECT idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem FROM tbItem WHERE (idItem = @idItem)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@isbnItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem FROM dbo.tbItem</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbItem] SET [idItem] = @idItem, [nomeItem] = @nomeItem, [idAutor] = @idAutor, [generoItem] = @generoItem, [editoraItem] = @editoraItem, [tipoItem] = @tipoItem, [isbnItem] = @isbnItem, [statusItem] = @statusItem WHERE (([idItem] = @Original_idItem) AND ((@IsNull_nomeItem = 1 AND [nomeItem] IS NULL) OR ([nomeItem] = @Original_nomeItem)) AND ((@IsNull_idAutor = 1 AND [idAutor] IS NULL) OR ([idAutor] = @Original_idAutor)) AND ((@IsNull_generoItem = 1 AND [generoItem] IS NULL) OR ([generoItem] = @Original_generoItem)) AND ((@IsNull_editoraItem = 1 AND [editoraItem] IS NULL) OR ([editoraItem] = @Original_editoraItem)) AND ((@IsNull_tipoItem = 1 AND [tipoItem] IS NULL) OR ([tipoItem] = @Original_tipoItem)) AND ((@IsNull_isbnItem = 1 AND [isbnItem] IS NULL) OR ([isbnItem] = @Original_isbnItem)) AND ((@IsNull_statusItem = 1 AND [statusItem] IS NULL) OR ([statusItem] = @Original_statusItem)));
|
||||||
|
SELECT idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem FROM tbItem WHERE (idItem = @idItem)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@isbnItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@statusItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_generoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="generoItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_editoraItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="editoraItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_tipoItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tipoItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_isbnItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_isbnItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="isbnItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_statusItem" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_statusItem" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="statusItem" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idItem" DataSetColumn="idItem" />
|
||||||
|
<Mapping SourceColumn="nomeItem" DataSetColumn="nomeItem" />
|
||||||
|
<Mapping SourceColumn="idAutor" DataSetColumn="idAutor" />
|
||||||
|
<Mapping SourceColumn="generoItem" DataSetColumn="generoItem" />
|
||||||
|
<Mapping SourceColumn="editoraItem" DataSetColumn="editoraItem" />
|
||||||
|
<Mapping SourceColumn="tipoItem" DataSetColumn="tipoItem" />
|
||||||
|
<Mapping SourceColumn="isbnItem" DataSetColumn="isbnItem" />
|
||||||
|
<Mapping SourceColumn="statusItem" DataSetColumn="statusItem" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbTipoTableAdapter" GeneratorDataComponentClassName="tbTipoTableAdapter" Name="tbTipo" UserDataComponentName="tbTipoTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbTipo" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbTipo] WHERE (([idTipo] = @Original_idTipo) AND ((@IsNull_nomeTipo = 1 AND [nomeTipo] IS NULL) OR ([nomeTipo] = @Original_nomeTipo)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idTipo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeTipo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbTipo] ([idTipo], [nomeTipo]) VALUES (@idTipo, @nomeTipo);
|
||||||
|
SELECT idTipo, nomeTipo FROM tbTipo WHERE (idTipo = @idTipo)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idTipo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeTipo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idTipo, nomeTipo FROM dbo.tbTipo</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbTipo] SET [idTipo] = @idTipo, [nomeTipo] = @nomeTipo WHERE (([idTipo] = @Original_idTipo) AND ((@IsNull_nomeTipo = 1 AND [nomeTipo] IS NULL) OR ([nomeTipo] = @Original_nomeTipo)));
|
||||||
|
SELECT idTipo, nomeTipo FROM tbTipo WHERE (idTipo = @idTipo)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idTipo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeTipo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idTipo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeTipo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeTipo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeTipo" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idTipo" DataSetColumn="idTipo" />
|
||||||
|
<Mapping SourceColumn="nomeTipo" DataSetColumn="nomeTipo" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="tbAutorTableAdapter" GeneratorDataComponentClassName="tbAutorTableAdapter" Name="tbAutor" UserDataComponentName="tbAutorTableAdapter">
|
||||||
|
<MainSource>
|
||||||
|
<DbSource ConnectionRef="tbTrabalhoConnectionString (Settings)" DbObjectName="tbTrabalho.dbo.tbAutor" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
|
<DeleteCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>DELETE FROM [dbo].[tbAutor] WHERE (([idAutor] = @Original_idAutor) AND ((@IsNull_nomeAutor = 1 AND [nomeAutor] IS NULL) OR ([nomeAutor] = @Original_nomeAutor)))</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeAutor" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</DeleteCommand>
|
||||||
|
<InsertCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>INSERT INTO [dbo].[tbAutor] ([nomeAutor]) VALUES (@nomeAutor);
|
||||||
|
SELECT idAutor, nomeAutor FROM tbAutor WHERE (idAutor = SCOPE_IDENTITY())</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeAutor" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</InsertCommand>
|
||||||
|
<SelectCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>SELECT idAutor, nomeAutor FROM dbo.tbAutor</CommandText>
|
||||||
|
<Parameters />
|
||||||
|
</DbCommand>
|
||||||
|
</SelectCommand>
|
||||||
|
<UpdateCommand>
|
||||||
|
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||||
|
<CommandText>UPDATE [dbo].[tbAutor] SET [nomeAutor] = @nomeAutor WHERE (([idAutor] = @Original_idAutor) AND ((@IsNull_nomeAutor = 1 AND [nomeAutor] IS NULL) OR ([nomeAutor] = @Original_nomeAutor)));
|
||||||
|
SELECT idAutor, nomeAutor FROM tbAutor WHERE (idAutor = @idAutor)</CommandText>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@nomeAutor" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_nomeAutor" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="true" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_nomeAutor" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="nomeAutor" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||||
|
<Parameter AllowDbNull="false" AutogeneratedName="idAutor" ColumnName="idAutor" DataSourceName="tbTrabalho.dbo.tbAutor" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idAutor" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idAutor" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||||
|
</Parameters>
|
||||||
|
</DbCommand>
|
||||||
|
</UpdateCommand>
|
||||||
|
</DbSource>
|
||||||
|
</MainSource>
|
||||||
|
<Mappings>
|
||||||
|
<Mapping SourceColumn="idAutor" DataSetColumn="idAutor" />
|
||||||
|
<Mapping SourceColumn="nomeAutor" DataSetColumn="nomeAutor" />
|
||||||
|
</Mappings>
|
||||||
|
<Sources />
|
||||||
|
</TableAdapter>
|
||||||
|
</Tables>
|
||||||
|
<Sources />
|
||||||
|
</DataSource>
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
<xs:element name="tbTrabalhoDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="tbTrabalhoDataSet" msprop:Generator_UserDSName="tbTrabalhoDataSet">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:element name="tbCliente" msprop:Generator_TableClassName="tbClienteDataTable" msprop:Generator_TableVarName="tabletbCliente" msprop:Generator_TablePropName="tbCliente" msprop:Generator_RowDeletingName="tbClienteRowDeleting" msprop:Generator_RowChangingName="tbClienteRowChanging" msprop:Generator_RowEvHandlerName="tbClienteRowChangeEventHandler" msprop:Generator_RowDeletedName="tbClienteRowDeleted" msprop:Generator_UserTableName="tbCliente" msprop:Generator_RowChangedName="tbClienteRowChanged" msprop:Generator_RowEvArgName="tbClienteRowChangeEvent" msprop:Generator_RowClassName="tbClienteRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idCliente" msprop:Generator_ColumnVarNameInTable="columnidCliente" msprop:Generator_ColumnPropNameInRow="idCliente" msprop:Generator_ColumnPropNameInTable="idClienteColumn" msprop:Generator_UserColumnName="idCliente" type="xs:int" />
|
||||||
|
<xs:element name="nomeCliente" msprop:Generator_ColumnVarNameInTable="columnnomeCliente" msprop:Generator_ColumnPropNameInRow="nomeCliente" msprop:Generator_ColumnPropNameInTable="nomeClienteColumn" msprop:Generator_UserColumnName="nomeCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="50" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="rgCliente" msprop:Generator_ColumnVarNameInTable="columnrgCliente" msprop:Generator_ColumnPropNameInRow="rgCliente" msprop:Generator_ColumnPropNameInTable="rgClienteColumn" msprop:Generator_UserColumnName="rgCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="12" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="cpfCliente" msprop:Generator_ColumnVarNameInTable="columncpfCliente" msprop:Generator_ColumnPropNameInRow="cpfCliente" msprop:Generator_ColumnPropNameInTable="cpfClienteColumn" msprop:Generator_UserColumnName="cpfCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="11" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="telCliente" msprop:Generator_ColumnVarNameInTable="columntelCliente" msprop:Generator_ColumnPropNameInRow="telCliente" msprop:Generator_ColumnPropNameInTable="telClienteColumn" msprop:Generator_UserColumnName="telCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="celCliente" msprop:Generator_ColumnVarNameInTable="columncelCliente" msprop:Generator_ColumnPropNameInRow="celCliente" msprop:Generator_ColumnPropNameInTable="celClienteColumn" msprop:Generator_UserColumnName="celCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="11" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="ruaCliente" msprop:Generator_ColumnVarNameInTable="columnruaCliente" msprop:Generator_ColumnPropNameInRow="ruaCliente" msprop:Generator_ColumnPropNameInTable="ruaClienteColumn" msprop:Generator_UserColumnName="ruaCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="100" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="numeroCliente" msprop:Generator_ColumnVarNameInTable="columnnumeroCliente" msprop:Generator_ColumnPropNameInRow="numeroCliente" msprop:Generator_ColumnPropNameInTable="numeroClienteColumn" msprop:Generator_UserColumnName="numeroCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="4" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="cidadeCliente" msprop:Generator_ColumnVarNameInTable="columncidadeCliente" msprop:Generator_ColumnPropNameInRow="cidadeCliente" msprop:Generator_ColumnPropNameInTable="cidadeClienteColumn" msprop:Generator_UserColumnName="cidadeCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="30" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="statusCliente" msprop:Generator_ColumnVarNameInTable="columnstatusCliente" msprop:Generator_ColumnPropNameInRow="statusCliente" msprop:Generator_ColumnPropNameInTable="statusClienteColumn" msprop:Generator_UserColumnName="statusCliente" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbEditora" msprop:Generator_TableClassName="tbEditoraDataTable" msprop:Generator_TableVarName="tabletbEditora" msprop:Generator_TablePropName="tbEditora" msprop:Generator_RowDeletingName="tbEditoraRowDeleting" msprop:Generator_RowChangingName="tbEditoraRowChanging" msprop:Generator_RowEvHandlerName="tbEditoraRowChangeEventHandler" msprop:Generator_RowDeletedName="tbEditoraRowDeleted" msprop:Generator_UserTableName="tbEditora" msprop:Generator_RowChangedName="tbEditoraRowChanged" msprop:Generator_RowEvArgName="tbEditoraRowChangeEvent" msprop:Generator_RowClassName="tbEditoraRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idEditora" msprop:Generator_ColumnVarNameInTable="columnidEditora" msprop:Generator_ColumnPropNameInRow="idEditora" msprop:Generator_ColumnPropNameInTable="idEditoraColumn" msprop:Generator_UserColumnName="idEditora" type="xs:int" />
|
||||||
|
<xs:element name="nomeEditora" msprop:Generator_ColumnVarNameInTable="columnnomeEditora" msprop:Generator_ColumnPropNameInRow="nomeEditora" msprop:Generator_ColumnPropNameInTable="nomeEditoraColumn" msprop:Generator_UserColumnName="nomeEditora" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="30" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbEmprestimo" msprop:Generator_TableClassName="tbEmprestimoDataTable" msprop:Generator_TableVarName="tabletbEmprestimo" msprop:Generator_TablePropName="tbEmprestimo" msprop:Generator_RowDeletingName="tbEmprestimoRowDeleting" msprop:Generator_RowChangingName="tbEmprestimoRowChanging" msprop:Generator_RowEvHandlerName="tbEmprestimoRowChangeEventHandler" msprop:Generator_RowDeletedName="tbEmprestimoRowDeleted" msprop:Generator_UserTableName="tbEmprestimo" msprop:Generator_RowChangedName="tbEmprestimoRowChanged" msprop:Generator_RowEvArgName="tbEmprestimoRowChangeEvent" msprop:Generator_RowClassName="tbEmprestimoRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idEmprestimo" msprop:Generator_ColumnVarNameInTable="columnidEmprestimo" msprop:Generator_ColumnPropNameInRow="idEmprestimo" msprop:Generator_ColumnPropNameInTable="idEmprestimoColumn" msprop:Generator_UserColumnName="idEmprestimo" type="xs:int" />
|
||||||
|
<xs:element name="idFunc" msprop:Generator_ColumnVarNameInTable="columnidFunc" msprop:Generator_ColumnPropNameInRow="idFunc" msprop:Generator_ColumnPropNameInTable="idFuncColumn" msprop:Generator_UserColumnName="idFunc" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="idCliente" msprop:Generator_ColumnVarNameInTable="columnidCliente" msprop:Generator_ColumnPropNameInRow="idCliente" msprop:Generator_ColumnPropNameInTable="idClienteColumn" msprop:Generator_UserColumnName="idCliente" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="idItem" msprop:Generator_ColumnVarNameInTable="columnidItem" msprop:Generator_ColumnPropNameInRow="idItem" msprop:Generator_ColumnPropNameInTable="idItemColumn" msprop:Generator_UserColumnName="idItem" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="dataEmprestimo" msprop:Generator_ColumnVarNameInTable="columndataEmprestimo" msprop:Generator_ColumnPropNameInRow="dataEmprestimo" msprop:Generator_ColumnPropNameInTable="dataEmprestimoColumn" msprop:Generator_UserColumnName="dataEmprestimo" type="xs:dateTime" minOccurs="0" />
|
||||||
|
<xs:element name="dataDevolucao" msprop:Generator_ColumnVarNameInTable="columndataDevolucao" msprop:Generator_ColumnPropNameInRow="dataDevolucao" msprop:Generator_ColumnPropNameInTable="dataDevolucaoColumn" msprop:Generator_UserColumnName="dataDevolucao" type="xs:dateTime" minOccurs="0" />
|
||||||
|
<xs:element name="statusEmprestimo" msprop:Generator_ColumnVarNameInTable="columnstatusEmprestimo" msprop:Generator_ColumnPropNameInRow="statusEmprestimo" msprop:Generator_ColumnPropNameInTable="statusEmprestimoColumn" msprop:Generator_UserColumnName="statusEmprestimo" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbFuncionario" msprop:Generator_TableClassName="tbFuncionarioDataTable" msprop:Generator_TableVarName="tabletbFuncionario" msprop:Generator_TablePropName="tbFuncionario" msprop:Generator_RowDeletingName="tbFuncionarioRowDeleting" msprop:Generator_RowChangingName="tbFuncionarioRowChanging" msprop:Generator_RowEvHandlerName="tbFuncionarioRowChangeEventHandler" msprop:Generator_RowDeletedName="tbFuncionarioRowDeleted" msprop:Generator_UserTableName="tbFuncionario" msprop:Generator_RowChangedName="tbFuncionarioRowChanged" msprop:Generator_RowEvArgName="tbFuncionarioRowChangeEvent" msprop:Generator_RowClassName="tbFuncionarioRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idFunc" msprop:Generator_ColumnVarNameInTable="columnidFunc" msprop:Generator_ColumnPropNameInRow="idFunc" msprop:Generator_ColumnPropNameInTable="idFuncColumn" msprop:Generator_UserColumnName="idFunc" type="xs:int" />
|
||||||
|
<xs:element name="nomeFunc" msprop:Generator_ColumnVarNameInTable="columnnomeFunc" msprop:Generator_ColumnPropNameInRow="nomeFunc" msprop:Generator_ColumnPropNameInTable="nomeFuncColumn" msprop:Generator_UserColumnName="nomeFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="50" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="rgFunc" msprop:Generator_ColumnVarNameInTable="columnrgFunc" msprop:Generator_ColumnPropNameInRow="rgFunc" msprop:Generator_ColumnPropNameInTable="rgFuncColumn" msprop:Generator_UserColumnName="rgFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="12" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="cpfFunc" msprop:Generator_ColumnVarNameInTable="columncpfFunc" msprop:Generator_ColumnPropNameInRow="cpfFunc" msprop:Generator_ColumnPropNameInTable="cpfFuncColumn" msprop:Generator_UserColumnName="cpfFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="11" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="telFunc" msprop:Generator_ColumnVarNameInTable="columntelFunc" msprop:Generator_ColumnPropNameInRow="telFunc" msprop:Generator_ColumnPropNameInTable="telFuncColumn" msprop:Generator_UserColumnName="telFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="celFunc" msprop:Generator_ColumnVarNameInTable="columncelFunc" msprop:Generator_ColumnPropNameInRow="celFunc" msprop:Generator_ColumnPropNameInTable="celFuncColumn" msprop:Generator_UserColumnName="celFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="11" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="ruaFunc" msprop:Generator_ColumnVarNameInTable="columnruaFunc" msprop:Generator_ColumnPropNameInRow="ruaFunc" msprop:Generator_ColumnPropNameInTable="ruaFuncColumn" msprop:Generator_UserColumnName="ruaFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="100" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="numeroFunc" msprop:Generator_ColumnVarNameInTable="columnnumeroFunc" msprop:Generator_ColumnPropNameInRow="numeroFunc" msprop:Generator_ColumnPropNameInTable="numeroFuncColumn" msprop:Generator_UserColumnName="numeroFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="4" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="cidadeFunc" msprop:Generator_ColumnVarNameInTable="columncidadeFunc" msprop:Generator_ColumnPropNameInRow="cidadeFunc" msprop:Generator_ColumnPropNameInTable="cidadeFuncColumn" msprop:Generator_UserColumnName="cidadeFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="30" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="statusFunc" msprop:Generator_ColumnVarNameInTable="columnstatusFunc" msprop:Generator_ColumnPropNameInRow="statusFunc" msprop:Generator_ColumnPropNameInTable="statusFuncColumn" msprop:Generator_UserColumnName="statusFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="usuarioFunc" msprop:Generator_ColumnVarNameInTable="columnusuarioFunc" msprop:Generator_ColumnPropNameInRow="usuarioFunc" msprop:Generator_ColumnPropNameInTable="usuarioFuncColumn" msprop:Generator_UserColumnName="usuarioFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="15" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="senhaFunc" msprop:Generator_ColumnVarNameInTable="columnsenhaFunc" msprop:Generator_ColumnPropNameInRow="senhaFunc" msprop:Generator_ColumnPropNameInTable="senhaFuncColumn" msprop:Generator_UserColumnName="senhaFunc" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="15" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbGenero" msprop:Generator_TableClassName="tbGeneroDataTable" msprop:Generator_TableVarName="tabletbGenero" msprop:Generator_TablePropName="tbGenero" msprop:Generator_RowDeletingName="tbGeneroRowDeleting" msprop:Generator_RowChangingName="tbGeneroRowChanging" msprop:Generator_RowEvHandlerName="tbGeneroRowChangeEventHandler" msprop:Generator_RowDeletedName="tbGeneroRowDeleted" msprop:Generator_UserTableName="tbGenero" msprop:Generator_RowChangedName="tbGeneroRowChanged" msprop:Generator_RowEvArgName="tbGeneroRowChangeEvent" msprop:Generator_RowClassName="tbGeneroRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idGenero" msprop:Generator_ColumnVarNameInTable="columnidGenero" msprop:Generator_ColumnPropNameInRow="idGenero" msprop:Generator_ColumnPropNameInTable="idGeneroColumn" msprop:Generator_UserColumnName="idGenero" type="xs:int" />
|
||||||
|
<xs:element name="nomeGenero" msprop:Generator_ColumnVarNameInTable="columnnomeGenero" msprop:Generator_ColumnPropNameInRow="nomeGenero" msprop:Generator_ColumnPropNameInTable="nomeGeneroColumn" msprop:Generator_UserColumnName="nomeGenero" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="30" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbItem" msprop:Generator_TableClassName="tbItemDataTable" msprop:Generator_TableVarName="tabletbItem" msprop:Generator_TablePropName="tbItem" msprop:Generator_RowDeletingName="tbItemRowDeleting" msprop:Generator_RowChangingName="tbItemRowChanging" msprop:Generator_RowEvHandlerName="tbItemRowChangeEventHandler" msprop:Generator_RowDeletedName="tbItemRowDeleted" msprop:Generator_UserTableName="tbItem" msprop:Generator_RowChangedName="tbItemRowChanged" msprop:Generator_RowEvArgName="tbItemRowChangeEvent" msprop:Generator_RowClassName="tbItemRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idItem" msprop:Generator_ColumnVarNameInTable="columnidItem" msprop:Generator_ColumnPropNameInRow="idItem" msprop:Generator_ColumnPropNameInTable="idItemColumn" msprop:Generator_UserColumnName="idItem" type="xs:int" />
|
||||||
|
<xs:element name="nomeItem" msprop:Generator_ColumnVarNameInTable="columnnomeItem" msprop:Generator_ColumnPropNameInRow="nomeItem" msprop:Generator_ColumnPropNameInTable="nomeItemColumn" msprop:Generator_UserColumnName="nomeItem" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="50" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="idAutor" msprop:Generator_ColumnVarNameInTable="columnidAutor" msprop:Generator_ColumnPropNameInRow="idAutor" msprop:Generator_ColumnPropNameInTable="idAutorColumn" msprop:Generator_UserColumnName="idAutor" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="generoItem" msprop:Generator_ColumnVarNameInTable="columngeneroItem" msprop:Generator_ColumnPropNameInRow="generoItem" msprop:Generator_ColumnPropNameInTable="generoItemColumn" msprop:Generator_UserColumnName="generoItem" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="editoraItem" msprop:Generator_ColumnVarNameInTable="columneditoraItem" msprop:Generator_ColumnPropNameInRow="editoraItem" msprop:Generator_ColumnPropNameInTable="editoraItemColumn" msprop:Generator_UserColumnName="editoraItem" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="tipoItem" msprop:Generator_ColumnVarNameInTable="columntipoItem" msprop:Generator_ColumnPropNameInRow="tipoItem" msprop:Generator_ColumnPropNameInTable="tipoItemColumn" msprop:Generator_UserColumnName="tipoItem" type="xs:int" minOccurs="0" />
|
||||||
|
<xs:element name="isbnItem" msprop:Generator_ColumnVarNameInTable="columnisbnItem" msprop:Generator_ColumnPropNameInRow="isbnItem" msprop:Generator_ColumnPropNameInTable="isbnItemColumn" msprop:Generator_UserColumnName="isbnItem" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="13" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="statusItem" msprop:Generator_ColumnVarNameInTable="columnstatusItem" msprop:Generator_ColumnPropNameInRow="statusItem" msprop:Generator_ColumnPropNameInTable="statusItemColumn" msprop:Generator_UserColumnName="statusItem" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="10" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbTipo" msprop:Generator_TableClassName="tbTipoDataTable" msprop:Generator_TableVarName="tabletbTipo" msprop:Generator_TablePropName="tbTipo" msprop:Generator_RowDeletingName="tbTipoRowDeleting" msprop:Generator_RowChangingName="tbTipoRowChanging" msprop:Generator_RowEvHandlerName="tbTipoRowChangeEventHandler" msprop:Generator_RowDeletedName="tbTipoRowDeleted" msprop:Generator_UserTableName="tbTipo" msprop:Generator_RowChangedName="tbTipoRowChanged" msprop:Generator_RowEvArgName="tbTipoRowChangeEvent" msprop:Generator_RowClassName="tbTipoRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idTipo" msprop:Generator_ColumnVarNameInTable="columnidTipo" msprop:Generator_ColumnPropNameInRow="idTipo" msprop:Generator_ColumnPropNameInTable="idTipoColumn" msprop:Generator_UserColumnName="idTipo" type="xs:int" />
|
||||||
|
<xs:element name="nomeTipo" msprop:Generator_ColumnVarNameInTable="columnnomeTipo" msprop:Generator_ColumnPropNameInRow="nomeTipo" msprop:Generator_ColumnPropNameInTable="nomeTipoColumn" msprop:Generator_UserColumnName="nomeTipo" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="30" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="tbAutor" msprop:Generator_TableClassName="tbAutorDataTable" msprop:Generator_TableVarName="tabletbAutor" msprop:Generator_TablePropName="tbAutor" msprop:Generator_RowDeletingName="tbAutorRowDeleting" msprop:Generator_RowChangingName="tbAutorRowChanging" msprop:Generator_RowEvHandlerName="tbAutorRowChangeEventHandler" msprop:Generator_RowDeletedName="tbAutorRowDeleted" msprop:Generator_UserTableName="tbAutor" msprop:Generator_RowChangedName="tbAutorRowChanged" msprop:Generator_RowEvArgName="tbAutorRowChangeEvent" msprop:Generator_RowClassName="tbAutorRow">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="idAutor" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidAutor" msprop:Generator_ColumnPropNameInRow="idAutor" msprop:Generator_ColumnPropNameInTable="idAutorColumn" msprop:Generator_UserColumnName="idAutor" type="xs:int" />
|
||||||
|
<xs:element name="nomeAutor" msprop:Generator_ColumnVarNameInTable="columnnomeAutor" msprop:Generator_ColumnPropNameInRow="nomeAutor" msprop:Generator_ColumnPropNameInTable="nomeAutorColumn" msprop:Generator_UserColumnName="nomeAutor" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:maxLength value="200" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbCliente" />
|
||||||
|
<xs:field xpath="mstns:idCliente" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbEditora_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbEditora" />
|
||||||
|
<xs:field xpath="mstns:idEditora" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbEmprestimo_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbEmprestimo" />
|
||||||
|
<xs:field xpath="mstns:idEmprestimo" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbFuncionario_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbFuncionario" />
|
||||||
|
<xs:field xpath="mstns:idFunc" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbGenero_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbGenero" />
|
||||||
|
<xs:field xpath="mstns:idGenero" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbItem_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbItem" />
|
||||||
|
<xs:field xpath="mstns:idItem" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbTipo_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbTipo" />
|
||||||
|
<xs:field xpath="mstns:idTipo" />
|
||||||
|
</xs:unique>
|
||||||
|
<xs:unique name="tbAutor_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||||
|
<xs:selector xpath=".//mstns:tbAutor" />
|
||||||
|
<xs:field xpath="mstns:idAutor" />
|
||||||
|
</xs:unique>
|
||||||
|
</xs:element>
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo>
|
||||||
|
<msdata:Relationship name="FK_tbEmprestimo_tbCliente" msdata:parent="tbCliente" msdata:child="tbEmprestimo" msdata:parentkey="idCliente" msdata:childkey="idCliente" msprop:Generator_UserChildTable="tbEmprestimo" msprop:Generator_ChildPropName="GettbEmprestimoRows" msprop:Generator_UserRelationName="FK_tbEmprestimo_tbCliente" msprop:Generator_ParentPropName="tbClienteRow" msprop:Generator_RelationVarName="relationFK_tbEmprestimo_tbCliente" msprop:Generator_UserParentTable="tbCliente" />
|
||||||
|
<msdata:Relationship name="FK_tbEmprestimo_tbFuncionario" msdata:parent="tbFuncionario" msdata:child="tbEmprestimo" msdata:parentkey="idFunc" msdata:childkey="idFunc" msprop:Generator_UserChildTable="tbEmprestimo" msprop:Generator_ChildPropName="GettbEmprestimoRows" msprop:Generator_UserRelationName="FK_tbEmprestimo_tbFuncionario" msprop:Generator_RelationVarName="relationFK_tbEmprestimo_tbFuncionario" msprop:Generator_UserParentTable="tbFuncionario" msprop:Generator_ParentPropName="tbFuncionarioRow" />
|
||||||
|
<msdata:Relationship name="FK_tbEmprestimo_tbItem" msdata:parent="tbItem" msdata:child="tbEmprestimo" msdata:parentkey="idItem" msdata:childkey="idItem" msprop:Generator_UserChildTable="tbEmprestimo" msprop:Generator_ChildPropName="GettbEmprestimoRows" msprop:Generator_UserRelationName="FK_tbEmprestimo_tbItem" msprop:Generator_RelationVarName="relationFK_tbEmprestimo_tbItem" msprop:Generator_UserParentTable="tbItem" msprop:Generator_ParentPropName="tbItemRow" />
|
||||||
|
<msdata:Relationship name="FK_tbItem_tbGenero" msdata:parent="tbGenero" msdata:child="tbItem" msdata:parentkey="idGenero" msdata:childkey="generoItem" msprop:Generator_UserChildTable="tbItem" msprop:Generator_ChildPropName="GettbItemRows" msprop:Generator_UserRelationName="FK_tbItem_tbGenero" msprop:Generator_ParentPropName="tbGeneroRow" msprop:Generator_RelationVarName="relationFK_tbItem_tbGenero" msprop:Generator_UserParentTable="tbGenero" />
|
||||||
|
<msdata:Relationship name="FK_tbItem_tbTipo" msdata:parent="tbTipo" msdata:child="tbItem" msdata:parentkey="idTipo" msdata:childkey="tipoItem" msprop:Generator_UserChildTable="tbItem" msprop:Generator_ChildPropName="GettbItemRows" msprop:Generator_UserRelationName="FK_tbItem_tbTipo" msprop:Generator_RelationVarName="relationFK_tbItem_tbTipo" msprop:Generator_UserParentTable="tbTipo" msprop:Generator_ParentPropName="tbTipoRow" />
|
||||||
|
<msdata:Relationship name="FK_tbItem_tbAutor" msdata:parent="tbAutor" msdata:child="tbItem" msdata:parentkey="idAutor" msdata:childkey="idAutor" msprop:Generator_UserChildTable="tbItem" msprop:Generator_ChildPropName="GettbItemRows" msprop:Generator_UserRelationName="FK_tbItem_tbAutor" msprop:Generator_RelationVarName="relationFK_tbItem_tbAutor" msprop:Generator_UserParentTable="tbAutor" msprop:Generator_ParentPropName="tbAutorRow" />
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:schema>
|
104
tbTrabalhoDataSet.xss
Normal file
104
tbTrabalhoDataSet.xss
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--<autogenerated>
|
||||||
|
This code was generated by a tool to store the dataset designer's layout information.
|
||||||
|
Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
the code is regenerated.
|
||||||
|
</autogenerated>-->
|
||||||
|
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||||
|
<Shapes>
|
||||||
|
<Shape ID="DesignTable:tbCliente" ZOrder="14" X="367" Y="70" Height="267" Width="197" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||||
|
<Shape ID="DesignTable:tbEditora" ZOrder="13" X="890" Y="70" Height="115" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||||
|
<Shape ID="DesignTable:tbEmprestimo" ZOrder="12" X="70" Y="70" Height="210" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||||
|
<Shape ID="DesignTable:tbFuncionario" ZOrder="11" X="367" Y="407" Height="305" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||||
|
<Shape ID="DesignTable:tbGenero" ZOrder="10" X="621" Y="782" Height="115" Width="199" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||||
|
<Shape ID="DesignTable:tbItem" ZOrder="9" X="367" Y="782" Height="229" Width="184" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||||
|
<Shape ID="DesignTable:tbTipo" ZOrder="8" X="621" Y="967" Height="115" Width="183" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||||
|
<Shape ID="DesignTable:tbAutor" ZOrder="2" X="1158" Y="70" Height="115" Width="190" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||||
|
</Shapes>
|
||||||
|
<Connectors>
|
||||||
|
<Connector ID="DesignRelation:FK_tbEmprestimo_tbCliente" ZOrder="7" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>367</X>
|
||||||
|
<Y>175</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>297</X>
|
||||||
|
<Y>175</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
<Connector ID="DesignRelation:FK_tbEmprestimo_tbFuncionario" ZOrder="6" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>367</X>
|
||||||
|
<Y>424</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>280</X>
|
||||||
|
<Y>424</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>280</X>
|
||||||
|
<Y>280</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
<Connector ID="DesignRelation:FK_tbEmprestimo_tbItem" ZOrder="5" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>367</X>
|
||||||
|
<Y>799</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>272</X>
|
||||||
|
<Y>799</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>272</X>
|
||||||
|
<Y>280</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
<Connector ID="DesignRelation:FK_tbItem_tbGenero" ZOrder="4" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>621</X>
|
||||||
|
<Y>839</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>551</X>
|
||||||
|
<Y>839</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
<Connector ID="DesignRelation:FK_tbItem_tbTipo" ZOrder="3" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>621</X>
|
||||||
|
<Y>989</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>551</X>
|
||||||
|
<Y>989</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
<Connector ID="DesignRelation:FK_tbItem_tbAutor" ZOrder="1" LineWidth="11">
|
||||||
|
<RoutePoints>
|
||||||
|
<Point>
|
||||||
|
<X>1175</X>
|
||||||
|
<Y>185</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>1175</X>
|
||||||
|
<Y>807</Y>
|
||||||
|
</Point>
|
||||||
|
<Point>
|
||||||
|
<X>551</X>
|
||||||
|
<Y>807</Y>
|
||||||
|
</Point>
|
||||||
|
</RoutePoints>
|
||||||
|
</Connector>
|
||||||
|
</Connectors>
|
||||||
|
</DiagramLayout>
|
Loading…
x
Reference in New Issue
Block a user