Advertisement
Guest User

Untitled

a guest
Mar 20th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.93 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using FirebirdSql.Data.FirebirdClient;
  11.  
  12. namespace splash1
  13. {
  14.     public partial class Sistema_Login : Form
  15.     {
  16.  
  17.         public Sistema_Login()
  18.         {
  19.             InitializeComponent();
  20.         }
  21.  
  22.         public void logar()
  23.         {
  24.  
  25.         }
  26.  
  27.         private void Sistema_Login_Load(object sender, EventArgs e)
  28.         {
  29.  
  30.         }
  31.  
  32.         private void textBox2_TextChanged(object sender)
  33.         {
  34.  
  35.         }
  36.  
  37.         private void label2_Click(object sender, EventArgs e)
  38.         {
  39.             throw new NotImplementedException();
  40.         }
  41.  
  42.         private void button2_Click(object sender, EventArgs e)
  43.         {
  44.             throw new NotImplementedException();
  45.             Application.Exit();
  46.         }
  47.  
  48.         private void label1_Click(object sender, EventArgs e)
  49.         {
  50.             throw new NotImplementedException();
  51.         }
  52.  
  53.         public void button1_Click(object sender, EventArgs e)
  54.         {
  55.             throw new NotImplementedException();
  56.         }
  57.  
  58.         private void TextBox(string p)
  59.         {
  60.             throw new NotImplementedException();
  61.         }
  62.  
  63.         private void textBox1_TextChanged(object sender, EventArgs e)
  64.         {
  65.  
  66.         }
  67.  
  68.         private void Sistema_Login_Load(object sender, EventArgs e)
  69.         {
  70.  
  71.         }
  72.  
  73.         private void label3_Click(object sender, EventArgs e)
  74.         {
  75.  
  76.         }
  77.  
  78.         private void label4_Click(object sender, EventArgs e)
  79.         {
  80.  
  81.         }
  82.  
  83.         private void pictureBox1_Click(object sender, EventArgs e)
  84.         {
  85.  
  86.         }
  87.  
  88.         private void pictureBox1_Click_1(object sender, EventArgs e)
  89.         {
  90.  
  91.         }
  92.     }
  93.  
  94.     public static class ConexaoFirebird
  95.     {
  96.         static FbConnection _conexaoFB;
  97.  
  98.         public static FbConnection conexao
  99.         {
  100.             get
  101.             {
  102.                 return _conexaoFB;
  103.             }
  104.         }
  105.  
  106.         public static bool conectar()
  107.         {
  108.             string strConexao;
  109.  
  110.             strConexao = "User=SYSDBA;" +
  111.             "Password=masterkey;" +
  112.             "Database=C:\\Users\\solan\\Documents\\firebired\\BANCO.FDB;" +
  113.             "Port=3050;" +
  114.             "Dialect=3;" +
  115.             "Charset=NONE;" +
  116.             "Role=;" +
  117.             "Connection timeout=7;" +
  118.             "Connection lifetime=0;" +
  119.             "Pooling=true;" +
  120.             "Packet Size=8192;" +
  121.             "Server Type=0";
  122.  
  123.  
  124.             _conexaoFB = new FbConnection(strConexao);
  125.             _conexaoFB.Open();
  126.             return true;
  127.         }
  128.  
  129.         public static bool Desconectar()
  130.         {
  131.             _conexaoFB.Close();
  132.             _conexaoFB = null;
  133.  
  134.             return false;
  135.         }
  136.     }
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement