Пример #1
0
 private int GetSqliteRowId()
 {
     try
     {
         //ISQLConnection iSQLConnection = new SQLiteConn();
         string        sql  = @"SELECT id FROM tbtitlelist ORDER BY id DESC LIMIT 0,1;";
         var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
         SQLiteCommand cmd  = new SQLiteCommand(sql, conn);
         conn.Open();
         Monitor.Enter(obj);
         SQLiteDataReader dataReader = cmd.ExecuteReader();
         if (dataReader.HasRows == false)
         {
             return(0);//id为1
         }
         dataReader.Read();
         int id = (int)dataReader["id"];
         Monitor.Exit(obj);
         dataReader.Close();
         conn.Close();
         conn.Dispose();
         return(id);
     }
     catch (Exception e)
     {
         return(0);
         //Debug.WriteLine("-----clsLocTitleListDAL---GetSqliteRowId----------");
     }
 }
Пример #2
0
        //修改好 未测试
        /// <summary>
        /// 查询tb内容返回集合
        /// </summary>
        /// <param name="rows"></param>
        /// <param name="startIndex"></param>
        /// <returns></returns>
        public List <ContentEntity> SelectLocalContentList(string rows = "50", string startIndex = "0")
        {
            List <ContentEntity> listContentEntity = new List <ContentEntity>();

            //ISQLConnection iSQLConnection = new SQLiteConn();
            //string sql = @"SELECT id,title,url,uname,uid,replies,createcode,createtime,updatetime FROM tbtitlelist ORDER BY id AND visiable=1 LIMIT " + rows + " OFFSET " + startIndex + "";
            string        sql  = @"SELECT id,content,titlecreatetime,replytime,floor,replynum,pagenum,createcode,createtime,updatetime FROM tbcontext WHERE visiable=1  LIMIT" + rows + " OFFSET " + startIndex + "";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            Monitor.Enter(obj);
            SQLiteDataReader dataReader = cmd.ExecuteReader();

            while (dataReader.Read())
            {
                ContentEntity contentEntity = new ContentEntity();
                contentEntity.Id              = (int)dataReader["id"];
                contentEntity.Content         = dataReader["content"].ToString();
                contentEntity.TitleCreateTime = dataReader["titlecreatetime"].ToString();
                contentEntity.ReplyTime       = dataReader["replytime"].ToString();
                contentEntity.Floor           = dataReader["floor"].ToString();
                contentEntity.ReplyNum        = dataReader["replynum"].ToString();
                contentEntity.PageNum         = dataReader["pagenum"].ToString();
                contentEntity.CreateCode      = (int)dataReader["createcode"];
                contentEntity.CreateTime      = dataReader["createtime"].ToString();
                contentEntity.UpdateTime      = dataReader["updatetime"].ToString();
                listContentEntity.Add(contentEntity);
            }
            Monitor.Exit(obj);
            dataReader.Close();
            conn.Close();
            conn.Dispose();
            return(listContentEntity);
        }
Пример #3
0
 /// <summary>
 /// 获取最后一行数据
 /// </summary>
 /// <returns></returns>
 private int GetLastRowId()
 {
     try
     {
         //ISQLConnection iSQLConnection = new SQLiteConn();
         string        sql  = @"select last_insert_rowid();";
         var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
         SQLiteCommand cmd  = new SQLiteCommand(sql, conn);
         conn.Open();
         Monitor.Enter(obj);
         SQLiteDataReader dataReader = cmd.ExecuteReader();
         dataReader.Read();
         int id = (int)dataReader["id"];
         Monitor.Exit(obj);
         dataReader.Close();
         conn.Close();
         conn.Dispose();
         return(id);
     }
     catch (Exception e)
     {
         return(0);
         //Debug.WriteLine("-----clsLocTitleListDAL---GetSqliteRowId----------");
     }
 }
Пример #4
0
        static void Main(string[] args)
        {
            //MySQLConn.TestMain();
            SQLiteConn.TestMain();

            Console.WriteLine("Press key");
            Console.ReadKey();
        }
Пример #5
0
        public Productos()
        {
            InitializeComponent();
            conn = new SQLiteConn("Terminal de venta.db", true);
            lstProductos.Items.Add(conn.GetProducts());
            producto = lstProductos.SelectedItem as Products;

            lstProductos.DisplayMember = "Descripcion";
            lstProductos.ValueMember   = "Id";
            lstProductos.DataSource    = conn.GetProducts();
        }
Пример #6
0
        public Ventas_por_fecha()
        {
            InitializeComponent();

            conn = new SQLiteConn("Terminal de venta.db", true);

            cmbFilter.Items.Add("Sin Filtro");
            cmbFilter.Items.Add("Dia");
            cmbFilter.Items.Add("Mes");
            cmbFilter.Items.Add("Año");
        }
Пример #7
0
        public Producto(Usuario usuario, Tarjeta tarjeta)
        {
            InitializeComponent();
            user   = usuario;
            conn   = new SQLiteConn("DataBase.db", true);
            tarjet = tarjeta;

            pic_Product.BackgroundImage = Image.FromFile($"imagenes/{tarjeta.Id}.jpg");
            txt_Nombre.Text             = $"{tarjet.Description}";
            txt_Precio.Text             = $"{tarjet.Price:C}";
            txt_Restante.Text           = $"{tarjet.Quan}";
        }
Пример #8
0
        public Login()
        {
            InitializeComponent();

            conn = new SQLiteConn("Terminal de venta.db", true);

            cmbUsers.DisplayMember = "username";
            cmbUsers.ValueMember   = "userid";
            cmbUsers.DataSource    = conn.GetUsername();

            btnLogin.Enabled = false;
        }
Пример #9
0
 private void Cargar()
 {
     conn = new SQLiteConn("DataBase.db", true);
     if (conn.GetUsers().Exists(u => u.Active == true))
     {
         user = conn.GetUsers().Find(u => u.Active == true);
     }
     else
     {
         user = conn.GetUsers()[0];
     }
 }
Пример #10
0
 public Cuenta(Usuario usuario)
 {
     InitializeComponent();
     conn           = new SQLiteConn("DataBase.db", true);
     user           = usuario;
     nombre.Text    = usuario.FullName;
     direccion.Text = usuario.Address;
     correo.Text    = usuario.Email;
     if (!usuario.Active)
     {
         panel1.Hide();
     }
 }
Пример #11
0
        public Actualizar(SQLiteConn con, Usuario usuario)
        {
            InitializeComponent();
            conn = con;
            user = usuario;

            nombre.Text    = user.FName;
            apellido.Text  = user.LName;
            correo.Text    = user.Email;
            direccion.Text = user.Street;
            codigo.Text    = $"{user.CP}";
            pass.Text      = user.Password;
            repass.Text    = user.Password;
        }
Пример #12
0
        public Inicio(Usuario usuario)
        {
            user     = usuario;
            conn     = new SQLiteConn("DataBase.db", true);
            tarjetas = conn.GetTarjetas();

            InitializeComponent();
            List <PictureBox> images = new List <PictureBox>();

            for (int i = 0; i < numProductos; i++)
            {
                this.pnl_Inicio.Controls.Add(AddImage(i));
            }
        }
Пример #13
0
        public Pagar(Usuario usuario, decimal costo)
        {
            InitializeComponent();
            conn = new SQLiteConn("DataBase.db", true);
            user = usuario;
            if (conn.GetCreditCards().Exists(t => t.IdUser == user.Id))
            {
                tarjetas.DataSource    = conn.GetCreditCardsById(user.Id);
                tarjetas.DisplayMember = "Number";
            }

            nombre.Text    = user.FullName;
            direccion.Text = user.Address;
            importe.Text   = $"{costo:C}";
            folio.Text     = $"G{user.Id}-{user.CP}";
        }
Пример #14
0
        /// <summary>
        /// 查询总行数数据
        /// </summary>
        /// <returns></returns>
        public int SelectAllCount()
        {
            //ISQLConnection iSQLConnection = new SQLiteConn();
            string        sql  = @"select count(*)from tbtitlelist";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            var data = cmd.ExecuteScalar();

            if (data == null)
            {
                return(0);
            }
            return(Convert.ToInt32(data));
        }
