Advertisement
Guest User

Untitled

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