commit 6c991cf4a36ff1d36d4b84b34befc08c40260e67 Author: rasz Date: Thu Sep 2 08:04:56 2021 -0300 initial commit diff --git a/App.config b/App.config new file mode 100644 index 0000000..8016c92 --- /dev/null +++ b/App.config @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/CSharpLibrary.csproj b/CSharpLibrary.csproj new file mode 100644 index 0000000..941b00b --- /dev/null +++ b/CSharpLibrary.csproj @@ -0,0 +1,191 @@ + + + + + Debug + AnyCPU + {BEDA9585-DDE2-44E3-BBCA-634DBDEEF886} + WinExe + CSharpLibrary + CSharpLibrary + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Cadastro_de_Clientes.cs + + + Form + + + Consulta.cs + + + Form + + + AlterarEmprestimo.cs + + + Form + + + CadastroLivros.cs + + + Form + + + AlterarLivro.cs + + + Form + + + ConsultaCliente.cs + + + Form + + + Login.cs + + + Form + + + ConsultaLivro.cs + + + Form + + + Retirada_de_livros.cs + + + Form + + + search.cs + + + Form + + + Tela_Principal.cs + + + tbTrabalhoDataSet.xsd + + + True + True + tbTrabalhoDataSet.xsd + + + Cadastro_de_Clientes.cs + + + Consulta.cs + + + AlterarEmprestimo.cs + + + CadastroLivros.cs + + + AlterarLivro.cs + + + ConsultaCliente.cs + + + Login.cs + + + ConsultaLivro.cs + + + Retirada_de_livros.cs + + + search.cs + + + Tela_Principal.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + tbTrabalhoDataSet.xsd + + + MSDataSetGenerator + tbTrabalhoDataSet.Designer.cs + Designer + + + tbTrabalhoDataSet.xsd + + + + + + + + diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..417ce58 --- /dev/null +++ b/Program.cs @@ -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 + { + /// + /// Ponto de entrada principal para o aplicativo. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FormLogin()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..45a1359 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -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")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..aca7cf0 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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"])); + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..f9e8fa9 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,14 @@ + + + + + + <?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> + Data Source=DESKTOP-PPL6NEP;Initial Catalog=tbTrabalho;Integrated Security=True + + + diff --git a/ProvaCSharp.sln b/ProvaCSharp.sln new file mode 100644 index 0000000..0544b22 --- /dev/null +++ b/ProvaCSharp.sln @@ -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 diff --git a/SqlTypes/Abstratos.cs b/SqlTypes/Abstratos.cs new file mode 100644 index 0000000..dab52e0 --- /dev/null +++ b/SqlTypes/Abstratos.cs @@ -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 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 ReturnEmprestimoVals(string nomeFunc, string nomeCliente, string nomeItem) + { + List tmp = new List(); + + 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 ReturnItemVals(string Autor, string Genero, string Editora, string Tipo) + { + List tmp = new List(); + + 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> ReturnEmprestimoByName(string nomeCliente) + { + List> tmp = new List>(); + 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 + ( + 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> a = new List>(); + 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 + ( + r.GetString(0), + r.GetString(1) + ) + ); + } + } + con.Close(); + + foreach(Tuple 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; + } + } +} diff --git a/SqlTypes/Objeto.cs b/SqlTypes/Objeto.cs new file mode 100644 index 0000000..fbeb094 --- /dev/null +++ b/SqlTypes/Objeto.cs @@ -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> ReturnList() + { + List> tmp = new List>(); + + 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 + ( + 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 vlr) + { + List 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 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 tmp = new List{"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 vlr) + { + List 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 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 tmp = new List { "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 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 tmp = new List { "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 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 tmp = new List { "DELETADO" }; + try + { + Edit(id, tmp); + } + catch (SqlException) + { + throw new Exception(); + } + return true; + } + } + +} diff --git a/SqlTypes/Pessoa.cs b/SqlTypes/Pessoa.cs new file mode 100644 index 0000000..652ae03 --- /dev/null +++ b/SqlTypes/Pessoa.cs @@ -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 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 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; + } + + } +} diff --git a/stuff/Cliente/Cadastro_de_Clientes.Designer.cs b/stuff/Cliente/Cadastro_de_Clientes.Designer.cs new file mode 100644 index 0000000..d59846f --- /dev/null +++ b/stuff/Cliente/Cadastro_de_Clientes.Designer.cs @@ -0,0 +1,276 @@ +namespace ProjetoLPVIII +{ + partial class Cadastro_de_Clientes + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Cliente/Cadastro_de_Clientes.cs b/stuff/Cliente/Cadastro_de_Clientes.cs new file mode 100644 index 0000000..e6e90ce --- /dev/null +++ b/stuff/Cliente/Cadastro_de_Clientes.cs @@ -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(); + } + + } + } +} diff --git a/stuff/Cliente/Cadastro_de_Clientes.resx b/stuff/Cliente/Cadastro_de_Clientes.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Cliente/Cadastro_de_Clientes.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Cliente/ConsultaCliente.Designer.cs b/stuff/Cliente/ConsultaCliente.Designer.cs new file mode 100644 index 0000000..3266aba --- /dev/null +++ b/stuff/Cliente/ConsultaCliente.Designer.cs @@ -0,0 +1,325 @@ +namespace TelasProjeto +{ + partial class formConsultarCliente + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Cliente/ConsultaCliente.cs b/stuff/Cliente/ConsultaCliente.cs new file mode 100644 index 0000000..4ce0c1a --- /dev/null +++ b/stuff/Cliente/ConsultaCliente.cs @@ -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 + { + 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(); + } + } + } +} diff --git a/stuff/Cliente/ConsultaCliente.resx b/stuff/Cliente/ConsultaCliente.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Cliente/ConsultaCliente.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Consulta.Designer.cs b/stuff/Consulta.Designer.cs new file mode 100644 index 0000000..8ce8714 --- /dev/null +++ b/stuff/Consulta.Designer.cs @@ -0,0 +1,67 @@ +namespace CSharpLibrary.stuff +{ + partial class Consulta + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} diff --git a/stuff/Consulta.cs b/stuff/Consulta.cs new file mode 100644 index 0000000..fb2b230 --- /dev/null +++ b/stuff/Consulta.cs @@ -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> a = new List>(); + 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(tmp, c.Value.ToString())); + } + } + } + } + AlterarEmprestimo f = new AlterarEmprestimo(tmp, this); + f.Show(); + } + } + } +} diff --git a/stuff/Consulta.resx b/stuff/Consulta.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Consulta.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Item/AlterarEmprestimo.Designer.cs b/stuff/Item/AlterarEmprestimo.Designer.cs new file mode 100644 index 0000000..24f8715 --- /dev/null +++ b/stuff/Item/AlterarEmprestimo.Designer.cs @@ -0,0 +1,253 @@ +namespace CSharpLibrary.stuff.Item +{ + partial class AlterarEmprestimo + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} diff --git a/stuff/Item/AlterarEmprestimo.cs b/stuff/Item/AlterarEmprestimo.cs new file mode 100644 index 0000000..352a1c2 --- /dev/null +++ b/stuff/Item/AlterarEmprestimo.cs @@ -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 { + 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(); + } + } +} diff --git a/stuff/Item/AlterarEmprestimo.resx b/stuff/Item/AlterarEmprestimo.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Item/AlterarEmprestimo.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Item/AlterarLivro.Designer.cs b/stuff/Item/AlterarLivro.Designer.cs new file mode 100644 index 0000000..38a5bfd --- /dev/null +++ b/stuff/Item/AlterarLivro.Designer.cs @@ -0,0 +1,292 @@ +namespace TelasProjeto +{ + partial class formAlterarLivro + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Item/AlterarLivro.cs b/stuff/Item/AlterarLivro.cs new file mode 100644 index 0000000..33d4ea8 --- /dev/null +++ b/stuff/Item/AlterarLivro.cs @@ -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 + { 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> a) + { + idI = a[0].Item1; + List tmp = new List(); + foreach (Tuple 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; + } + } + } +} diff --git a/stuff/Item/AlterarLivro.resx b/stuff/Item/AlterarLivro.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Item/AlterarLivro.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Item/CadastroLivros.Designer.cs b/stuff/Item/CadastroLivros.Designer.cs new file mode 100644 index 0000000..e6d3309 --- /dev/null +++ b/stuff/Item/CadastroLivros.Designer.cs @@ -0,0 +1,303 @@ +namespace ProjetoLPVIII +{ + partial class Cadastro_de_Livros + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Item/CadastroLivros.cs b/stuff/Item/CadastroLivros.cs new file mode 100644 index 0000000..a7159f6 --- /dev/null +++ b/stuff/Item/CadastroLivros.cs @@ -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; + } + } + } +} diff --git a/stuff/Item/CadastroLivros.resx b/stuff/Item/CadastroLivros.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Item/CadastroLivros.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Item/ConsultaLivro.Designer.cs b/stuff/Item/ConsultaLivro.Designer.cs new file mode 100644 index 0000000..72ddde7 --- /dev/null +++ b/stuff/Item/ConsultaLivro.Designer.cs @@ -0,0 +1,121 @@ +namespace TelasProjeto +{ + partial class Form5 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Item/ConsultaLivro.cs b/stuff/Item/ConsultaLivro.cs new file mode 100644 index 0000000..be11a29 --- /dev/null +++ b/stuff/Item/ConsultaLivro.cs @@ -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> a = new List>(); + 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(tmp, c.Value.ToString())); + } + } + } + } + formAlterarLivro f = new formAlterarLivro(a); + f.Show(); + } + } + } +} diff --git a/stuff/Item/ConsultaLivro.resx b/stuff/Item/ConsultaLivro.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Item/ConsultaLivro.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Item/search.Designer.cs b/stuff/Item/search.Designer.cs new file mode 100644 index 0000000..2db2f0e --- /dev/null +++ b/stuff/Item/search.Designer.cs @@ -0,0 +1,91 @@ +namespace CSharpLibrary.stuff +{ + partial class search + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} diff --git a/stuff/Item/search.cs b/stuff/Item/search.cs new file mode 100644 index 0000000..34ffb4b --- /dev/null +++ b/stuff/Item/search.cs @@ -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(); + } + } + } +} diff --git a/stuff/Item/search.resx b/stuff/Item/search.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Item/search.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Login.Designer.cs b/stuff/Login.Designer.cs new file mode 100644 index 0000000..a8dbb4b --- /dev/null +++ b/stuff/Login.Designer.cs @@ -0,0 +1,127 @@ +namespace TelasProjeto +{ + partial class FormLogin + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} diff --git a/stuff/Login.cs b/stuff/Login.cs new file mode 100644 index 0000000..7067909 --- /dev/null +++ b/stuff/Login.cs @@ -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(); + } + } + } +} diff --git a/stuff/Login.resx b/stuff/Login.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Login.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Retirada_de_livros.Designer.cs b/stuff/Retirada_de_livros.Designer.cs new file mode 100644 index 0000000..1dfcf1b --- /dev/null +++ b/stuff/Retirada_de_livros.Designer.cs @@ -0,0 +1,221 @@ +namespace ProjetoLPVIII +{ + partial class Retirada_de_livros + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/stuff/Retirada_de_livros.cs b/stuff/Retirada_de_livros.cs new file mode 100644 index 0000000..8eeb595 --- /dev/null +++ b/stuff/Retirada_de_livros.cs @@ -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(); + } + } + } +} diff --git a/stuff/Retirada_de_livros.resx b/stuff/Retirada_de_livros.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/stuff/Retirada_de_livros.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/stuff/Tela_Principal.Designer.cs b/stuff/Tela_Principal.Designer.cs new file mode 100644 index 0000000..fc0cccf --- /dev/null +++ b/stuff/Tela_Principal.Designer.cs @@ -0,0 +1,168 @@ +namespace ProjetoLPVIII +{ + partial class Form1 + { + /// + /// Variável de designer necessária. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Limpar os recursos que estão sendo usados. + /// + /// true se for necessário descartar os recursos gerenciados; caso contrário, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Código gerado pelo Windows Form Designer + + /// + /// Método necessário para suporte ao Designer - não modifique + /// o conteúdo deste método com o editor de código. + /// + 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; + } +} + diff --git a/stuff/Tela_Principal.cs b/stuff/Tela_Principal.cs new file mode 100644 index 0000000..3f64f6b --- /dev/null +++ b/stuff/Tela_Principal.cs @@ -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(); + } + } +} diff --git a/stuff/Tela_Principal.resx b/stuff/Tela_Principal.resx new file mode 100644 index 0000000..0f6d8eb --- /dev/null +++ b/stuff/Tela_Principal.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/tbTrabalhoDataSet.Designer.cs b/tbTrabalhoDataSet.Designer.cs new file mode 100644 index 0000000..6cbbbd5 --- /dev/null +++ b/tbTrabalhoDataSet.Designer.cs @@ -0,0 +1,9474 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace CSharpLibrary { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("tbTrabalhoDataSet")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class tbTrabalhoDataSet : global::System.Data.DataSet { + + private tbClienteDataTable tabletbCliente; + + private tbEditoraDataTable tabletbEditora; + + private tbEmprestimoDataTable tabletbEmprestimo; + + private tbFuncionarioDataTable tabletbFuncionario; + + private tbGeneroDataTable tabletbGenero; + + private tbItemDataTable tabletbItem; + + private tbTipoDataTable tabletbTipo; + + private tbAutorDataTable tabletbAutor; + + private global::System.Data.DataRelation relationFK_tbEmprestimo_tbCliente; + + private global::System.Data.DataRelation relationFK_tbEmprestimo_tbFuncionario; + + private global::System.Data.DataRelation relationFK_tbEmprestimo_tbItem; + + private global::System.Data.DataRelation relationFK_tbItem_tbGenero; + + private global::System.Data.DataRelation relationFK_tbItem_tbTipo; + + private global::System.Data.DataRelation relationFK_tbItem_tbAutor; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTrabalhoDataSet() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbTrabalhoDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["tbCliente"] != null)) { + base.Tables.Add(new tbClienteDataTable(ds.Tables["tbCliente"])); + } + if ((ds.Tables["tbEditora"] != null)) { + base.Tables.Add(new tbEditoraDataTable(ds.Tables["tbEditora"])); + } + if ((ds.Tables["tbEmprestimo"] != null)) { + base.Tables.Add(new tbEmprestimoDataTable(ds.Tables["tbEmprestimo"])); + } + if ((ds.Tables["tbFuncionario"] != null)) { + base.Tables.Add(new tbFuncionarioDataTable(ds.Tables["tbFuncionario"])); + } + if ((ds.Tables["tbGenero"] != null)) { + base.Tables.Add(new tbGeneroDataTable(ds.Tables["tbGenero"])); + } + if ((ds.Tables["tbItem"] != null)) { + base.Tables.Add(new tbItemDataTable(ds.Tables["tbItem"])); + } + if ((ds.Tables["tbTipo"] != null)) { + base.Tables.Add(new tbTipoDataTable(ds.Tables["tbTipo"])); + } + if ((ds.Tables["tbAutor"] != null)) { + base.Tables.Add(new tbAutorDataTable(ds.Tables["tbAutor"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbClienteDataTable tbCliente { + get { + return this.tabletbCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbEditoraDataTable tbEditora { + get { + return this.tabletbEditora; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbEmprestimoDataTable tbEmprestimo { + get { + return this.tabletbEmprestimo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbFuncionarioDataTable tbFuncionario { + get { + return this.tabletbFuncionario; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbGeneroDataTable tbGenero { + get { + return this.tabletbGenero; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbItemDataTable tbItem { + get { + return this.tabletbItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbTipoDataTable tbTipo { + get { + return this.tabletbTipo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public tbAutorDataTable tbAutor { + get { + return this.tabletbAutor; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataSet Clone() { + tbTrabalhoDataSet cln = ((tbTrabalhoDataSet)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["tbCliente"] != null)) { + base.Tables.Add(new tbClienteDataTable(ds.Tables["tbCliente"])); + } + if ((ds.Tables["tbEditora"] != null)) { + base.Tables.Add(new tbEditoraDataTable(ds.Tables["tbEditora"])); + } + if ((ds.Tables["tbEmprestimo"] != null)) { + base.Tables.Add(new tbEmprestimoDataTable(ds.Tables["tbEmprestimo"])); + } + if ((ds.Tables["tbFuncionario"] != null)) { + base.Tables.Add(new tbFuncionarioDataTable(ds.Tables["tbFuncionario"])); + } + if ((ds.Tables["tbGenero"] != null)) { + base.Tables.Add(new tbGeneroDataTable(ds.Tables["tbGenero"])); + } + if ((ds.Tables["tbItem"] != null)) { + base.Tables.Add(new tbItemDataTable(ds.Tables["tbItem"])); + } + if ((ds.Tables["tbTipo"] != null)) { + base.Tables.Add(new tbTipoDataTable(ds.Tables["tbTipo"])); + } + if ((ds.Tables["tbAutor"] != null)) { + base.Tables.Add(new tbAutorDataTable(ds.Tables["tbAutor"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars(bool initTable) { + this.tabletbCliente = ((tbClienteDataTable)(base.Tables["tbCliente"])); + if ((initTable == true)) { + if ((this.tabletbCliente != null)) { + this.tabletbCliente.InitVars(); + } + } + this.tabletbEditora = ((tbEditoraDataTable)(base.Tables["tbEditora"])); + if ((initTable == true)) { + if ((this.tabletbEditora != null)) { + this.tabletbEditora.InitVars(); + } + } + this.tabletbEmprestimo = ((tbEmprestimoDataTable)(base.Tables["tbEmprestimo"])); + if ((initTable == true)) { + if ((this.tabletbEmprestimo != null)) { + this.tabletbEmprestimo.InitVars(); + } + } + this.tabletbFuncionario = ((tbFuncionarioDataTable)(base.Tables["tbFuncionario"])); + if ((initTable == true)) { + if ((this.tabletbFuncionario != null)) { + this.tabletbFuncionario.InitVars(); + } + } + this.tabletbGenero = ((tbGeneroDataTable)(base.Tables["tbGenero"])); + if ((initTable == true)) { + if ((this.tabletbGenero != null)) { + this.tabletbGenero.InitVars(); + } + } + this.tabletbItem = ((tbItemDataTable)(base.Tables["tbItem"])); + if ((initTable == true)) { + if ((this.tabletbItem != null)) { + this.tabletbItem.InitVars(); + } + } + this.tabletbTipo = ((tbTipoDataTable)(base.Tables["tbTipo"])); + if ((initTable == true)) { + if ((this.tabletbTipo != null)) { + this.tabletbTipo.InitVars(); + } + } + this.tabletbAutor = ((tbAutorDataTable)(base.Tables["tbAutor"])); + if ((initTable == true)) { + if ((this.tabletbAutor != null)) { + this.tabletbAutor.InitVars(); + } + } + this.relationFK_tbEmprestimo_tbCliente = this.Relations["FK_tbEmprestimo_tbCliente"]; + this.relationFK_tbEmprestimo_tbFuncionario = this.Relations["FK_tbEmprestimo_tbFuncionario"]; + this.relationFK_tbEmprestimo_tbItem = this.Relations["FK_tbEmprestimo_tbItem"]; + this.relationFK_tbItem_tbGenero = this.Relations["FK_tbItem_tbGenero"]; + this.relationFK_tbItem_tbTipo = this.Relations["FK_tbItem_tbTipo"]; + this.relationFK_tbItem_tbAutor = this.Relations["FK_tbItem_tbAutor"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.DataSetName = "tbTrabalhoDataSet"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/tbTrabalhoDataSet.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tabletbCliente = new tbClienteDataTable(); + base.Tables.Add(this.tabletbCliente); + this.tabletbEditora = new tbEditoraDataTable(); + base.Tables.Add(this.tabletbEditora); + this.tabletbEmprestimo = new tbEmprestimoDataTable(); + base.Tables.Add(this.tabletbEmprestimo); + this.tabletbFuncionario = new tbFuncionarioDataTable(); + base.Tables.Add(this.tabletbFuncionario); + this.tabletbGenero = new tbGeneroDataTable(); + base.Tables.Add(this.tabletbGenero); + this.tabletbItem = new tbItemDataTable(); + base.Tables.Add(this.tabletbItem); + this.tabletbTipo = new tbTipoDataTable(); + base.Tables.Add(this.tabletbTipo); + this.tabletbAutor = new tbAutorDataTable(); + base.Tables.Add(this.tabletbAutor); + this.relationFK_tbEmprestimo_tbCliente = new global::System.Data.DataRelation("FK_tbEmprestimo_tbCliente", new global::System.Data.DataColumn[] { + this.tabletbCliente.idClienteColumn}, new global::System.Data.DataColumn[] { + this.tabletbEmprestimo.idClienteColumn}, false); + this.Relations.Add(this.relationFK_tbEmprestimo_tbCliente); + this.relationFK_tbEmprestimo_tbFuncionario = new global::System.Data.DataRelation("FK_tbEmprestimo_tbFuncionario", new global::System.Data.DataColumn[] { + this.tabletbFuncionario.idFuncColumn}, new global::System.Data.DataColumn[] { + this.tabletbEmprestimo.idFuncColumn}, false); + this.Relations.Add(this.relationFK_tbEmprestimo_tbFuncionario); + this.relationFK_tbEmprestimo_tbItem = new global::System.Data.DataRelation("FK_tbEmprestimo_tbItem", new global::System.Data.DataColumn[] { + this.tabletbItem.idItemColumn}, new global::System.Data.DataColumn[] { + this.tabletbEmprestimo.idItemColumn}, false); + this.Relations.Add(this.relationFK_tbEmprestimo_tbItem); + this.relationFK_tbItem_tbGenero = new global::System.Data.DataRelation("FK_tbItem_tbGenero", new global::System.Data.DataColumn[] { + this.tabletbGenero.idGeneroColumn}, new global::System.Data.DataColumn[] { + this.tabletbItem.generoItemColumn}, false); + this.Relations.Add(this.relationFK_tbItem_tbGenero); + this.relationFK_tbItem_tbTipo = new global::System.Data.DataRelation("FK_tbItem_tbTipo", new global::System.Data.DataColumn[] { + this.tabletbTipo.idTipoColumn}, new global::System.Data.DataColumn[] { + this.tabletbItem.tipoItemColumn}, false); + this.Relations.Add(this.relationFK_tbItem_tbTipo); + this.relationFK_tbItem_tbAutor = new global::System.Data.DataRelation("FK_tbItem_tbAutor", new global::System.Data.DataColumn[] { + this.tabletbAutor.idAutorColumn}, new global::System.Data.DataColumn[] { + this.tabletbItem.idAutorColumn}, false); + this.Relations.Add(this.relationFK_tbItem_tbAutor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbCliente() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbEditora() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbEmprestimo() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbFuncionario() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbGenero() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbItem() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbTipo() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializetbAutor() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbClienteRowChangeEventHandler(object sender, tbClienteRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbEditoraRowChangeEventHandler(object sender, tbEditoraRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbEmprestimoRowChangeEventHandler(object sender, tbEmprestimoRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbFuncionarioRowChangeEventHandler(object sender, tbFuncionarioRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbGeneroRowChangeEventHandler(object sender, tbGeneroRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbItemRowChangeEventHandler(object sender, tbItemRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbTipoRowChangeEventHandler(object sender, tbTipoRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void tbAutorRowChangeEventHandler(object sender, tbAutorRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbClienteDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidCliente; + + private global::System.Data.DataColumn columnnomeCliente; + + private global::System.Data.DataColumn columnrgCliente; + + private global::System.Data.DataColumn columncpfCliente; + + private global::System.Data.DataColumn columntelCliente; + + private global::System.Data.DataColumn columncelCliente; + + private global::System.Data.DataColumn columnruaCliente; + + private global::System.Data.DataColumn columnnumeroCliente; + + private global::System.Data.DataColumn columncidadeCliente; + + private global::System.Data.DataColumn columnstatusCliente; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteDataTable() { + this.TableName = "tbCliente"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbClienteDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbClienteDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idClienteColumn { + get { + return this.columnidCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeClienteColumn { + get { + return this.columnnomeCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn rgClienteColumn { + get { + return this.columnrgCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn cpfClienteColumn { + get { + return this.columncpfCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn telClienteColumn { + get { + return this.columntelCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn celClienteColumn { + get { + return this.columncelCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ruaClienteColumn { + get { + return this.columnruaCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn numeroClienteColumn { + get { + return this.columnnumeroCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn cidadeClienteColumn { + get { + return this.columncidadeCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn statusClienteColumn { + get { + return this.columnstatusCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow this[int index] { + get { + return ((tbClienteRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbClienteRowChangeEventHandler tbClienteRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbClienteRowChangeEventHandler tbClienteRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbClienteRowChangeEventHandler tbClienteRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbClienteRowChangeEventHandler tbClienteRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbClienteRow(tbClienteRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow AddtbClienteRow(int idCliente, string nomeCliente, string rgCliente, string cpfCliente, string telCliente, string celCliente, string ruaCliente, string numeroCliente, string cidadeCliente, string statusCliente) { + tbClienteRow rowtbClienteRow = ((tbClienteRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idCliente, + nomeCliente, + rgCliente, + cpfCliente, + telCliente, + celCliente, + ruaCliente, + numeroCliente, + cidadeCliente, + statusCliente}; + rowtbClienteRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbClienteRow); + return rowtbClienteRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow FindByidCliente(int idCliente) { + return ((tbClienteRow)(this.Rows.Find(new object[] { + idCliente}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbClienteDataTable cln = ((tbClienteDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbClienteDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidCliente = base.Columns["idCliente"]; + this.columnnomeCliente = base.Columns["nomeCliente"]; + this.columnrgCliente = base.Columns["rgCliente"]; + this.columncpfCliente = base.Columns["cpfCliente"]; + this.columntelCliente = base.Columns["telCliente"]; + this.columncelCliente = base.Columns["celCliente"]; + this.columnruaCliente = base.Columns["ruaCliente"]; + this.columnnumeroCliente = base.Columns["numeroCliente"]; + this.columncidadeCliente = base.Columns["cidadeCliente"]; + this.columnstatusCliente = base.Columns["statusCliente"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidCliente = new global::System.Data.DataColumn("idCliente", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidCliente); + this.columnnomeCliente = new global::System.Data.DataColumn("nomeCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeCliente); + this.columnrgCliente = new global::System.Data.DataColumn("rgCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnrgCliente); + this.columncpfCliente = new global::System.Data.DataColumn("cpfCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncpfCliente); + this.columntelCliente = new global::System.Data.DataColumn("telCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntelCliente); + this.columncelCliente = new global::System.Data.DataColumn("celCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncelCliente); + this.columnruaCliente = new global::System.Data.DataColumn("ruaCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnruaCliente); + this.columnnumeroCliente = new global::System.Data.DataColumn("numeroCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnumeroCliente); + this.columncidadeCliente = new global::System.Data.DataColumn("cidadeCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncidadeCliente); + this.columnstatusCliente = new global::System.Data.DataColumn("statusCliente", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnstatusCliente); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidCliente}, true)); + this.columnidCliente.AllowDBNull = false; + this.columnidCliente.Unique = true; + this.columnnomeCliente.MaxLength = 50; + this.columnrgCliente.MaxLength = 12; + this.columncpfCliente.MaxLength = 11; + this.columntelCliente.MaxLength = 10; + this.columncelCliente.MaxLength = 11; + this.columnruaCliente.MaxLength = 100; + this.columnnumeroCliente.MaxLength = 4; + this.columncidadeCliente.MaxLength = 30; + this.columnstatusCliente.MaxLength = 10; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow NewtbClienteRow() { + return ((tbClienteRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbClienteRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbClienteRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbClienteRowChanged != null)) { + this.tbClienteRowChanged(this, new tbClienteRowChangeEvent(((tbClienteRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbClienteRowChanging != null)) { + this.tbClienteRowChanging(this, new tbClienteRowChangeEvent(((tbClienteRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbClienteRowDeleted != null)) { + this.tbClienteRowDeleted(this, new tbClienteRowChangeEvent(((tbClienteRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbClienteRowDeleting != null)) { + this.tbClienteRowDeleting(this, new tbClienteRowChangeEvent(((tbClienteRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbClienteRow(tbClienteRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbClienteDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbEditoraDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidEditora; + + private global::System.Data.DataColumn columnnomeEditora; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraDataTable() { + this.TableName = "tbEditora"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbEditoraDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbEditoraDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idEditoraColumn { + get { + return this.columnidEditora; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeEditoraColumn { + get { + return this.columnnomeEditora; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRow this[int index] { + get { + return ((tbEditoraRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEditoraRowChangeEventHandler tbEditoraRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEditoraRowChangeEventHandler tbEditoraRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEditoraRowChangeEventHandler tbEditoraRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEditoraRowChangeEventHandler tbEditoraRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbEditoraRow(tbEditoraRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRow AddtbEditoraRow(int idEditora, string nomeEditora) { + tbEditoraRow rowtbEditoraRow = ((tbEditoraRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idEditora, + nomeEditora}; + rowtbEditoraRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbEditoraRow); + return rowtbEditoraRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRow FindByidEditora(int idEditora) { + return ((tbEditoraRow)(this.Rows.Find(new object[] { + idEditora}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbEditoraDataTable cln = ((tbEditoraDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbEditoraDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidEditora = base.Columns["idEditora"]; + this.columnnomeEditora = base.Columns["nomeEditora"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidEditora = new global::System.Data.DataColumn("idEditora", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidEditora); + this.columnnomeEditora = new global::System.Data.DataColumn("nomeEditora", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeEditora); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidEditora}, true)); + this.columnidEditora.AllowDBNull = false; + this.columnidEditora.Unique = true; + this.columnnomeEditora.MaxLength = 30; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRow NewtbEditoraRow() { + return ((tbEditoraRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbEditoraRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbEditoraRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbEditoraRowChanged != null)) { + this.tbEditoraRowChanged(this, new tbEditoraRowChangeEvent(((tbEditoraRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbEditoraRowChanging != null)) { + this.tbEditoraRowChanging(this, new tbEditoraRowChangeEvent(((tbEditoraRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbEditoraRowDeleted != null)) { + this.tbEditoraRowDeleted(this, new tbEditoraRowChangeEvent(((tbEditoraRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbEditoraRowDeleting != null)) { + this.tbEditoraRowDeleting(this, new tbEditoraRowChangeEvent(((tbEditoraRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbEditoraRow(tbEditoraRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbEditoraDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbEmprestimoDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidEmprestimo; + + private global::System.Data.DataColumn columnidFunc; + + private global::System.Data.DataColumn columnidCliente; + + private global::System.Data.DataColumn columnidItem; + + private global::System.Data.DataColumn columndataEmprestimo; + + private global::System.Data.DataColumn columndataDevolucao; + + private global::System.Data.DataColumn columnstatusEmprestimo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoDataTable() { + this.TableName = "tbEmprestimo"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbEmprestimoDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbEmprestimoDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idEmprestimoColumn { + get { + return this.columnidEmprestimo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idFuncColumn { + get { + return this.columnidFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idClienteColumn { + get { + return this.columnidCliente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idItemColumn { + get { + return this.columnidItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn dataEmprestimoColumn { + get { + return this.columndataEmprestimo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn dataDevolucaoColumn { + get { + return this.columndataDevolucao; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn statusEmprestimoColumn { + get { + return this.columnstatusEmprestimo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow this[int index] { + get { + return ((tbEmprestimoRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEmprestimoRowChangeEventHandler tbEmprestimoRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEmprestimoRowChangeEventHandler tbEmprestimoRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEmprestimoRowChangeEventHandler tbEmprestimoRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbEmprestimoRowChangeEventHandler tbEmprestimoRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbEmprestimoRow(tbEmprestimoRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow AddtbEmprestimoRow(int idEmprestimo, tbFuncionarioRow parenttbFuncionarioRowByFK_tbEmprestimo_tbFuncionario, tbClienteRow parenttbClienteRowByFK_tbEmprestimo_tbCliente, tbItemRow parenttbItemRowByFK_tbEmprestimo_tbItem, System.DateTime dataEmprestimo, System.DateTime dataDevolucao, string statusEmprestimo) { + tbEmprestimoRow rowtbEmprestimoRow = ((tbEmprestimoRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idEmprestimo, + null, + null, + null, + dataEmprestimo, + dataDevolucao, + statusEmprestimo}; + if ((parenttbFuncionarioRowByFK_tbEmprestimo_tbFuncionario != null)) { + columnValuesArray[1] = parenttbFuncionarioRowByFK_tbEmprestimo_tbFuncionario[0]; + } + if ((parenttbClienteRowByFK_tbEmprestimo_tbCliente != null)) { + columnValuesArray[2] = parenttbClienteRowByFK_tbEmprestimo_tbCliente[0]; + } + if ((parenttbItemRowByFK_tbEmprestimo_tbItem != null)) { + columnValuesArray[3] = parenttbItemRowByFK_tbEmprestimo_tbItem[0]; + } + rowtbEmprestimoRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbEmprestimoRow); + return rowtbEmprestimoRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow FindByidEmprestimo(int idEmprestimo) { + return ((tbEmprestimoRow)(this.Rows.Find(new object[] { + idEmprestimo}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbEmprestimoDataTable cln = ((tbEmprestimoDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbEmprestimoDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidEmprestimo = base.Columns["idEmprestimo"]; + this.columnidFunc = base.Columns["idFunc"]; + this.columnidCliente = base.Columns["idCliente"]; + this.columnidItem = base.Columns["idItem"]; + this.columndataEmprestimo = base.Columns["dataEmprestimo"]; + this.columndataDevolucao = base.Columns["dataDevolucao"]; + this.columnstatusEmprestimo = base.Columns["statusEmprestimo"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidEmprestimo = new global::System.Data.DataColumn("idEmprestimo", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidEmprestimo); + this.columnidFunc = new global::System.Data.DataColumn("idFunc", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidFunc); + this.columnidCliente = new global::System.Data.DataColumn("idCliente", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidCliente); + this.columnidItem = new global::System.Data.DataColumn("idItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidItem); + this.columndataEmprestimo = new global::System.Data.DataColumn("dataEmprestimo", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndataEmprestimo); + this.columndataDevolucao = new global::System.Data.DataColumn("dataDevolucao", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndataDevolucao); + this.columnstatusEmprestimo = new global::System.Data.DataColumn("statusEmprestimo", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnstatusEmprestimo); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidEmprestimo}, true)); + this.columnidEmprestimo.AllowDBNull = false; + this.columnidEmprestimo.Unique = true; + this.columnstatusEmprestimo.MaxLength = 10; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow NewtbEmprestimoRow() { + return ((tbEmprestimoRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbEmprestimoRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbEmprestimoRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbEmprestimoRowChanged != null)) { + this.tbEmprestimoRowChanged(this, new tbEmprestimoRowChangeEvent(((tbEmprestimoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbEmprestimoRowChanging != null)) { + this.tbEmprestimoRowChanging(this, new tbEmprestimoRowChangeEvent(((tbEmprestimoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbEmprestimoRowDeleted != null)) { + this.tbEmprestimoRowDeleted(this, new tbEmprestimoRowChangeEvent(((tbEmprestimoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbEmprestimoRowDeleting != null)) { + this.tbEmprestimoRowDeleting(this, new tbEmprestimoRowChangeEvent(((tbEmprestimoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbEmprestimoRow(tbEmprestimoRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbEmprestimoDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbFuncionarioDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidFunc; + + private global::System.Data.DataColumn columnnomeFunc; + + private global::System.Data.DataColumn columnrgFunc; + + private global::System.Data.DataColumn columncpfFunc; + + private global::System.Data.DataColumn columntelFunc; + + private global::System.Data.DataColumn columncelFunc; + + private global::System.Data.DataColumn columnruaFunc; + + private global::System.Data.DataColumn columnnumeroFunc; + + private global::System.Data.DataColumn columncidadeFunc; + + private global::System.Data.DataColumn columnstatusFunc; + + private global::System.Data.DataColumn columnusuarioFunc; + + private global::System.Data.DataColumn columnsenhaFunc; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioDataTable() { + this.TableName = "tbFuncionario"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbFuncionarioDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbFuncionarioDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idFuncColumn { + get { + return this.columnidFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeFuncColumn { + get { + return this.columnnomeFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn rgFuncColumn { + get { + return this.columnrgFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn cpfFuncColumn { + get { + return this.columncpfFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn telFuncColumn { + get { + return this.columntelFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn celFuncColumn { + get { + return this.columncelFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ruaFuncColumn { + get { + return this.columnruaFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn numeroFuncColumn { + get { + return this.columnnumeroFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn cidadeFuncColumn { + get { + return this.columncidadeFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn statusFuncColumn { + get { + return this.columnstatusFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn usuarioFuncColumn { + get { + return this.columnusuarioFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn senhaFuncColumn { + get { + return this.columnsenhaFunc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow this[int index] { + get { + return ((tbFuncionarioRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbFuncionarioRowChangeEventHandler tbFuncionarioRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbFuncionarioRowChangeEventHandler tbFuncionarioRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbFuncionarioRowChangeEventHandler tbFuncionarioRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbFuncionarioRowChangeEventHandler tbFuncionarioRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbFuncionarioRow(tbFuncionarioRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow AddtbFuncionarioRow(int idFunc, string nomeFunc, string rgFunc, string cpfFunc, string telFunc, string celFunc, string ruaFunc, string numeroFunc, string cidadeFunc, string statusFunc, string usuarioFunc, string senhaFunc) { + tbFuncionarioRow rowtbFuncionarioRow = ((tbFuncionarioRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idFunc, + nomeFunc, + rgFunc, + cpfFunc, + telFunc, + celFunc, + ruaFunc, + numeroFunc, + cidadeFunc, + statusFunc, + usuarioFunc, + senhaFunc}; + rowtbFuncionarioRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbFuncionarioRow); + return rowtbFuncionarioRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow FindByidFunc(int idFunc) { + return ((tbFuncionarioRow)(this.Rows.Find(new object[] { + idFunc}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbFuncionarioDataTable cln = ((tbFuncionarioDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbFuncionarioDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidFunc = base.Columns["idFunc"]; + this.columnnomeFunc = base.Columns["nomeFunc"]; + this.columnrgFunc = base.Columns["rgFunc"]; + this.columncpfFunc = base.Columns["cpfFunc"]; + this.columntelFunc = base.Columns["telFunc"]; + this.columncelFunc = base.Columns["celFunc"]; + this.columnruaFunc = base.Columns["ruaFunc"]; + this.columnnumeroFunc = base.Columns["numeroFunc"]; + this.columncidadeFunc = base.Columns["cidadeFunc"]; + this.columnstatusFunc = base.Columns["statusFunc"]; + this.columnusuarioFunc = base.Columns["usuarioFunc"]; + this.columnsenhaFunc = base.Columns["senhaFunc"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidFunc = new global::System.Data.DataColumn("idFunc", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidFunc); + this.columnnomeFunc = new global::System.Data.DataColumn("nomeFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeFunc); + this.columnrgFunc = new global::System.Data.DataColumn("rgFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnrgFunc); + this.columncpfFunc = new global::System.Data.DataColumn("cpfFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncpfFunc); + this.columntelFunc = new global::System.Data.DataColumn("telFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntelFunc); + this.columncelFunc = new global::System.Data.DataColumn("celFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncelFunc); + this.columnruaFunc = new global::System.Data.DataColumn("ruaFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnruaFunc); + this.columnnumeroFunc = new global::System.Data.DataColumn("numeroFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnumeroFunc); + this.columncidadeFunc = new global::System.Data.DataColumn("cidadeFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncidadeFunc); + this.columnstatusFunc = new global::System.Data.DataColumn("statusFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnstatusFunc); + this.columnusuarioFunc = new global::System.Data.DataColumn("usuarioFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnusuarioFunc); + this.columnsenhaFunc = new global::System.Data.DataColumn("senhaFunc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnsenhaFunc); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidFunc}, true)); + this.columnidFunc.AllowDBNull = false; + this.columnidFunc.Unique = true; + this.columnnomeFunc.MaxLength = 50; + this.columnrgFunc.MaxLength = 12; + this.columncpfFunc.MaxLength = 11; + this.columntelFunc.MaxLength = 10; + this.columncelFunc.MaxLength = 11; + this.columnruaFunc.MaxLength = 100; + this.columnnumeroFunc.MaxLength = 4; + this.columncidadeFunc.MaxLength = 30; + this.columnstatusFunc.MaxLength = 10; + this.columnusuarioFunc.MaxLength = 15; + this.columnsenhaFunc.MaxLength = 15; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow NewtbFuncionarioRow() { + return ((tbFuncionarioRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbFuncionarioRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbFuncionarioRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbFuncionarioRowChanged != null)) { + this.tbFuncionarioRowChanged(this, new tbFuncionarioRowChangeEvent(((tbFuncionarioRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbFuncionarioRowChanging != null)) { + this.tbFuncionarioRowChanging(this, new tbFuncionarioRowChangeEvent(((tbFuncionarioRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbFuncionarioRowDeleted != null)) { + this.tbFuncionarioRowDeleted(this, new tbFuncionarioRowChangeEvent(((tbFuncionarioRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbFuncionarioRowDeleting != null)) { + this.tbFuncionarioRowDeleting(this, new tbFuncionarioRowChangeEvent(((tbFuncionarioRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbFuncionarioRow(tbFuncionarioRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbFuncionarioDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbGeneroDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidGenero; + + private global::System.Data.DataColumn columnnomeGenero; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroDataTable() { + this.TableName = "tbGenero"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbGeneroDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbGeneroDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idGeneroColumn { + get { + return this.columnidGenero; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeGeneroColumn { + get { + return this.columnnomeGenero; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow this[int index] { + get { + return ((tbGeneroRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbGeneroRowChangeEventHandler tbGeneroRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbGeneroRowChangeEventHandler tbGeneroRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbGeneroRowChangeEventHandler tbGeneroRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbGeneroRowChangeEventHandler tbGeneroRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbGeneroRow(tbGeneroRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow AddtbGeneroRow(int idGenero, string nomeGenero) { + tbGeneroRow rowtbGeneroRow = ((tbGeneroRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idGenero, + nomeGenero}; + rowtbGeneroRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbGeneroRow); + return rowtbGeneroRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow FindByidGenero(int idGenero) { + return ((tbGeneroRow)(this.Rows.Find(new object[] { + idGenero}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbGeneroDataTable cln = ((tbGeneroDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbGeneroDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidGenero = base.Columns["idGenero"]; + this.columnnomeGenero = base.Columns["nomeGenero"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidGenero = new global::System.Data.DataColumn("idGenero", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidGenero); + this.columnnomeGenero = new global::System.Data.DataColumn("nomeGenero", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeGenero); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidGenero}, true)); + this.columnidGenero.AllowDBNull = false; + this.columnidGenero.Unique = true; + this.columnnomeGenero.MaxLength = 30; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow NewtbGeneroRow() { + return ((tbGeneroRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbGeneroRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbGeneroRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbGeneroRowChanged != null)) { + this.tbGeneroRowChanged(this, new tbGeneroRowChangeEvent(((tbGeneroRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbGeneroRowChanging != null)) { + this.tbGeneroRowChanging(this, new tbGeneroRowChangeEvent(((tbGeneroRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbGeneroRowDeleted != null)) { + this.tbGeneroRowDeleted(this, new tbGeneroRowChangeEvent(((tbGeneroRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbGeneroRowDeleting != null)) { + this.tbGeneroRowDeleting(this, new tbGeneroRowChangeEvent(((tbGeneroRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbGeneroRow(tbGeneroRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbGeneroDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbItemDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidItem; + + private global::System.Data.DataColumn columnnomeItem; + + private global::System.Data.DataColumn columnidAutor; + + private global::System.Data.DataColumn columngeneroItem; + + private global::System.Data.DataColumn columneditoraItem; + + private global::System.Data.DataColumn columntipoItem; + + private global::System.Data.DataColumn columnisbnItem; + + private global::System.Data.DataColumn columnstatusItem; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemDataTable() { + this.TableName = "tbItem"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbItemDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbItemDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idItemColumn { + get { + return this.columnidItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeItemColumn { + get { + return this.columnnomeItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idAutorColumn { + get { + return this.columnidAutor; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn generoItemColumn { + get { + return this.columngeneroItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn editoraItemColumn { + get { + return this.columneditoraItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn tipoItemColumn { + get { + return this.columntipoItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn isbnItemColumn { + get { + return this.columnisbnItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn statusItemColumn { + get { + return this.columnstatusItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow this[int index] { + get { + return ((tbItemRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbItemRowChangeEventHandler tbItemRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbItemRowChangeEventHandler tbItemRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbItemRowChangeEventHandler tbItemRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbItemRowChangeEventHandler tbItemRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbItemRow(tbItemRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow AddtbItemRow(int idItem, string nomeItem, tbAutorRow parenttbAutorRowByFK_tbItem_tbAutor, tbGeneroRow parenttbGeneroRowByFK_tbItem_tbGenero, int editoraItem, tbTipoRow parenttbTipoRowByFK_tbItem_tbTipo, string isbnItem, string statusItem) { + tbItemRow rowtbItemRow = ((tbItemRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idItem, + nomeItem, + null, + null, + editoraItem, + null, + isbnItem, + statusItem}; + if ((parenttbAutorRowByFK_tbItem_tbAutor != null)) { + columnValuesArray[2] = parenttbAutorRowByFK_tbItem_tbAutor[0]; + } + if ((parenttbGeneroRowByFK_tbItem_tbGenero != null)) { + columnValuesArray[3] = parenttbGeneroRowByFK_tbItem_tbGenero[0]; + } + if ((parenttbTipoRowByFK_tbItem_tbTipo != null)) { + columnValuesArray[5] = parenttbTipoRowByFK_tbItem_tbTipo[0]; + } + rowtbItemRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbItemRow); + return rowtbItemRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow FindByidItem(int idItem) { + return ((tbItemRow)(this.Rows.Find(new object[] { + idItem}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbItemDataTable cln = ((tbItemDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbItemDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidItem = base.Columns["idItem"]; + this.columnnomeItem = base.Columns["nomeItem"]; + this.columnidAutor = base.Columns["idAutor"]; + this.columngeneroItem = base.Columns["generoItem"]; + this.columneditoraItem = base.Columns["editoraItem"]; + this.columntipoItem = base.Columns["tipoItem"]; + this.columnisbnItem = base.Columns["isbnItem"]; + this.columnstatusItem = base.Columns["statusItem"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidItem = new global::System.Data.DataColumn("idItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidItem); + this.columnnomeItem = new global::System.Data.DataColumn("nomeItem", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeItem); + this.columnidAutor = new global::System.Data.DataColumn("idAutor", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidAutor); + this.columngeneroItem = new global::System.Data.DataColumn("generoItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columngeneroItem); + this.columneditoraItem = new global::System.Data.DataColumn("editoraItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columneditoraItem); + this.columntipoItem = new global::System.Data.DataColumn("tipoItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntipoItem); + this.columnisbnItem = new global::System.Data.DataColumn("isbnItem", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnisbnItem); + this.columnstatusItem = new global::System.Data.DataColumn("statusItem", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnstatusItem); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidItem}, true)); + this.columnidItem.AllowDBNull = false; + this.columnidItem.Unique = true; + this.columnnomeItem.MaxLength = 50; + this.columnisbnItem.MaxLength = 13; + this.columnstatusItem.MaxLength = 10; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow NewtbItemRow() { + return ((tbItemRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbItemRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbItemRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbItemRowChanged != null)) { + this.tbItemRowChanged(this, new tbItemRowChangeEvent(((tbItemRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbItemRowChanging != null)) { + this.tbItemRowChanging(this, new tbItemRowChangeEvent(((tbItemRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbItemRowDeleted != null)) { + this.tbItemRowDeleted(this, new tbItemRowChangeEvent(((tbItemRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbItemRowDeleting != null)) { + this.tbItemRowDeleting(this, new tbItemRowChangeEvent(((tbItemRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbItemRow(tbItemRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbItemDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbTipoDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidTipo; + + private global::System.Data.DataColumn columnnomeTipo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoDataTable() { + this.TableName = "tbTipo"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbTipoDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbTipoDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idTipoColumn { + get { + return this.columnidTipo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeTipoColumn { + get { + return this.columnnomeTipo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow this[int index] { + get { + return ((tbTipoRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbTipoRowChangeEventHandler tbTipoRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbTipoRowChangeEventHandler tbTipoRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbTipoRowChangeEventHandler tbTipoRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbTipoRowChangeEventHandler tbTipoRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbTipoRow(tbTipoRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow AddtbTipoRow(int idTipo, string nomeTipo) { + tbTipoRow rowtbTipoRow = ((tbTipoRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idTipo, + nomeTipo}; + rowtbTipoRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbTipoRow); + return rowtbTipoRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow FindByidTipo(int idTipo) { + return ((tbTipoRow)(this.Rows.Find(new object[] { + idTipo}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbTipoDataTable cln = ((tbTipoDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbTipoDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidTipo = base.Columns["idTipo"]; + this.columnnomeTipo = base.Columns["nomeTipo"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidTipo = new global::System.Data.DataColumn("idTipo", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidTipo); + this.columnnomeTipo = new global::System.Data.DataColumn("nomeTipo", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeTipo); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidTipo}, true)); + this.columnidTipo.AllowDBNull = false; + this.columnidTipo.Unique = true; + this.columnnomeTipo.MaxLength = 30; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow NewtbTipoRow() { + return ((tbTipoRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbTipoRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbTipoRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbTipoRowChanged != null)) { + this.tbTipoRowChanged(this, new tbTipoRowChangeEvent(((tbTipoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbTipoRowChanging != null)) { + this.tbTipoRowChanging(this, new tbTipoRowChangeEvent(((tbTipoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbTipoRowDeleted != null)) { + this.tbTipoRowDeleted(this, new tbTipoRowChangeEvent(((tbTipoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbTipoRowDeleting != null)) { + this.tbTipoRowDeleting(this, new tbTipoRowChangeEvent(((tbTipoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbTipoRow(tbTipoRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbTipoDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tbAutorDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidAutor; + + private global::System.Data.DataColumn columnnomeAutor; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorDataTable() { + this.TableName = "tbAutor"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbAutorDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected tbAutorDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn idAutorColumn { + get { + return this.columnidAutor; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn nomeAutorColumn { + get { + return this.columnnomeAutor; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow this[int index] { + get { + return ((tbAutorRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbAutorRowChangeEventHandler tbAutorRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbAutorRowChangeEventHandler tbAutorRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbAutorRowChangeEventHandler tbAutorRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event tbAutorRowChangeEventHandler tbAutorRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddtbAutorRow(tbAutorRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow AddtbAutorRow(string nomeAutor) { + tbAutorRow rowtbAutorRow = ((tbAutorRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + nomeAutor}; + rowtbAutorRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtbAutorRow); + return rowtbAutorRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow FindByidAutor(int idAutor) { + return ((tbAutorRow)(this.Rows.Find(new object[] { + idAutor}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + tbAutorDataTable cln = ((tbAutorDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new tbAutorDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnidAutor = base.Columns["idAutor"]; + this.columnnomeAutor = base.Columns["nomeAutor"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnidAutor = new global::System.Data.DataColumn("idAutor", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidAutor); + this.columnnomeAutor = new global::System.Data.DataColumn("nomeAutor", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnomeAutor); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidAutor}, true)); + this.columnidAutor.AutoIncrement = true; + this.columnidAutor.AutoIncrementSeed = -1; + this.columnidAutor.AutoIncrementStep = -1; + this.columnidAutor.AllowDBNull = false; + this.columnidAutor.ReadOnly = true; + this.columnidAutor.Unique = true; + this.columnnomeAutor.MaxLength = 200; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow NewtbAutorRow() { + return ((tbAutorRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new tbAutorRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(tbAutorRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.tbAutorRowChanged != null)) { + this.tbAutorRowChanged(this, new tbAutorRowChangeEvent(((tbAutorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.tbAutorRowChanging != null)) { + this.tbAutorRowChanging(this, new tbAutorRowChangeEvent(((tbAutorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.tbAutorRowDeleted != null)) { + this.tbAutorRowDeleted(this, new tbAutorRowChangeEvent(((tbAutorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.tbAutorRowDeleting != null)) { + this.tbAutorRowDeleting(this, new tbAutorRowChangeEvent(((tbAutorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovetbAutorRow(tbAutorRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + tbTrabalhoDataSet ds = new tbTrabalhoDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "tbAutorDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbClienteRow : global::System.Data.DataRow { + + private tbClienteDataTable tabletbCliente; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbClienteRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbCliente = ((tbClienteDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idCliente { + get { + return ((int)(this[this.tabletbCliente.idClienteColumn])); + } + set { + this[this.tabletbCliente.idClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeCliente { + get { + try { + return ((string)(this[this.tabletbCliente.nomeClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.nomeClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string rgCliente { + get { + try { + return ((string)(this[this.tabletbCliente.rgClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'rgCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.rgClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string cpfCliente { + get { + try { + return ((string)(this[this.tabletbCliente.cpfClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'cpfCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.cpfClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string telCliente { + get { + try { + return ((string)(this[this.tabletbCliente.telClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'telCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.telClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string celCliente { + get { + try { + return ((string)(this[this.tabletbCliente.celClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'celCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.celClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ruaCliente { + get { + try { + return ((string)(this[this.tabletbCliente.ruaClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'ruaCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.ruaClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string numeroCliente { + get { + try { + return ((string)(this[this.tabletbCliente.numeroClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'numeroCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.numeroClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string cidadeCliente { + get { + try { + return ((string)(this[this.tabletbCliente.cidadeClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'cidadeCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.cidadeClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string statusCliente { + get { + try { + return ((string)(this[this.tabletbCliente.statusClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'statusCliente\' na tabela \'tbCliente\' é DBNull.", e); + } + } + set { + this[this.tabletbCliente.statusClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeClienteNull() { + return this.IsNull(this.tabletbCliente.nomeClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeClienteNull() { + this[this.tabletbCliente.nomeClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsrgClienteNull() { + return this.IsNull(this.tabletbCliente.rgClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetrgClienteNull() { + this[this.tabletbCliente.rgClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscpfClienteNull() { + return this.IsNull(this.tabletbCliente.cpfClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcpfClienteNull() { + this[this.tabletbCliente.cpfClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IstelClienteNull() { + return this.IsNull(this.tabletbCliente.telClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SettelClienteNull() { + this[this.tabletbCliente.telClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscelClienteNull() { + return this.IsNull(this.tabletbCliente.celClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcelClienteNull() { + this[this.tabletbCliente.celClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsruaClienteNull() { + return this.IsNull(this.tabletbCliente.ruaClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetruaClienteNull() { + this[this.tabletbCliente.ruaClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnumeroClienteNull() { + return this.IsNull(this.tabletbCliente.numeroClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnumeroClienteNull() { + this[this.tabletbCliente.numeroClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscidadeClienteNull() { + return this.IsNull(this.tabletbCliente.cidadeClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcidadeClienteNull() { + this[this.tabletbCliente.cidadeClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsstatusClienteNull() { + return this.IsNull(this.tabletbCliente.statusClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetstatusClienteNull() { + this[this.tabletbCliente.statusClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow[] GettbEmprestimoRows() { + if ((this.Table.ChildRelations["FK_tbEmprestimo_tbCliente"] == null)) { + return new tbEmprestimoRow[0]; + } + else { + return ((tbEmprestimoRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbEmprestimo_tbCliente"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbEditoraRow : global::System.Data.DataRow { + + private tbEditoraDataTable tabletbEditora; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbEditoraRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbEditora = ((tbEditoraDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idEditora { + get { + return ((int)(this[this.tabletbEditora.idEditoraColumn])); + } + set { + this[this.tabletbEditora.idEditoraColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeEditora { + get { + try { + return ((string)(this[this.tabletbEditora.nomeEditoraColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeEditora\' na tabela \'tbEditora\' é DBNull.", e); + } + } + set { + this[this.tabletbEditora.nomeEditoraColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeEditoraNull() { + return this.IsNull(this.tabletbEditora.nomeEditoraColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeEditoraNull() { + this[this.tabletbEditora.nomeEditoraColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbEmprestimoRow : global::System.Data.DataRow { + + private tbEmprestimoDataTable tabletbEmprestimo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbEmprestimoRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbEmprestimo = ((tbEmprestimoDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idEmprestimo { + get { + return ((int)(this[this.tabletbEmprestimo.idEmprestimoColumn])); + } + set { + this[this.tabletbEmprestimo.idEmprestimoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idFunc { + get { + try { + return ((int)(this[this.tabletbEmprestimo.idFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'idFunc\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.idFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idCliente { + get { + try { + return ((int)(this[this.tabletbEmprestimo.idClienteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'idCliente\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.idClienteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idItem { + get { + try { + return ((int)(this[this.tabletbEmprestimo.idItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'idItem\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.idItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime dataEmprestimo { + get { + try { + return ((global::System.DateTime)(this[this.tabletbEmprestimo.dataEmprestimoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'dataEmprestimo\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.dataEmprestimoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime dataDevolucao { + get { + try { + return ((global::System.DateTime)(this[this.tabletbEmprestimo.dataDevolucaoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'dataDevolucao\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.dataDevolucaoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string statusEmprestimo { + get { + try { + return ((string)(this[this.tabletbEmprestimo.statusEmprestimoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'statusEmprestimo\' na tabela \'tbEmprestimo\' é DBNull.", e); + } + } + set { + this[this.tabletbEmprestimo.statusEmprestimoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow tbClienteRow { + get { + return ((tbClienteRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbEmprestimo_tbCliente"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbEmprestimo_tbCliente"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow tbFuncionarioRow { + get { + return ((tbFuncionarioRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbEmprestimo_tbFuncionario"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbEmprestimo_tbFuncionario"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow tbItemRow { + get { + return ((tbItemRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbEmprestimo_tbItem"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbEmprestimo_tbItem"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsidFuncNull() { + return this.IsNull(this.tabletbEmprestimo.idFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetidFuncNull() { + this[this.tabletbEmprestimo.idFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsidClienteNull() { + return this.IsNull(this.tabletbEmprestimo.idClienteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetidClienteNull() { + this[this.tabletbEmprestimo.idClienteColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsidItemNull() { + return this.IsNull(this.tabletbEmprestimo.idItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetidItemNull() { + this[this.tabletbEmprestimo.idItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsdataEmprestimoNull() { + return this.IsNull(this.tabletbEmprestimo.dataEmprestimoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetdataEmprestimoNull() { + this[this.tabletbEmprestimo.dataEmprestimoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsdataDevolucaoNull() { + return this.IsNull(this.tabletbEmprestimo.dataDevolucaoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetdataDevolucaoNull() { + this[this.tabletbEmprestimo.dataDevolucaoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsstatusEmprestimoNull() { + return this.IsNull(this.tabletbEmprestimo.statusEmprestimoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetstatusEmprestimoNull() { + this[this.tabletbEmprestimo.statusEmprestimoColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbFuncionarioRow : global::System.Data.DataRow { + + private tbFuncionarioDataTable tabletbFuncionario; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbFuncionarioRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbFuncionario = ((tbFuncionarioDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idFunc { + get { + return ((int)(this[this.tabletbFuncionario.idFuncColumn])); + } + set { + this[this.tabletbFuncionario.idFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.nomeFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.nomeFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string rgFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.rgFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'rgFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.rgFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string cpfFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.cpfFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'cpfFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.cpfFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string telFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.telFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'telFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.telFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string celFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.celFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'celFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.celFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ruaFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.ruaFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'ruaFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.ruaFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string numeroFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.numeroFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'numeroFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.numeroFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string cidadeFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.cidadeFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'cidadeFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.cidadeFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string statusFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.statusFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'statusFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.statusFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string usuarioFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.usuarioFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'usuarioFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.usuarioFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string senhaFunc { + get { + try { + return ((string)(this[this.tabletbFuncionario.senhaFuncColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'senhaFunc\' na tabela \'tbFuncionario\' é DBNull.", e); + } + } + set { + this[this.tabletbFuncionario.senhaFuncColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeFuncNull() { + return this.IsNull(this.tabletbFuncionario.nomeFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeFuncNull() { + this[this.tabletbFuncionario.nomeFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsrgFuncNull() { + return this.IsNull(this.tabletbFuncionario.rgFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetrgFuncNull() { + this[this.tabletbFuncionario.rgFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscpfFuncNull() { + return this.IsNull(this.tabletbFuncionario.cpfFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcpfFuncNull() { + this[this.tabletbFuncionario.cpfFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IstelFuncNull() { + return this.IsNull(this.tabletbFuncionario.telFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SettelFuncNull() { + this[this.tabletbFuncionario.telFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscelFuncNull() { + return this.IsNull(this.tabletbFuncionario.celFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcelFuncNull() { + this[this.tabletbFuncionario.celFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsruaFuncNull() { + return this.IsNull(this.tabletbFuncionario.ruaFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetruaFuncNull() { + this[this.tabletbFuncionario.ruaFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnumeroFuncNull() { + return this.IsNull(this.tabletbFuncionario.numeroFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnumeroFuncNull() { + this[this.tabletbFuncionario.numeroFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IscidadeFuncNull() { + return this.IsNull(this.tabletbFuncionario.cidadeFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetcidadeFuncNull() { + this[this.tabletbFuncionario.cidadeFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsstatusFuncNull() { + return this.IsNull(this.tabletbFuncionario.statusFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetstatusFuncNull() { + this[this.tabletbFuncionario.statusFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsusuarioFuncNull() { + return this.IsNull(this.tabletbFuncionario.usuarioFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetusuarioFuncNull() { + this[this.tabletbFuncionario.usuarioFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IssenhaFuncNull() { + return this.IsNull(this.tabletbFuncionario.senhaFuncColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetsenhaFuncNull() { + this[this.tabletbFuncionario.senhaFuncColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow[] GettbEmprestimoRows() { + if ((this.Table.ChildRelations["FK_tbEmprestimo_tbFuncionario"] == null)) { + return new tbEmprestimoRow[0]; + } + else { + return ((tbEmprestimoRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbEmprestimo_tbFuncionario"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbGeneroRow : global::System.Data.DataRow { + + private tbGeneroDataTable tabletbGenero; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbGeneroRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbGenero = ((tbGeneroDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idGenero { + get { + return ((int)(this[this.tabletbGenero.idGeneroColumn])); + } + set { + this[this.tabletbGenero.idGeneroColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeGenero { + get { + try { + return ((string)(this[this.tabletbGenero.nomeGeneroColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeGenero\' na tabela \'tbGenero\' é DBNull.", e); + } + } + set { + this[this.tabletbGenero.nomeGeneroColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeGeneroNull() { + return this.IsNull(this.tabletbGenero.nomeGeneroColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeGeneroNull() { + this[this.tabletbGenero.nomeGeneroColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow[] GettbItemRows() { + if ((this.Table.ChildRelations["FK_tbItem_tbGenero"] == null)) { + return new tbItemRow[0]; + } + else { + return ((tbItemRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbItem_tbGenero"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbItemRow : global::System.Data.DataRow { + + private tbItemDataTable tabletbItem; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbItemRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbItem = ((tbItemDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idItem { + get { + return ((int)(this[this.tabletbItem.idItemColumn])); + } + set { + this[this.tabletbItem.idItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeItem { + get { + try { + return ((string)(this[this.tabletbItem.nomeItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.nomeItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idAutor { + get { + try { + return ((int)(this[this.tabletbItem.idAutorColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'idAutor\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.idAutorColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int generoItem { + get { + try { + return ((int)(this[this.tabletbItem.generoItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'generoItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.generoItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int editoraItem { + get { + try { + return ((int)(this[this.tabletbItem.editoraItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'editoraItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.editoraItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int tipoItem { + get { + try { + return ((int)(this[this.tabletbItem.tipoItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'tipoItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.tipoItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string isbnItem { + get { + try { + return ((string)(this[this.tabletbItem.isbnItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'isbnItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.isbnItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string statusItem { + get { + try { + return ((string)(this[this.tabletbItem.statusItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'statusItem\' na tabela \'tbItem\' é DBNull.", e); + } + } + set { + this[this.tabletbItem.statusItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow tbGeneroRow { + get { + return ((tbGeneroRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbItem_tbGenero"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbItem_tbGenero"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow tbTipoRow { + get { + return ((tbTipoRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbItem_tbTipo"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbItem_tbTipo"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow tbAutorRow { + get { + return ((tbAutorRow)(this.GetParentRow(this.Table.ParentRelations["FK_tbItem_tbAutor"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_tbItem_tbAutor"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeItemNull() { + return this.IsNull(this.tabletbItem.nomeItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeItemNull() { + this[this.tabletbItem.nomeItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsidAutorNull() { + return this.IsNull(this.tabletbItem.idAutorColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetidAutorNull() { + this[this.tabletbItem.idAutorColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsgeneroItemNull() { + return this.IsNull(this.tabletbItem.generoItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetgeneroItemNull() { + this[this.tabletbItem.generoItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IseditoraItemNull() { + return this.IsNull(this.tabletbItem.editoraItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SeteditoraItemNull() { + this[this.tabletbItem.editoraItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IstipoItemNull() { + return this.IsNull(this.tabletbItem.tipoItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SettipoItemNull() { + this[this.tabletbItem.tipoItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsisbnItemNull() { + return this.IsNull(this.tabletbItem.isbnItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetisbnItemNull() { + this[this.tabletbItem.isbnItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsstatusItemNull() { + return this.IsNull(this.tabletbItem.statusItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetstatusItemNull() { + this[this.tabletbItem.statusItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow[] GettbEmprestimoRows() { + if ((this.Table.ChildRelations["FK_tbEmprestimo_tbItem"] == null)) { + return new tbEmprestimoRow[0]; + } + else { + return ((tbEmprestimoRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbEmprestimo_tbItem"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbTipoRow : global::System.Data.DataRow { + + private tbTipoDataTable tabletbTipo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbTipoRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbTipo = ((tbTipoDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idTipo { + get { + return ((int)(this[this.tabletbTipo.idTipoColumn])); + } + set { + this[this.tabletbTipo.idTipoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeTipo { + get { + try { + return ((string)(this[this.tabletbTipo.nomeTipoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeTipo\' na tabela \'tbTipo\' é DBNull.", e); + } + } + set { + this[this.tabletbTipo.nomeTipoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeTipoNull() { + return this.IsNull(this.tabletbTipo.nomeTipoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeTipoNull() { + this[this.tabletbTipo.nomeTipoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow[] GettbItemRows() { + if ((this.Table.ChildRelations["FK_tbItem_tbTipo"] == null)) { + return new tbItemRow[0]; + } + else { + return ((tbItemRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbItem_tbTipo"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class tbAutorRow : global::System.Data.DataRow { + + private tbAutorDataTable tabletbAutor; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal tbAutorRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletbAutor = ((tbAutorDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int idAutor { + get { + return ((int)(this[this.tabletbAutor.idAutorColumn])); + } + set { + this[this.tabletbAutor.idAutorColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string nomeAutor { + get { + try { + return ((string)(this[this.tabletbAutor.nomeAutorColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("O valor da coluna \'nomeAutor\' na tabela \'tbAutor\' é DBNull.", e); + } + } + set { + this[this.tabletbAutor.nomeAutorColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsnomeAutorNull() { + return this.IsNull(this.tabletbAutor.nomeAutorColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetnomeAutorNull() { + this[this.tabletbAutor.nomeAutorColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow[] GettbItemRows() { + if ((this.Table.ChildRelations["FK_tbItem_tbAutor"] == null)) { + return new tbItemRow[0]; + } + else { + return ((tbItemRow[])(base.GetChildRows(this.Table.ChildRelations["FK_tbItem_tbAutor"]))); + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbClienteRowChangeEvent : global::System.EventArgs { + + private tbClienteRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRowChangeEvent(tbClienteRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbEditoraRowChangeEvent : global::System.EventArgs { + + private tbEditoraRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRowChangeEvent(tbEditoraRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbEmprestimoRowChangeEvent : global::System.EventArgs { + + private tbEmprestimoRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRowChangeEvent(tbEmprestimoRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbFuncionarioRowChangeEvent : global::System.EventArgs { + + private tbFuncionarioRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRowChangeEvent(tbFuncionarioRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbGeneroRowChangeEvent : global::System.EventArgs { + + private tbGeneroRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRowChangeEvent(tbGeneroRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbItemRowChangeEvent : global::System.EventArgs { + + private tbItemRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRowChangeEvent(tbItemRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbTipoRowChangeEvent : global::System.EventArgs { + + private tbTipoRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRowChangeEvent(tbTipoRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class tbAutorRowChangeEvent : global::System.EventArgs { + + private tbAutorRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRowChangeEvent(tbAutorRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} +namespace CSharpLibrary.tbTrabalhoDataSetTableAdapters { + + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbClienteTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbClienteTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbCliente"; + tableMapping.ColumnMappings.Add("idCliente", "idCliente"); + tableMapping.ColumnMappings.Add("nomeCliente", "nomeCliente"); + tableMapping.ColumnMappings.Add("rgCliente", "rgCliente"); + tableMapping.ColumnMappings.Add("cpfCliente", "cpfCliente"); + tableMapping.ColumnMappings.Add("telCliente", "telCliente"); + tableMapping.ColumnMappings.Add("celCliente", "celCliente"); + tableMapping.ColumnMappings.Add("ruaCliente", "ruaCliente"); + tableMapping.ColumnMappings.Add("numeroCliente", "numeroCliente"); + tableMapping.ColumnMappings.Add("cidadeCliente", "cidadeCliente"); + tableMapping.ColumnMappings.Add("statusCliente", "statusCliente"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.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)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_rgCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rgCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cpfCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cpfCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_telCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_telCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_celCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_celCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ruaCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ruaCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_numeroCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_numeroCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cidadeCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cidadeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.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)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rgCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cpfCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@telCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@celCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ruaCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numeroCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cidadeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rgCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cpfCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@telCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@celCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ruaCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numeroCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cidadeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_rgCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rgCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cpfCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cpfCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_telCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_telCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_celCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_celCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ruaCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ruaCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_numeroCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_numeroCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cidadeCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cidadeCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusCliente", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, rua" + + "Cliente, numeroCliente, cidadeCliente, statusCliente FROM dbo.tbCliente"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbClienteDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbClienteDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbClienteDataTable dataTable = new tbTrabalhoDataSet.tbClienteDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbClienteDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbCliente"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idCliente, string Original_nomeCliente, string Original_rgCliente, string Original_cpfCliente, string Original_telCliente, string Original_celCliente, string Original_ruaCliente, string Original_numeroCliente, string Original_cidadeCliente, string Original_statusCliente) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idCliente)); + if ((Original_nomeCliente == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeCliente)); + } + if ((Original_rgCliente == null)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_rgCliente)); + } + if ((Original_cpfCliente == null)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_cpfCliente)); + } + if ((Original_telCliente == null)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_telCliente)); + } + if ((Original_celCliente == null)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_celCliente)); + } + if ((Original_ruaCliente == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_ruaCliente)); + } + if ((Original_numeroCliente == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_numeroCliente)); + } + if ((Original_cidadeCliente == null)) { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_cidadeCliente)); + } + if ((Original_statusCliente == null)) { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_statusCliente)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idCliente, string nomeCliente, string rgCliente, string cpfCliente, string telCliente, string celCliente, string ruaCliente, string numeroCliente, string cidadeCliente, string statusCliente) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idCliente)); + if ((nomeCliente == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeCliente)); + } + if ((rgCliente == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(rgCliente)); + } + if ((cpfCliente == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(cpfCliente)); + } + if ((telCliente == null)) { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(telCliente)); + } + if ((celCliente == null)) { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(celCliente)); + } + if ((ruaCliente == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(ruaCliente)); + } + if ((numeroCliente == null)) { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = ((string)(numeroCliente)); + } + if ((cidadeCliente == null)) { + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = ((string)(cidadeCliente)); + } + if ((statusCliente == null)) { + this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[9].Value = ((string)(statusCliente)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int idCliente, + string nomeCliente, + string rgCliente, + string cpfCliente, + string telCliente, + string celCliente, + string ruaCliente, + string numeroCliente, + string cidadeCliente, + string statusCliente, + int Original_idCliente, + string Original_nomeCliente, + string Original_rgCliente, + string Original_cpfCliente, + string Original_telCliente, + string Original_celCliente, + string Original_ruaCliente, + string Original_numeroCliente, + string Original_cidadeCliente, + string Original_statusCliente) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idCliente)); + if ((nomeCliente == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeCliente)); + } + if ((rgCliente == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(rgCliente)); + } + if ((cpfCliente == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(cpfCliente)); + } + if ((telCliente == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(telCliente)); + } + if ((celCliente == null)) { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(celCliente)); + } + if ((ruaCliente == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(ruaCliente)); + } + if ((numeroCliente == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(numeroCliente)); + } + if ((cidadeCliente == null)) { + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(cidadeCliente)); + } + if ((statusCliente == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(statusCliente)); + } + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_idCliente)); + if ((Original_nomeCliente == null)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_nomeCliente)); + } + if ((Original_rgCliente == null)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_rgCliente)); + } + if ((Original_cpfCliente == null)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_cpfCliente)); + } + if ((Original_telCliente == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_telCliente)); + } + if ((Original_celCliente == null)) { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_celCliente)); + } + if ((Original_ruaCliente == null)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_ruaCliente)); + } + if ((Original_numeroCliente == null)) { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_numeroCliente)); + } + if ((Original_cidadeCliente == null)) { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_cidadeCliente)); + } + if ((Original_statusCliente == null)) { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[28].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_statusCliente)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + string nomeCliente, + string rgCliente, + string cpfCliente, + string telCliente, + string celCliente, + string ruaCliente, + string numeroCliente, + string cidadeCliente, + string statusCliente, + int Original_idCliente, + string Original_nomeCliente, + string Original_rgCliente, + string Original_cpfCliente, + string Original_telCliente, + string Original_celCliente, + string Original_ruaCliente, + string Original_numeroCliente, + string Original_cidadeCliente, + string Original_statusCliente) { + return this.Update(Original_idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, ruaCliente, numeroCliente, cidadeCliente, statusCliente, Original_idCliente, Original_nomeCliente, Original_rgCliente, Original_cpfCliente, Original_telCliente, Original_celCliente, Original_ruaCliente, Original_numeroCliente, Original_cidadeCliente, Original_statusCliente); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbEditoraTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEditoraTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbEditora"; + tableMapping.ColumnMappings.Add("idEditora", "idEditora"); + tableMapping.ColumnMappings.Add("nomeEditora", "nomeEditora"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tbEditora] WHERE (([idEditora] = @Original_idEditora) AND ((@I" + + "sNull_nomeEditora = 1 AND [nomeEditora] IS NULL) OR ([nomeEditora] = @Original_n" + + "omeEditora)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEditora", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeEditora", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tbEditora] ([idEditora], [nomeEditora]) VALUES (@idEditora, @n" + + "omeEditora);\r\nSELECT idEditora, nomeEditora FROM tbEditora WHERE (idEditora = @i" + + "dEditora)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEditora", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeEditora", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEditora", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeEditora", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEditora", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeEditora", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeEditora", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeEditora", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idEditora, nomeEditora FROM dbo.tbEditora"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbEditoraDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbEditoraDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbEditoraDataTable dataTable = new tbTrabalhoDataSet.tbEditoraDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbEditoraDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbEditora"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idEditora, string Original_nomeEditora) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idEditora)); + if ((Original_nomeEditora == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeEditora)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idEditora, string nomeEditora) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idEditora)); + if ((nomeEditora == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeEditora)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int idEditora, string nomeEditora, int Original_idEditora, string Original_nomeEditora) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idEditora)); + if ((nomeEditora == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeEditora)); + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_idEditora)); + if ((Original_nomeEditora == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_nomeEditora)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeEditora, int Original_idEditora, string Original_nomeEditora) { + return this.Update(Original_idEditora, nomeEditora, Original_idEditora, Original_nomeEditora); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbEmprestimoTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbEmprestimoTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbEmprestimo"; + tableMapping.ColumnMappings.Add("idEmprestimo", "idEmprestimo"); + tableMapping.ColumnMappings.Add("idFunc", "idFunc"); + tableMapping.ColumnMappings.Add("idCliente", "idCliente"); + tableMapping.ColumnMappings.Add("idItem", "idItem"); + tableMapping.ColumnMappings.Add("dataEmprestimo", "dataEmprestimo"); + tableMapping.ColumnMappings.Add("dataDevolucao", "dataDevolucao"); + tableMapping.ColumnMappings.Add("statusEmprestimo", "statusEmprestimo"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.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)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataEmprestimo", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataDevolucao", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataDevolucao", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusEmprestimo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.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)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataEmprestimo", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataDevolucao", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusEmprestimo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataEmprestimo", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataDevolucao", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusEmprestimo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idCliente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idCliente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataEmprestimo", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataDevolucao", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataDevolucao", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataDevolucao", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusEmprestimo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusEmprestimo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusEmprestimo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, st" + + "atusEmprestimo FROM dbo.tbEmprestimo"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbEmprestimoDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbEmprestimoDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbEmprestimoDataTable dataTable = new tbTrabalhoDataSet.tbEmprestimoDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbEmprestimoDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbEmprestimo"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idEmprestimo, global::System.Nullable Original_idFunc, global::System.Nullable Original_idCliente, global::System.Nullable Original_idItem, global::System.Nullable Original_dataEmprestimo, global::System.Nullable Original_dataDevolucao, string Original_statusEmprestimo) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idEmprestimo)); + if ((Original_idFunc.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_idFunc.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_idCliente.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_idCliente.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_idItem.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_idItem.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_dataEmprestimo.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_dataEmprestimo.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_dataDevolucao.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_dataDevolucao.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_statusEmprestimo == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_statusEmprestimo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idEmprestimo, global::System.Nullable idFunc, global::System.Nullable idCliente, global::System.Nullable idItem, global::System.Nullable dataEmprestimo, global::System.Nullable dataDevolucao, string statusEmprestimo) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idEmprestimo)); + if ((idFunc.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(idFunc.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((idCliente.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(idCliente.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((idItem.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(idItem.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((dataEmprestimo.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(dataEmprestimo.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((dataDevolucao.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(dataDevolucao.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((statusEmprestimo == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(statusEmprestimo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int idEmprestimo, global::System.Nullable idFunc, global::System.Nullable idCliente, global::System.Nullable idItem, global::System.Nullable dataEmprestimo, global::System.Nullable dataDevolucao, string statusEmprestimo, int Original_idEmprestimo, global::System.Nullable Original_idFunc, global::System.Nullable Original_idCliente, global::System.Nullable Original_idItem, global::System.Nullable Original_dataEmprestimo, global::System.Nullable Original_dataDevolucao, string Original_statusEmprestimo) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idEmprestimo)); + if ((idFunc.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(idFunc.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((idCliente.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(idCliente.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((idItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(idItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((dataEmprestimo.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(dataEmprestimo.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((dataDevolucao.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(dataDevolucao.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((statusEmprestimo == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(statusEmprestimo)); + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_idEmprestimo)); + if ((Original_idFunc.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_idFunc.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_idCliente.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_idCliente.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_idItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_idItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_dataEmprestimo.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_dataEmprestimo.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_dataDevolucao.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((System.DateTime)(Original_dataDevolucao.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + if ((Original_statusEmprestimo == null)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_statusEmprestimo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(global::System.Nullable idFunc, global::System.Nullable idCliente, global::System.Nullable idItem, global::System.Nullable dataEmprestimo, global::System.Nullable dataDevolucao, string statusEmprestimo, int Original_idEmprestimo, global::System.Nullable Original_idFunc, global::System.Nullable Original_idCliente, global::System.Nullable Original_idItem, global::System.Nullable Original_dataEmprestimo, global::System.Nullable Original_dataDevolucao, string Original_statusEmprestimo) { + return this.Update(Original_idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo, Original_idEmprestimo, Original_idFunc, Original_idCliente, Original_idItem, Original_dataEmprestimo, Original_dataDevolucao, Original_statusEmprestimo); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbFuncionarioTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbFuncionarioTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbFuncionario"; + tableMapping.ColumnMappings.Add("idFunc", "idFunc"); + tableMapping.ColumnMappings.Add("nomeFunc", "nomeFunc"); + tableMapping.ColumnMappings.Add("rgFunc", "rgFunc"); + tableMapping.ColumnMappings.Add("cpfFunc", "cpfFunc"); + tableMapping.ColumnMappings.Add("telFunc", "telFunc"); + tableMapping.ColumnMappings.Add("celFunc", "celFunc"); + tableMapping.ColumnMappings.Add("ruaFunc", "ruaFunc"); + tableMapping.ColumnMappings.Add("numeroFunc", "numeroFunc"); + tableMapping.ColumnMappings.Add("cidadeFunc", "cidadeFunc"); + tableMapping.ColumnMappings.Add("statusFunc", "statusFunc"); + tableMapping.ColumnMappings.Add("usuarioFunc", "usuarioFunc"); + tableMapping.ColumnMappings.Add("senhaFunc", "senhaFunc"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.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)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_rgFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rgFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cpfFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cpfFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_telFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_telFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_celFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_celFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ruaFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ruaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_numeroFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_numeroFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cidadeFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cidadeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_usuarioFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_usuarioFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_senhaFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_senhaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.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)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rgFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cpfFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@telFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@celFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ruaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numeroFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cidadeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@usuarioFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@senhaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[tbFuncionario] SET [idFunc] = @idFunc, [nomeFunc] = @nomeFunc, [rgF" + + "unc] = @rgFunc, [cpfFunc] = @cpfFunc, [telFunc] = @telFunc, [celFunc] = @celFunc" + + ", [ruaFunc] = @ruaFunc, [numeroFunc] = @numeroFunc, [cidadeFunc] = @cidadeFunc, " + + "[statusFunc] = @statusFunc, [usuarioFunc] = @usuarioFunc, [senhaFunc] = @senhaFu" + + "nc WHERE (([idFunc] = @Original_idFunc) AND ((@IsNull_nomeFunc = 1 AND [nomeFunc" + + "] IS NULL) OR ([nomeFunc] = @Original_nomeFunc)) AND ((@IsNull_rgFunc = 1 AND [r" + + "gFunc] 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_celFun" + + "c = 1 AND [celFunc] IS NULL) OR ([celFunc] = @Original_celFunc)) AND ((@IsNull_r" + + "uaFunc = 1 AND [ruaFunc] IS NULL) OR ([ruaFunc] = @Original_ruaFunc)) AND ((@IsN" + + "ull_numeroFunc = 1 AND [numeroFunc] IS NULL) OR ([numeroFunc] = @Original_numero" + + "Func)) AND ((@IsNull_cidadeFunc = 1 AND [cidadeFunc] IS NULL) OR ([cidadeFunc] =" + + " @Original_cidadeFunc)) AND ((@IsNull_statusFunc = 1 AND [statusFunc] IS NULL) O" + + "R ([statusFunc] = @Original_statusFunc)) AND ((@IsNull_usuarioFunc = 1 AND [usua" + + "rioFunc] IS NULL) OR ([usuarioFunc] = @Original_usuarioFunc)) AND ((@IsNull_senh" + + "aFunc = 1 AND [senhaFunc] IS NULL) OR ([senhaFunc] = @Original_senhaFunc)));\r\nSE" + + "LECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, c" + + "idadeFunc, statusFunc, usuarioFunc, senhaFunc FROM tbFuncionario WHERE (idFunc =" + + " @idFunc)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rgFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cpfFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@telFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@celFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ruaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numeroFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cidadeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@usuarioFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@senhaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_rgFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rgFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rgFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cpfFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cpfFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cpfFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_telFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_telFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "telFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_celFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_celFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "celFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ruaFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ruaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ruaFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_numeroFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_numeroFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numeroFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_cidadeFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cidadeFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cidadeFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_usuarioFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_usuarioFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "usuarioFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_senhaFunc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_senhaFunc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "senhaFunc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, " + + "cidadeFunc, statusFunc, usuarioFunc, senhaFunc FROM dbo.tbFuncionario"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbFuncionarioDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbFuncionarioDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbFuncionarioDataTable dataTable = new tbTrabalhoDataSet.tbFuncionarioDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbFuncionarioDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbFuncionario"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idFunc, string Original_nomeFunc, string Original_rgFunc, string Original_cpfFunc, string Original_telFunc, string Original_celFunc, string Original_ruaFunc, string Original_numeroFunc, string Original_cidadeFunc, string Original_statusFunc, string Original_usuarioFunc, string Original_senhaFunc) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idFunc)); + if ((Original_nomeFunc == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeFunc)); + } + if ((Original_rgFunc == null)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_rgFunc)); + } + if ((Original_cpfFunc == null)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_cpfFunc)); + } + if ((Original_telFunc == null)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_telFunc)); + } + if ((Original_celFunc == null)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_celFunc)); + } + if ((Original_ruaFunc == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_ruaFunc)); + } + if ((Original_numeroFunc == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_numeroFunc)); + } + if ((Original_cidadeFunc == null)) { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_cidadeFunc)); + } + if ((Original_statusFunc == null)) { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_statusFunc)); + } + if ((Original_usuarioFunc == null)) { + this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(Original_usuarioFunc)); + } + if ((Original_senhaFunc == null)) { + this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[22].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[22].Value = ((string)(Original_senhaFunc)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idFunc, string nomeFunc, string rgFunc, string cpfFunc, string telFunc, string celFunc, string ruaFunc, string numeroFunc, string cidadeFunc, string statusFunc, string usuarioFunc, string senhaFunc) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idFunc)); + if ((nomeFunc == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeFunc)); + } + if ((rgFunc == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(rgFunc)); + } + if ((cpfFunc == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(cpfFunc)); + } + if ((telFunc == null)) { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(telFunc)); + } + if ((celFunc == null)) { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(celFunc)); + } + if ((ruaFunc == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(ruaFunc)); + } + if ((numeroFunc == null)) { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = ((string)(numeroFunc)); + } + if ((cidadeFunc == null)) { + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = ((string)(cidadeFunc)); + } + if ((statusFunc == null)) { + this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[9].Value = ((string)(statusFunc)); + } + if ((usuarioFunc == null)) { + this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[10].Value = ((string)(usuarioFunc)); + } + if ((senhaFunc == null)) { + this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[11].Value = ((string)(senhaFunc)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int idFunc, + string nomeFunc, + string rgFunc, + string cpfFunc, + string telFunc, + string celFunc, + string ruaFunc, + string numeroFunc, + string cidadeFunc, + string statusFunc, + string usuarioFunc, + string senhaFunc, + int Original_idFunc, + string Original_nomeFunc, + string Original_rgFunc, + string Original_cpfFunc, + string Original_telFunc, + string Original_celFunc, + string Original_ruaFunc, + string Original_numeroFunc, + string Original_cidadeFunc, + string Original_statusFunc, + string Original_usuarioFunc, + string Original_senhaFunc) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idFunc)); + if ((nomeFunc == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeFunc)); + } + if ((rgFunc == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(rgFunc)); + } + if ((cpfFunc == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(cpfFunc)); + } + if ((telFunc == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(telFunc)); + } + if ((celFunc == null)) { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(celFunc)); + } + if ((ruaFunc == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(ruaFunc)); + } + if ((numeroFunc == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(numeroFunc)); + } + if ((cidadeFunc == null)) { + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(cidadeFunc)); + } + if ((statusFunc == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(statusFunc)); + } + if ((usuarioFunc == null)) { + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(usuarioFunc)); + } + if ((senhaFunc == null)) { + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(senhaFunc)); + } + this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_idFunc)); + if ((Original_nomeFunc == null)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_nomeFunc)); + } + if ((Original_rgFunc == null)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_rgFunc)); + } + if ((Original_cpfFunc == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_cpfFunc)); + } + if ((Original_telFunc == null)) { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_telFunc)); + } + if ((Original_celFunc == null)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_celFunc)); + } + if ((Original_ruaFunc == null)) { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_ruaFunc)); + } + if ((Original_numeroFunc == null)) { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_numeroFunc)); + } + if ((Original_cidadeFunc == null)) { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[28].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_cidadeFunc)); + } + if ((Original_statusFunc == null)) { + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_statusFunc)); + } + if ((Original_usuarioFunc == null)) { + this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[32].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[32].Value = ((string)(Original_usuarioFunc)); + } + if ((Original_senhaFunc == null)) { + this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[34].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[34].Value = ((string)(Original_senhaFunc)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + string nomeFunc, + string rgFunc, + string cpfFunc, + string telFunc, + string celFunc, + string ruaFunc, + string numeroFunc, + string cidadeFunc, + string statusFunc, + string usuarioFunc, + string senhaFunc, + int Original_idFunc, + string Original_nomeFunc, + string Original_rgFunc, + string Original_cpfFunc, + string Original_telFunc, + string Original_celFunc, + string Original_ruaFunc, + string Original_numeroFunc, + string Original_cidadeFunc, + string Original_statusFunc, + string Original_usuarioFunc, + string Original_senhaFunc) { + return this.Update(Original_idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, cidadeFunc, statusFunc, usuarioFunc, senhaFunc, Original_idFunc, Original_nomeFunc, Original_rgFunc, Original_cpfFunc, Original_telFunc, Original_celFunc, Original_ruaFunc, Original_numeroFunc, Original_cidadeFunc, Original_statusFunc, Original_usuarioFunc, Original_senhaFunc); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbGeneroTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbGeneroTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbGenero"; + tableMapping.ColumnMappings.Add("idGenero", "idGenero"); + tableMapping.ColumnMappings.Add("nomeGenero", "nomeGenero"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tbGenero] WHERE (([idGenero] = @Original_idGenero) AND ((@IsNu" + + "ll_nomeGenero = 1 AND [nomeGenero] IS NULL) OR ([nomeGenero] = @Original_nomeGen" + + "ero)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idGenero", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeGenero", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tbGenero] ([idGenero], [nomeGenero]) VALUES (@idGenero, @nomeG" + + "enero);\r\nSELECT idGenero, nomeGenero FROM tbGenero WHERE (idGenero = @idGenero)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idGenero", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeGenero", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idGenero", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeGenero", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idGenero", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeGenero", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeGenero", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeGenero", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idGenero, nomeGenero FROM dbo.tbGenero"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbGeneroDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbGeneroDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbGeneroDataTable dataTable = new tbTrabalhoDataSet.tbGeneroDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbGeneroDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbGenero"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idGenero, string Original_nomeGenero) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idGenero)); + if ((Original_nomeGenero == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeGenero)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idGenero, string nomeGenero) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idGenero)); + if ((nomeGenero == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeGenero)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int idGenero, string nomeGenero, int Original_idGenero, string Original_nomeGenero) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idGenero)); + if ((nomeGenero == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeGenero)); + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_idGenero)); + if ((Original_nomeGenero == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_nomeGenero)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeGenero, int Original_idGenero, string Original_nomeGenero) { + return this.Update(Original_idGenero, nomeGenero, Original_idGenero, Original_nomeGenero); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbItemTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbItemTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbItem"; + tableMapping.ColumnMappings.Add("idItem", "idItem"); + tableMapping.ColumnMappings.Add("nomeItem", "nomeItem"); + tableMapping.ColumnMappings.Add("idAutor", "idAutor"); + tableMapping.ColumnMappings.Add("generoItem", "generoItem"); + tableMapping.ColumnMappings.Add("editoraItem", "editoraItem"); + tableMapping.ColumnMappings.Add("tipoItem", "tipoItem"); + tableMapping.ColumnMappings.Add("isbnItem", "isbnItem"); + tableMapping.ColumnMappings.Add("statusItem", "statusItem"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.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)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_isbnItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_isbnItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.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)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isbnItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isbnItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@statusItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_generoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "generoItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_editoraItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "editoraItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_tipoItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "tipoItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_isbnItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_isbnItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "isbnItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_statusItem", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_statusItem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "statusItem", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, st" + + "atusItem FROM dbo.tbItem"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbItemDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbItemDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbItemDataTable dataTable = new tbTrabalhoDataSet.tbItemDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbItemDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbItem"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idItem, string Original_nomeItem, global::System.Nullable Original_idAutor, global::System.Nullable Original_generoItem, global::System.Nullable Original_editoraItem, global::System.Nullable Original_tipoItem, string Original_isbnItem, string Original_statusItem) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idItem)); + if ((Original_nomeItem == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeItem)); + } + if ((Original_idAutor.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_idAutor.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_generoItem.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_generoItem.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_editoraItem.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_editoraItem.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_tipoItem.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_tipoItem.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_isbnItem == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_isbnItem)); + } + if ((Original_statusItem == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_statusItem)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idItem, string nomeItem, global::System.Nullable idAutor, global::System.Nullable generoItem, global::System.Nullable editoraItem, global::System.Nullable tipoItem, string isbnItem, string statusItem) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idItem)); + if ((nomeItem == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeItem)); + } + if ((idAutor.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(idAutor.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((generoItem.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(generoItem.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((editoraItem.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(editoraItem.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((tipoItem.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(tipoItem.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((isbnItem == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(isbnItem)); + } + if ((statusItem == null)) { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = ((string)(statusItem)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int idItem, + string nomeItem, + global::System.Nullable idAutor, + global::System.Nullable generoItem, + global::System.Nullable editoraItem, + global::System.Nullable tipoItem, + string isbnItem, + string statusItem, + int Original_idItem, + string Original_nomeItem, + global::System.Nullable Original_idAutor, + global::System.Nullable Original_generoItem, + global::System.Nullable Original_editoraItem, + global::System.Nullable Original_tipoItem, + string Original_isbnItem, + string Original_statusItem) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idItem)); + if ((nomeItem == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeItem)); + } + if ((idAutor.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(idAutor.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((generoItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(generoItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((editoraItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(editoraItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((tipoItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(tipoItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((isbnItem == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(isbnItem)); + } + if ((statusItem == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(statusItem)); + } + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_idItem)); + if ((Original_nomeItem == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_nomeItem)); + } + if ((Original_idAutor.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_idAutor.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_generoItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_generoItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((Original_editoraItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_editoraItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + if ((Original_tipoItem.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_tipoItem.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + if ((Original_isbnItem == null)) { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_isbnItem)); + } + if ((Original_statusItem == null)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_statusItem)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeItem, global::System.Nullable idAutor, global::System.Nullable generoItem, global::System.Nullable editoraItem, global::System.Nullable tipoItem, string isbnItem, string statusItem, int Original_idItem, string Original_nomeItem, global::System.Nullable Original_idAutor, global::System.Nullable Original_generoItem, global::System.Nullable Original_editoraItem, global::System.Nullable Original_tipoItem, string Original_isbnItem, string Original_statusItem) { + return this.Update(Original_idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem, Original_idItem, Original_nomeItem, Original_idAutor, Original_generoItem, Original_editoraItem, Original_tipoItem, Original_isbnItem, Original_statusItem); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbTipoTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbTipoTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbTipo"; + tableMapping.ColumnMappings.Add("idTipo", "idTipo"); + tableMapping.ColumnMappings.Add("nomeTipo", "nomeTipo"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tbTipo] WHERE (([idTipo] = @Original_idTipo) AND ((@IsNull_nom" + + "eTipo = 1 AND [nomeTipo] IS NULL) OR ([nomeTipo] = @Original_nomeTipo)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idTipo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeTipo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tbTipo] ([idTipo], [nomeTipo]) VALUES (@idTipo, @nomeTipo);\r\nS" + + "ELECT idTipo, nomeTipo FROM tbTipo WHERE (idTipo = @idTipo)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idTipo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeTipo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.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)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idTipo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeTipo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idTipo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeTipo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeTipo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeTipo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idTipo, nomeTipo FROM dbo.tbTipo"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbTipoDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbTipoDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbTipoDataTable dataTable = new tbTrabalhoDataSet.tbTipoDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbTipoDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbTipo"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idTipo, string Original_nomeTipo) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idTipo)); + if ((Original_nomeTipo == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeTipo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int idTipo, string nomeTipo) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idTipo)); + if ((nomeTipo == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(nomeTipo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int idTipo, string nomeTipo, int Original_idTipo, string Original_nomeTipo) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idTipo)); + if ((nomeTipo == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(nomeTipo)); + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_idTipo)); + if ((Original_nomeTipo == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_nomeTipo)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeTipo, int Original_idTipo, string Original_nomeTipo) { + return this.Update(Original_idTipo, nomeTipo, Original_idTipo, Original_nomeTipo); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class tbAutorTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public tbAutorTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "tbAutor"; + tableMapping.ColumnMappings.Add("idAutor", "idAutor"); + tableMapping.ColumnMappings.Add("nomeAutor", "nomeAutor"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tbAutor] WHERE (([idAutor] = @Original_idAutor) AND ((@IsNull_" + + "nomeAutor = 1 AND [nomeAutor] IS NULL) OR ([nomeAutor] = @Original_nomeAutor)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeAutor", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tbAutor] ([nomeAutor]) VALUES (@nomeAutor);\r\nSELECT idAutor, n" + + "omeAutor FROM tbAutor WHERE (idAutor = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeAutor", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[tbAutor] SET [nomeAutor] = @nomeAutor WHERE (([idAutor] = @Original" + + "_idAutor) AND ((@IsNull_nomeAutor = 1 AND [nomeAutor] IS NULL) OR ([nomeAutor] =" + + " @Original_nomeAutor)));\r\nSELECT idAutor, nomeAutor FROM tbAutor WHERE (idAutor " + + "= @idAutor)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nomeAutor", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_nomeAutor", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_nomeAutor", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "nomeAutor", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idAutor", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idAutor", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CSharpLibrary.Properties.Settings.Default.tbTrabalhoConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idAutor, nomeAutor FROM dbo.tbAutor"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(tbTrabalhoDataSet.tbAutorDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual tbTrabalhoDataSet.tbAutorDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + tbTrabalhoDataSet.tbAutorDataTable dataTable = new tbTrabalhoDataSet.tbAutorDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet.tbAutorDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(tbTrabalhoDataSet dataSet) { + return this.Adapter.Update(dataSet, "tbAutor"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idAutor, string Original_nomeAutor) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idAutor)); + if ((Original_nomeAutor == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_nomeAutor)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string nomeAutor) { + if ((nomeAutor == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(nomeAutor)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeAutor, int Original_idAutor, string Original_nomeAutor, int idAutor) { + if ((nomeAutor == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(nomeAutor)); + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_idAutor)); + if ((Original_nomeAutor == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_nomeAutor)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(idAutor)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string nomeAutor, int Original_idAutor, string Original_nomeAutor) { + return this.Update(nomeAutor, Original_idAutor, Original_nomeAutor, Original_idAutor); + } + } + + /// + ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + + "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] + public partial class TableAdapterManager : global::System.ComponentModel.Component { + + private UpdateOrderOption _updateOrder; + + private tbClienteTableAdapter _tbClienteTableAdapter; + + private tbEditoraTableAdapter _tbEditoraTableAdapter; + + private tbEmprestimoTableAdapter _tbEmprestimoTableAdapter; + + private tbFuncionarioTableAdapter _tbFuncionarioTableAdapter; + + private tbGeneroTableAdapter _tbGeneroTableAdapter; + + private tbItemTableAdapter _tbItemTableAdapter; + + private tbTipoTableAdapter _tbTipoTableAdapter; + + private tbAutorTableAdapter _tbAutorTableAdapter; + + private bool _backupDataSetBeforeUpdate; + + private global::System.Data.IDbConnection _connection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UpdateOrderOption UpdateOrder { + get { + return this._updateOrder; + } + set { + this._updateOrder = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbClienteTableAdapter tbClienteTableAdapter { + get { + return this._tbClienteTableAdapter; + } + set { + this._tbClienteTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbEditoraTableAdapter tbEditoraTableAdapter { + get { + return this._tbEditoraTableAdapter; + } + set { + this._tbEditoraTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbEmprestimoTableAdapter tbEmprestimoTableAdapter { + get { + return this._tbEmprestimoTableAdapter; + } + set { + this._tbEmprestimoTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbFuncionarioTableAdapter tbFuncionarioTableAdapter { + get { + return this._tbFuncionarioTableAdapter; + } + set { + this._tbFuncionarioTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbGeneroTableAdapter tbGeneroTableAdapter { + get { + return this._tbGeneroTableAdapter; + } + set { + this._tbGeneroTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbItemTableAdapter tbItemTableAdapter { + get { + return this._tbItemTableAdapter; + } + set { + this._tbItemTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbTipoTableAdapter tbTipoTableAdapter { + get { + return this._tbTipoTableAdapter; + } + set { + this._tbTipoTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public tbAutorTableAdapter tbAutorTableAdapter { + get { + return this._tbAutorTableAdapter; + } + set { + this._tbAutorTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool BackupDataSetBeforeUpdate { + get { + return this._backupDataSetBeforeUpdate; + } + set { + this._backupDataSetBeforeUpdate = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public global::System.Data.IDbConnection Connection { + get { + if ((this._connection != null)) { + return this._connection; + } + if (((this._tbClienteTableAdapter != null) + && (this._tbClienteTableAdapter.Connection != null))) { + return this._tbClienteTableAdapter.Connection; + } + if (((this._tbEditoraTableAdapter != null) + && (this._tbEditoraTableAdapter.Connection != null))) { + return this._tbEditoraTableAdapter.Connection; + } + if (((this._tbEmprestimoTableAdapter != null) + && (this._tbEmprestimoTableAdapter.Connection != null))) { + return this._tbEmprestimoTableAdapter.Connection; + } + if (((this._tbFuncionarioTableAdapter != null) + && (this._tbFuncionarioTableAdapter.Connection != null))) { + return this._tbFuncionarioTableAdapter.Connection; + } + if (((this._tbGeneroTableAdapter != null) + && (this._tbGeneroTableAdapter.Connection != null))) { + return this._tbGeneroTableAdapter.Connection; + } + if (((this._tbItemTableAdapter != null) + && (this._tbItemTableAdapter.Connection != null))) { + return this._tbItemTableAdapter.Connection; + } + if (((this._tbTipoTableAdapter != null) + && (this._tbTipoTableAdapter.Connection != null))) { + return this._tbTipoTableAdapter.Connection; + } + if (((this._tbAutorTableAdapter != null) + && (this._tbAutorTableAdapter.Connection != null))) { + return this._tbAutorTableAdapter.Connection; + } + return null; + } + set { + this._connection = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int TableAdapterInstanceCount { + get { + int count = 0; + if ((this._tbClienteTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbEditoraTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbEmprestimoTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbFuncionarioTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbGeneroTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbItemTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbTipoTableAdapter != null)) { + count = (count + 1); + } + if ((this._tbAutorTableAdapter != null)) { + count = (count + 1); + } + return count; + } + } + + /// + ///Update rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateUpdatedRows(tbTrabalhoDataSet dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._tbGeneroTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbGenero.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbGeneroTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbTipoTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbTipo.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbTipoTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbAutorTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbAutor.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbAutorTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbClienteTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbCliente.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbClienteTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbFuncionarioTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbFuncionario.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbFuncionarioTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbItemTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbItem.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbItemTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbEditoraTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbEditora.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbEditoraTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tbEmprestimoTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tbEmprestimo.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tbEmprestimoTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + return result; + } + + /// + ///Insert rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateInsertedRows(tbTrabalhoDataSet dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._tbGeneroTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbGenero.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbGeneroTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbTipoTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbTipo.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbTipoTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbAutorTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbAutor.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbAutorTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbClienteTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbCliente.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbClienteTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbFuncionarioTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbFuncionario.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbFuncionarioTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbItemTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbItem.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbItemTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbEditoraTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbEditora.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbEditoraTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tbEmprestimoTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tbEmprestimo.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tbEmprestimoTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + return result; + } + + /// + ///Delete rows in bottom-up order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateDeletedRows(tbTrabalhoDataSet dataSet, global::System.Collections.Generic.List allChangedRows) { + int result = 0; + if ((this._tbEmprestimoTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbEmprestimo.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbEmprestimoTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbEditoraTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbEditora.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbEditoraTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbItemTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbItem.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbItemTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbFuncionarioTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbFuncionario.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbFuncionarioTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbClienteTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbCliente.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbClienteTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbAutorTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbAutor.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbAutorTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbTipoTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbTipo.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbTipoTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbGeneroTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbGenero.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbGeneroTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + return result; + } + + /// + ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { + if (((updatedRows == null) + || (updatedRows.Length < 1))) { + return updatedRows; + } + if (((allAddedRows == null) + || (allAddedRows.Count < 1))) { + return updatedRows; + } + global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); + for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { + global::System.Data.DataRow row = updatedRows[i]; + if ((allAddedRows.Contains(row) == false)) { + realUpdatedRows.Add(row); + } + } + return realUpdatedRows.ToArray(); + } + + /// + ///Update all changes to the dataset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public virtual int UpdateAll(tbTrabalhoDataSet dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._tbClienteTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbClienteTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbEditoraTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbEditoraTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbEmprestimoTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbEmprestimoTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbFuncionarioTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbFuncionarioTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbGeneroTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbGeneroTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbItemTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbItemTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbTipoTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbTipoTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + if (((this._tbAutorTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tbAutorTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Todos os TableAdapters gerenciados por um TableAdapterManager devem usar a mesma " + + "cadeia de conexão."); + } + global::System.Data.IDbConnection workConnection = this.Connection; + if ((workConnection == null)) { + throw new global::System.ApplicationException("TableAdapterManager não contém informações de conexão. Defina cada propriedade Ta" + + "bleAdapter de TableAdapterManager como uma instância válida de TableAdapter."); + } + bool workConnOpened = false; + if (((workConnection.State & global::System.Data.ConnectionState.Broken) + == global::System.Data.ConnectionState.Broken)) { + workConnection.Close(); + } + if ((workConnection.State == global::System.Data.ConnectionState.Closed)) { + workConnection.Open(); + workConnOpened = true; + } + global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); + if ((workTransaction == null)) { + throw new global::System.ApplicationException("Não é possível iniciar a transação. Os dados de conexão atuais não oferecem supor" + + "te às transações ou o estado atual não permite que a transação inicie."); + } + global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); + int result = 0; + global::System.Data.DataSet backupDataSet = null; + if (this.BackupDataSetBeforeUpdate) { + backupDataSet = new global::System.Data.DataSet(); + backupDataSet.Merge(dataSet); + } + try { + // ---- Prepare for update ----------- + // + if ((this._tbClienteTableAdapter != null)) { + revertConnections.Add(this._tbClienteTableAdapter, this._tbClienteTableAdapter.Connection); + this._tbClienteTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbClienteTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbClienteTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbClienteTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbClienteTableAdapter.Adapter); + } + } + if ((this._tbEditoraTableAdapter != null)) { + revertConnections.Add(this._tbEditoraTableAdapter, this._tbEditoraTableAdapter.Connection); + this._tbEditoraTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbEditoraTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbEditoraTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbEditoraTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbEditoraTableAdapter.Adapter); + } + } + if ((this._tbEmprestimoTableAdapter != null)) { + revertConnections.Add(this._tbEmprestimoTableAdapter, this._tbEmprestimoTableAdapter.Connection); + this._tbEmprestimoTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbEmprestimoTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbEmprestimoTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbEmprestimoTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbEmprestimoTableAdapter.Adapter); + } + } + if ((this._tbFuncionarioTableAdapter != null)) { + revertConnections.Add(this._tbFuncionarioTableAdapter, this._tbFuncionarioTableAdapter.Connection); + this._tbFuncionarioTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbFuncionarioTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbFuncionarioTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbFuncionarioTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbFuncionarioTableAdapter.Adapter); + } + } + if ((this._tbGeneroTableAdapter != null)) { + revertConnections.Add(this._tbGeneroTableAdapter, this._tbGeneroTableAdapter.Connection); + this._tbGeneroTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbGeneroTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbGeneroTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbGeneroTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbGeneroTableAdapter.Adapter); + } + } + if ((this._tbItemTableAdapter != null)) { + revertConnections.Add(this._tbItemTableAdapter, this._tbItemTableAdapter.Connection); + this._tbItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbItemTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbItemTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbItemTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbItemTableAdapter.Adapter); + } + } + if ((this._tbTipoTableAdapter != null)) { + revertConnections.Add(this._tbTipoTableAdapter, this._tbTipoTableAdapter.Connection); + this._tbTipoTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbTipoTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbTipoTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbTipoTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbTipoTableAdapter.Adapter); + } + } + if ((this._tbAutorTableAdapter != null)) { + revertConnections.Add(this._tbAutorTableAdapter, this._tbAutorTableAdapter.Connection); + this._tbAutorTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tbAutorTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tbAutorTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tbAutorTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tbAutorTableAdapter.Adapter); + } + } + // + //---- Perform updates ----------- + // + if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + } + else { + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + } + result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); + // + //---- Commit updates ----------- + // + workTransaction.Commit(); + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + if ((0 < allChangedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; + allChangedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + } + catch (global::System.Exception ex) { + workTransaction.Rollback(); + // ---- Restore the dataset ----------- + if (this.BackupDataSetBeforeUpdate) { + global::System.Diagnostics.Debug.Assert((backupDataSet != null)); + dataSet.Clear(); + dataSet.Merge(backupDataSet); + } + else { + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + row.SetAdded(); + } + } + } + throw ex; + } + finally { + if (workConnOpened) { + workConnection.Close(); + } + if ((this._tbClienteTableAdapter != null)) { + this._tbClienteTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbClienteTableAdapter])); + this._tbClienteTableAdapter.Transaction = null; + } + if ((this._tbEditoraTableAdapter != null)) { + this._tbEditoraTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbEditoraTableAdapter])); + this._tbEditoraTableAdapter.Transaction = null; + } + if ((this._tbEmprestimoTableAdapter != null)) { + this._tbEmprestimoTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbEmprestimoTableAdapter])); + this._tbEmprestimoTableAdapter.Transaction = null; + } + if ((this._tbFuncionarioTableAdapter != null)) { + this._tbFuncionarioTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbFuncionarioTableAdapter])); + this._tbFuncionarioTableAdapter.Transaction = null; + } + if ((this._tbGeneroTableAdapter != null)) { + this._tbGeneroTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbGeneroTableAdapter])); + this._tbGeneroTableAdapter.Transaction = null; + } + if ((this._tbItemTableAdapter != null)) { + this._tbItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbItemTableAdapter])); + this._tbItemTableAdapter.Transaction = null; + } + if ((this._tbTipoTableAdapter != null)) { + this._tbTipoTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbTipoTableAdapter])); + this._tbTipoTableAdapter.Transaction = null; + } + if ((this._tbAutorTableAdapter != null)) { + this._tbAutorTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tbAutorTableAdapter])); + this._tbAutorTableAdapter.Transaction = null; + } + if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { + global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); + for (int i = 0; (i < adapters.Length); i = (i + 1)) { + global::System.Data.Common.DataAdapter adapter = adapters[i]; + adapter.AcceptChangesDuringUpdate = true; + } + } + } + return result; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { + global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { + if ((this._connection != null)) { + return true; + } + if (((this.Connection == null) + || (inputConnection == null))) { + return true; + } + if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { + return true; + } + return false; + } + + /// + ///Update Order Option + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public enum UpdateOrderOption { + + InsertUpdateDelete = 0, + + UpdateInsertDelete = 1, + } + + /// + ///Used to sort self-referenced table's rows + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { + + private global::System.Data.DataRelation _relation; + + private int _childFirst; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { + this._relation = relation; + if (childFirst) { + this._childFirst = -1; + } + else { + this._childFirst = 1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) { + global::System.Diagnostics.Debug.Assert((row != null)); + global::System.Data.DataRow root = row; + distance = 0; + + global::System.Collections.Generic.IDictionary traversedRows = new global::System.Collections.Generic.Dictionary(); + traversedRows[row] = row; + + global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + } + + if ((distance == 0)) { + traversedRows.Clear(); + traversedRows[row] = row; + parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + } + } + + return root; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { + if (object.ReferenceEquals(row1, row2)) { + return 0; + } + if ((row1 == null)) { + return -1; + } + if ((row2 == null)) { + return 1; + } + + int distance1 = 0; + global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1); + + int distance2 = 0; + global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2); + + if (object.ReferenceEquals(root1, root2)) { + return (this._childFirst * distance1.CompareTo(distance2)); + } + else { + global::System.Diagnostics.Debug.Assert(((root1.Table != null) + && (root2.Table != null))); + if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) { + return -1; + } + else { + return 1; + } + } + } + } + } +} + +#pragma warning restore 1591 diff --git a/tbTrabalhoDataSet.cs b/tbTrabalhoDataSet.cs new file mode 100644 index 0000000..4839ec0 --- /dev/null +++ b/tbTrabalhoDataSet.cs @@ -0,0 +1,17 @@ +namespace CSharpLibrary +{ +} +namespace CSharpLibrary +{ + + + public partial class tbTrabalhoDataSet + { + } +} +namespace CSharpLibrary { + + + public partial class tbTrabalhoDataSet { + } +} diff --git a/tbTrabalhoDataSet.xsc b/tbTrabalhoDataSet.xsc new file mode 100644 index 0000000..551fc56 --- /dev/null +++ b/tbTrabalhoDataSet.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/tbTrabalhoDataSet.xsd b/tbTrabalhoDataSet.xsd new file mode 100644 index 0000000..32b925d --- /dev/null +++ b/tbTrabalhoDataSet.xsd @@ -0,0 +1,926 @@ + + + + + + + + + + + + + + + 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))) + + + + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + + + + + + + + + SELECT idCliente, nomeCliente, rgCliente, cpfCliente, telCliente, celCliente, ruaCliente, numeroCliente, cidadeCliente, statusCliente FROM dbo.tbCliente + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[tbEditora] WHERE (([idEditora] = @Original_idEditora) AND ((@IsNull_nomeEditora = 1 AND [nomeEditora] IS NULL) OR ([nomeEditora] = @Original_nomeEditora))) + + + + + + + + + + INSERT INTO [dbo].[tbEditora] ([idEditora], [nomeEditora]) VALUES (@idEditora, @nomeEditora); +SELECT idEditora, nomeEditora FROM tbEditora WHERE (idEditora = @idEditora) + + + + + + + + + SELECT idEditora, nomeEditora FROM dbo.tbEditora + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + 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))) + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + + + + + + SELECT idEmprestimo, idFunc, idCliente, idItem, dataEmprestimo, dataDevolucao, statusEmprestimo FROM dbo.tbEmprestimo + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + + + + + + + + + + + SELECT idFunc, nomeFunc, rgFunc, cpfFunc, telFunc, celFunc, ruaFunc, numeroFunc, cidadeFunc, statusFunc, usuarioFunc, senhaFunc FROM dbo.tbFuncionario + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[tbGenero] WHERE (([idGenero] = @Original_idGenero) AND ((@IsNull_nomeGenero = 1 AND [nomeGenero] IS NULL) OR ([nomeGenero] = @Original_nomeGenero))) + + + + + + + + + + INSERT INTO [dbo].[tbGenero] ([idGenero], [nomeGenero]) VALUES (@idGenero, @nomeGenero); +SELECT idGenero, nomeGenero FROM tbGenero WHERE (idGenero = @idGenero) + + + + + + + + + SELECT idGenero, nomeGenero FROM dbo.tbGenero + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + 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))) + + + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + + + + + + + SELECT idItem, nomeItem, idAutor, generoItem, editoraItem, tipoItem, isbnItem, statusItem FROM dbo.tbItem + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[tbTipo] WHERE (([idTipo] = @Original_idTipo) AND ((@IsNull_nomeTipo = 1 AND [nomeTipo] IS NULL) OR ([nomeTipo] = @Original_nomeTipo))) + + + + + + + + + + INSERT INTO [dbo].[tbTipo] ([idTipo], [nomeTipo]) VALUES (@idTipo, @nomeTipo); +SELECT idTipo, nomeTipo FROM tbTipo WHERE (idTipo = @idTipo) + + + + + + + + + SELECT idTipo, nomeTipo FROM dbo.tbTipo + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[tbAutor] WHERE (([idAutor] = @Original_idAutor) AND ((@IsNull_nomeAutor = 1 AND [nomeAutor] IS NULL) OR ([nomeAutor] = @Original_nomeAutor))) + + + + + + + + + + INSERT INTO [dbo].[tbAutor] ([nomeAutor]) VALUES (@nomeAutor); +SELECT idAutor, nomeAutor FROM tbAutor WHERE (idAutor = SCOPE_IDENTITY()) + + + + + + + + SELECT idAutor, nomeAutor FROM dbo.tbAutor + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tbTrabalhoDataSet.xss b/tbTrabalhoDataSet.xss new file mode 100644 index 0000000..d8c30f1 --- /dev/null +++ b/tbTrabalhoDataSet.xss @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + 367 + 175 + + + 297 + 175 + + + + + + + 367 + 424 + + + 280 + 424 + + + 280 + 280 + + + + + + + 367 + 799 + + + 272 + 799 + + + 272 + 280 + + + + + + + 621 + 839 + + + 551 + 839 + + + + + + + 621 + 989 + + + 551 + 989 + + + + + + + 1175 + 185 + + + 1175 + 807 + + + 551 + 807 + + + + + \ No newline at end of file