Пример #15
0
        ///分页功能 未测试 添加标识
        /// <summary>
        /// 查询贴吧标题
        /// </summary>
        /// <param name="rows">返回行数</param>
        /// <param name="startIndex">起始行号</param>
        /// <returns></returns>
        public DataTable SelectLocalTBTitle(string rows = "50", string startIndex = "0")
        {
            //ISQLConnection iSQLConnection = new SQLiteConn();
            string        sql  = @"SELECT id,title,url,uname,uid,replies,createcode,createtime,updatetime FROM tbtitlelist ORDER BY  id AND visiable=1  LIMIT " + rows + " OFFSET " + startIndex + "";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            SQLiteDataReader dataReader = cmd.ExecuteReader();
            DataTable        dataTable  = new DataTable();

            dataTable.Load(dataReader);
            if (dataTable == null)
            {
                return(null);
            }
            return(dataTable);
        }
Пример #16
0
        //修改好未测试
        /// <summary>
        /// 查询sqlite内容
        /// </summary>
        /// <param name="rows"></param>
        /// <param name="startIndex"></param>
        /// <returns></returns>
        public DataTable SelectLocalContent(string rows = "50", string startIndex = "0")
        {
            //ISQLConnection iSQLConnection = new SQLiteConn();
            string        sql  = @"SELECT id,content,titlecreatetime,replytime,floor,replynum,pagenum,createcode,createtime,updatetime FROM tbcontext WHERE visiable=1  LIMIT " + rows + " OFFSET " + startIndex + "";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            Monitor.Enter(obj);
            SQLiteDataReader dataReader = cmd.ExecuteReader();

            Monitor.Exit(obj);
            DataTable dataTable = new DataTable();

            dataTable.Load(dataReader);
            if (dataTable == null)
            {
                return(null);
            }
            return(dataTable);
        }
Пример #17
0
        /// <summary>
        /// 查询贴吧标题 Icode是否存在
        /// </summary>
        /// <param name="resultEntity"></param>
        /// <returns></returns>
        public bool SelectCreateCode(ResultEntity resultEntity)
        {
            string        sql  = "SELECT id FROM tbtitlelist WHERE createcode=" + resultEntity.CreateCode + "";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            Monitor.Enter(obj);
            var dataReader = cmd.ExecuteReader();

            if (dataReader.HasRows == false)
            {
                return(false);
            }
            dataReader.Read();
            if (dataReader["id"] == null)//id不存在
            {
                return(false);
            }
            return(true);
        }
Пример #18
0
        public Ventas_El_Cafecito(string username)
        {
            InitializeComponent();
            cmbuser.Text = username;
            conn         = new SQLiteConn("Terminal de venta.db", true);
            int trans = 0;

            trans = conn.GetSalesByRecord() + 1;
            label_NumeroDeVenta.Text = Convert.ToString(trans);

            txtPaid.Text   = "0.00";
            lblTotal.Text  = "0.00";
            lblChange.Text = "0.00";

            ResetProducts();
            ShoppingList();
            date.Value = DateTime.Today;

            cbPayment.DisplayMember = "transactionType";
            cbPayment.ValueMember   = "transactionID";
            cbPayment.DataSource    = conn.GetPaymentType();
        }
