Beispiel #1
0
 public static bool AddDriver(ConnectInfo info)
 {
     try
     {
         using (DbConnection connection = new SQLiteConnection(ConnectInfo.LocalConnectionString))
         {
             connection.Open();
             DbCommand command = connection.CreateCommand();
             command.CommandText = Resources.InsertDriverScript;
             command.Parameters.Add(new SQLiteParameter("@name", info.DriverName));
             command.Parameters.Add(new SQLiteParameter("@assemblyName", info.AssemblyName));
             command.Parameters.Add(new SQLiteParameter("@namespaceName", info.NamespaceName));
             command.Parameters.Add(new SQLiteParameter("@className", info.ClassName));
             int ret = command.ExecuteNonQuery();
             return(true);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
         return(false);
     }
 }
Beispiel #2
0
 public OpenConnectEventArgs(ConnectInfo info)
     :
     base()
 {
     this.info = info;
 }
Beispiel #3
0
 public CloseConnectEventArgs(ConnectInfo info)
     :
     base()
 {
     this.info = info;
 }