Пример #19
0
        ///分页功能 未测试 添加标识
        /// <summary>
        /// 查询贴吧标题
        /// </summary>
        /// <param name="rows">返回行数</param>
        /// <param name="startIndex">起始行号</param>
        /// <returns></returns>
        public List <ResultEntity> SelectLocalTitleList(string rows = "50", string startIndex = "0")
        {
            List <ResultEntity> listResultEntity = new List <ResultEntity>();
            //ISQLConnection iSQLConnection = new SQLiteConn();
            //string sql = @"SELECT id,title,url,uname,uid,replies,createcode,createtime,updatetime FROM tbtitlelist ORDER BY id AND visiable=1 LIMIT " + rows + " OFFSET " + startIndex + "";
            string        sql  = @"SELECT id,title,url,uname,uid,replies,createcode,createtime,updatetime FROM tbtitlelist WHERE visiable=1 LIMIT " + rows + " OFFSET " + startIndex + "";
            var           conn = SQLiteConn.GetSQLiteConn();//iSQLConnection.GetSQLiteConn();
            SQLiteCommand cmd  = new SQLiteCommand(sql, conn);

            conn.Open();
            Monitor.Enter(obj);
            SQLiteDataReader dataReader = cmd.ExecuteReader();

            if (dataReader == null)
            {
                return(null);
            }
            while (dataReader.Read())
            {
                ResultEntity resultEntity = new ResultEntity();
                resultEntity.Id         = (int)dataReader["id"];
                resultEntity.Title      = dataReader["title"].ToString();
                resultEntity.Url        = dataReader["url"].ToString();
                resultEntity.Uname      = dataReader["uname"].ToString();
                resultEntity.Uid        = dataReader["uid"].ToString();
                resultEntity.Intreplies = Convert.ToInt32(dataReader["replies"]);
                resultEntity.CreateCode = dataReader["createcode"].ToString();
                resultEntity.CreateTime = dataReader["createtime"].ToString();
                resultEntity.UpdateTime = dataReader["updatetime"].ToString();
                listResultEntity.Add(resultEntity);
            }
            Monitor.Exit(obj);//修改
            dataReader.Close();
            conn.Close();
            conn.Dispose();
            return(listResultEntity);
        }
Пример #20
0
        public Compras(Usuario usuario)
        {
            InitializeComponent();
            conn            = new SQLiteConn("DataBase.db", true);
            user            = usuario;
            lbl_Nombre.Text = user.FName;
            if (conn.GetCompras().Exists(c => c.IdUser == user.Id))
            {
                List <Carrito> carrito = conn.GetComprasById(usuario.Id);

                for (int i = 0; i < carrito.Count; i++)
                {
                    int     cantidad = carrito[i].Cantidad;
                    string  code     = conn.GetTarjeta(carrito[i].IdProducto).Id;
                    string  name     = conn.GetTarjeta(carrito[i].IdProducto).Description;
                    decimal precio   = Convert.ToDecimal(conn.GetTarjeta(carrito[i].IdProducto).Price);
                    decimal total    = cantidad * precio;
                    Total += total;
                    grid_carrito.Rows.Add(code, name, cantidad, precio, total);
                    grid_carrito.Rows[i].Tag = code;
                }
                text_Total.Text = $"{Total:C}";
            }
        }
Пример #21
0
 public InicioSesión()
 {
     InitializeComponent();
     conn = new SQLiteConn("Metflix.db", true);
 }
Пример #22
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectionForm));
     this.btnConnect        = new System.Windows.Forms.Button();
     this.btnCancel         = new System.Windows.Forms.Button();
     this.tcDatabase        = new System.Windows.Forms.TabControl();
     this.tpAccess          = new System.Windows.Forms.TabPage();
     this.accessConn1       = new DbConnections.AccessConn();
     this.tpSqlServer       = new System.Windows.Forms.TabPage();
     this.sqlConn1          = new DbConnections.SqlConn();
     this.tabPage1          = new System.Windows.Forms.TabPage();
     this.mySqlConn1        = new DbConnections.MySqlConn();
     this.tabPage2          = new System.Windows.Forms.TabPage();
     this.oracleConn1       = new DbConnections.OracleConn();
     this.tabPage3          = new System.Windows.Forms.TabPage();
     this.sqLiteConn1       = new DbConnections.SQLiteConn();
     this.tabPage4          = new System.Windows.Forms.TabPage();
     this.aseConn1          = new DbConnections.AseConn();
     this.tabPage5          = new System.Windows.Forms.TabPage();
     this.dB2Conn1          = new DbConnections.DB2Conn();
     this.tabPage6          = new System.Windows.Forms.TabPage();
     this.postgreSqlConn1   = new DbConnections.PostgreSqlConn();
     this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
     this.pictureBox1       = new System.Windows.Forms.PictureBox();
     this.tcDatabase.SuspendLayout();
     this.tpAccess.SuspendLayout();
     this.tpSqlServer.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.tabPage2.SuspendLayout();
     this.tabPage3.SuspendLayout();
     this.tabPage4.SuspendLayout();
     this.tabPage5.SuspendLayout();
     this.tabPage6.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     this.SuspendLayout();
     //
     // btnConnect
     //
     this.btnConnect.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnConnect.Location = new System.Drawing.Point(439, 465);
     this.btnConnect.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btnConnect.Name     = "btnConnect";
     this.btnConnect.Size     = new System.Drawing.Size(96, 29);
     this.btnConnect.TabIndex = 1;
     this.btnConnect.Text     = "连接";
     this.btnConnect.UseVisualStyleBackColor = true;
     this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
     //
     // btnCancel
     //
     this.btnCancel.Anchor                  = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnCancel.DialogResult            = System.Windows.Forms.DialogResult.Cancel;
     this.btnCancel.Location                = new System.Drawing.Point(543, 465);
     this.btnCancel.Margin                  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btnCancel.Name                    = "btnCancel";
     this.btnCancel.Size                    = new System.Drawing.Size(100, 29);
     this.btnCancel.TabIndex                = 2;
     this.btnCancel.Text                    = "取消";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnCancel.Click                  += new System.EventHandler(this.btnCancel_Click);
     //
     // tcDatabase
     //
     this.tcDatabase.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.tcDatabase.Controls.Add(this.tpAccess);
     this.tcDatabase.Controls.Add(this.tpSqlServer);
     this.tcDatabase.Controls.Add(this.tabPage1);
     this.tcDatabase.Controls.Add(this.tabPage2);
     this.tcDatabase.Controls.Add(this.tabPage3);
     this.tcDatabase.Controls.Add(this.tabPage4);
     this.tcDatabase.Controls.Add(this.tabPage5);
     this.tcDatabase.Controls.Add(this.tabPage6);
     this.tcDatabase.Location      = new System.Drawing.Point(16, 15);
     this.tcDatabase.Margin        = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tcDatabase.Name          = "tcDatabase";
     this.tcDatabase.SelectedIndex = 0;
     this.tcDatabase.Size          = new System.Drawing.Size(627, 434);
     this.tcDatabase.TabIndex      = 0;
     //
     // tpAccess
     //
     this.tpAccess.Controls.Add(this.accessConn1);
     this.tpAccess.Location = new System.Drawing.Point(4, 25);
     this.tpAccess.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tpAccess.Name     = "tpAccess";
     this.tpAccess.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tpAccess.Size     = new System.Drawing.Size(619, 405);
     this.tpAccess.TabIndex = 0;
     this.tpAccess.Text     = "Access";
     this.tpAccess.UseVisualStyleBackColor = true;
     //
     // accessConn1
     //
     this.accessConn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=;Persist Security Info=True;";
     this.accessConn1.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.accessConn1.Location         = new System.Drawing.Point(4, 4);
     this.accessConn1.Margin           = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.accessConn1.Name             = "accessConn1";
     this.accessConn1.Size             = new System.Drawing.Size(611, 397);
     this.accessConn1.TabIndex         = 0;
     //
     // tpSqlServer
     //
     this.tpSqlServer.Controls.Add(this.sqlConn1);
     this.tpSqlServer.Location = new System.Drawing.Point(4, 25);
     this.tpSqlServer.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tpSqlServer.Name     = "tpSqlServer";
     this.tpSqlServer.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tpSqlServer.Size     = new System.Drawing.Size(619, 405);
     this.tpSqlServer.TabIndex = 1;
     this.tpSqlServer.Text     = "SqlServer";
     this.tpSqlServer.UseVisualStyleBackColor = true;
     //
     // sqlConn1
     //
     this.sqlConn1.ConnectionString = "Data Source=.;User ID=sa;Password=;Initial Catalog=;";
     this.sqlConn1.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.sqlConn1.IsSql2005        = false;
     this.sqlConn1.Location         = new System.Drawing.Point(4, 4);
     this.sqlConn1.Margin           = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.sqlConn1.Name             = "sqlConn1";
     this.sqlConn1.Size             = new System.Drawing.Size(611, 397);
     this.sqlConn1.TabIndex         = 0;
     //
     // tabPage1
     //
     this.tabPage1.Controls.Add(this.mySqlConn1);
     this.tabPage1.Location = new System.Drawing.Point(4, 25);
     this.tabPage1.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage1.Name     = "tabPage1";
     this.tabPage1.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage1.Size     = new System.Drawing.Size(619, 405);
     this.tabPage1.TabIndex = 2;
     this.tabPage1.Text     = "MySql";
     this.tabPage1.UseVisualStyleBackColor = true;
     //
     // mySqlConn1
     //
     this.mySqlConn1.ConnectionString = "Data Source=127.0.0.1;Port=3306;User Id=root;Password=;Database=;";
     this.mySqlConn1.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.mySqlConn1.Location         = new System.Drawing.Point(4, 4);
     this.mySqlConn1.Margin           = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.mySqlConn1.Name             = "mySqlConn1";
     this.mySqlConn1.Size             = new System.Drawing.Size(611, 397);
     this.mySqlConn1.TabIndex         = 0;
     //
     // tabPage2
     //
     this.tabPage2.Controls.Add(this.oracleConn1);
     this.tabPage2.Location = new System.Drawing.Point(4, 25);
     this.tabPage2.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage2.Name     = "tabPage2";
     this.tabPage2.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage2.Size     = new System.Drawing.Size(619, 405);
     this.tabPage2.TabIndex = 3;
     this.tabPage2.Text     = "Oracle";
     this.tabPage2.UseVisualStyleBackColor = true;
     //
     // oracleConn1
     //
     this.oracleConn1.ConnectionString = "Data Source=ORCL;Persist Security Info=True;User ID=SYSTEM;Password=;Unicode=True" +
                                         "";
     this.oracleConn1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.oracleConn1.Location = new System.Drawing.Point(4, 4);
     this.oracleConn1.Margin   = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.oracleConn1.Name     = "oracleConn1";
     this.oracleConn1.Size     = new System.Drawing.Size(611, 397);
     this.oracleConn1.TabIndex = 0;
     //
     // tabPage3
     //
     this.tabPage3.Controls.Add(this.sqLiteConn1);
     this.tabPage3.Location = new System.Drawing.Point(4, 25);
     this.tabPage3.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage3.Name     = "tabPage3";
     this.tabPage3.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage3.Size     = new System.Drawing.Size(619, 405);
     this.tabPage3.TabIndex = 4;
     this.tabPage3.Text     = "SQLite";
     this.tabPage3.UseVisualStyleBackColor = true;
     //
     // sqLiteConn1
     //
     this.sqLiteConn1.ConnectionString = "Data Source=;";
     this.sqLiteConn1.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.sqLiteConn1.Location         = new System.Drawing.Point(4, 4);
     this.sqLiteConn1.Margin           = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.sqLiteConn1.Name             = "sqLiteConn1";
     this.sqLiteConn1.Size             = new System.Drawing.Size(611, 397);
     this.sqLiteConn1.TabIndex         = 0;
     //
     // tabPage4
     //
     this.tabPage4.Controls.Add(this.aseConn1);
     this.tabPage4.Location = new System.Drawing.Point(4, 25);
     this.tabPage4.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage4.Name     = "tabPage4";
     this.tabPage4.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage4.Size     = new System.Drawing.Size(619, 405);
     this.tabPage4.TabIndex = 5;
     this.tabPage4.Text     = "Sybase";
     this.tabPage4.UseVisualStyleBackColor = true;
     //
     // aseConn1
     //
     this.aseConn1.ConnectionString = "Data Source=127.0.0.1;Port=5000;User Id=sa;Password=;Database=;persist security i" +
                                      "nfo=true";
     this.aseConn1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.aseConn1.Location = new System.Drawing.Point(4, 4);
     this.aseConn1.Margin   = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.aseConn1.Name     = "aseConn1";
     this.aseConn1.Size     = new System.Drawing.Size(611, 397);
     this.aseConn1.TabIndex = 0;
     //
     // tabPage5
     //
     this.tabPage5.Controls.Add(this.dB2Conn1);
     this.tabPage5.Location = new System.Drawing.Point(4, 25);
     this.tabPage5.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage5.Name     = "tabPage5";
     this.tabPage5.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage5.Size     = new System.Drawing.Size(619, 405);
     this.tabPage5.TabIndex = 6;
     this.tabPage5.Text     = "IBM DB2";
     this.tabPage5.UseVisualStyleBackColor = true;
     //
     // dB2Conn1
     //
     this.dB2Conn1.ConnectionString = "Database=sample;User ID=db2admin;Password=;Server=127.0.0.1;persist security info" +
                                      "=true";
     this.dB2Conn1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.dB2Conn1.Location = new System.Drawing.Point(4, 4);
     this.dB2Conn1.Margin   = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.dB2Conn1.Name     = "dB2Conn1";
     this.dB2Conn1.Size     = new System.Drawing.Size(611, 397);
     this.dB2Conn1.TabIndex = 0;
     //
     // tabPage6
     //
     this.tabPage6.Controls.Add(this.postgreSqlConn1);
     this.tabPage6.Location = new System.Drawing.Point(4, 25);
     this.tabPage6.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage6.Name     = "tabPage6";
     this.tabPage6.Padding  = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.tabPage6.Size     = new System.Drawing.Size(619, 405);
     this.tabPage6.TabIndex = 7;
     this.tabPage6.Text     = "PostgreSql";
     this.tabPage6.UseVisualStyleBackColor = true;
     //
     // postgreSqlConn1
     //
     this.postgreSqlConn1.ConnectionString = "Server=127.0.0.1;Port=5432;User Id=postgres;Password=;Database=postgres;Encoding=" +
                                             "UNICODE";
     this.postgreSqlConn1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.postgreSqlConn1.Location = new System.Drawing.Point(4, 4);
     this.postgreSqlConn1.Margin   = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.postgreSqlConn1.Name     = "postgreSqlConn1";
     this.postgreSqlConn1.Size     = new System.Drawing.Size(611, 397);
     this.postgreSqlConn1.TabIndex = 0;
     //
     // backgroundWorker1
     //
     this.backgroundWorker1.WorkerSupportsCancellation = true;
     this.backgroundWorker1.DoWork             += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
     this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
     //
     // pictureBox1
     //
     this.pictureBox1.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.pictureBox1.Image    = global::SocanCode.Properties.Resources.ajax;
     this.pictureBox1.Location = new System.Drawing.Point(0, 503);
     this.pictureBox1.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.pictureBox1.Name     = "pictureBox1";
     this.pictureBox1.Size     = new System.Drawing.Size(661, 21);
     this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.pictureBox1.TabIndex = 33;
     this.pictureBox1.TabStop  = false;
     this.pictureBox1.Visible  = false;
     //
     // ConnectionForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(661, 524);
     this.Controls.Add(this.pictureBox1);
     this.Controls.Add(this.tcDatabase);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnConnect);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Margin        = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.MaximizeBox   = false;
     this.MinimizeBox   = false;
     this.Name          = "ConnectionForm";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text          = "设置连接";
     this.tcDatabase.ResumeLayout(false);
     this.tpAccess.ResumeLayout(false);
     this.tpSqlServer.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.tabPage2.ResumeLayout(false);
     this.tabPage3.ResumeLayout(false);
     this.tabPage4.ResumeLayout(false);
     this.tabPage5.ResumeLayout(false);
     this.tabPage6.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     this.ResumeLayout(false);
 }
Пример #23
0
 public void LoadTable()
 {
     SQLiteConn.LoadTable(this);
 }
Пример #24
0
 public Agregar(Usuario usuario)
 {
     InitializeComponent();
     conn = new SQLiteConn("DataBase.db", true);
     user = usuario;
 }
Пример #25
0
 public Users(string filename)
 {
     db       = new SQLiteConn(filename, true);
     usuarios = db.GetAllUsers();
 }
Пример #26
0
 public UsuarioAlta()
 {
     InitializeComponent();
     conn = new SQLiteConn("Metflix.db", true);
 }
Пример #27
0
        public Ventas_por_Producto()
        {
            InitializeComponent();

            conn = new SQLiteConn("Terminal de venta.db", true);
        }
Пример #28
0
 public Confirm()
 {
     db = new SQLiteConn("data/MyStore.db", true);
     InitializeComponent();
 }