예제 #1
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            Entity.DbLoginFor _DbLoginFor = new Entity.DbLoginFor();
            _DbLoginFor.ConnString    = this.textBox6.Text.Trim();
            _DbLoginFor.Db_Type       = 3;
            _DbLoginFor.DBName        = string.Empty;
            _DbLoginFor.LoginDb_Descp = "Oracle_" + this.textBox1.Text.Trim() + "_" + this.textBox3.Text.Trim();
            _DbLoginFor.LoginDb_Id    = Repository.StringUnitity.GetNewGUID();
            _DbLoginFor.PassWord      = this.textBox4.Text.Trim();
            _DbLoginFor.ServerIP      = this.textBox1.Text.Trim();
            _DbLoginFor.ServerName    = this.textBox2.Text.Trim();
            _DbLoginFor.ServerPort    = Convert.ToInt32(this.textBox5.Text.Trim());
            _DbLoginFor.UserName      = this.textBox3.Text.Trim();
            try
            {
                Core.CoreDbLoginFor _CoreDbLoginFor = new Core.CoreDbLoginFor();

                _CoreDbLoginFor.AddEntity(_DbLoginFor);
                this.Close();
            }

            catch (Exception ex)
            {
                Repository.MsgBox.Warning("新增失败:" + ex.Message);
            }
        }
예제 #2
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            Entity.DbLoginFor _DbLoginFor = new Entity.DbLoginFor();
            _DbLoginFor.ConnString    = this.textBox2.Text.Trim();
            _DbLoginFor.Db_Type       = 1;
            _DbLoginFor.DBName        = string.Empty;
            _DbLoginFor.LoginDb_Descp = "SQLite_" + System.IO.Path.GetFileName(this.textBox1.Text.Trim());
            _DbLoginFor.LoginDb_Id    = Repository.StringUnitity.GetNewGUID();
            _DbLoginFor.PassWord      = string.Empty;
            _DbLoginFor.ServerIP      = this.textBox1.Text.Trim();
            _DbLoginFor.ServerName    = string.Empty;
            _DbLoginFor.ServerPort    = 0;
            _DbLoginFor.UserName      = string.Empty;
            try
            {
                Core.CoreDbLoginFor _CoreDbLoginFor = new Core.CoreDbLoginFor();
                _CoreDbLoginFor.AddEntity(_DbLoginFor);
                this.Close();
            }

            catch (Exception ex)
            {
                Repository.MsgBox.Warning("新增失败:" + ex.Message);
            }
        }
예제 #3
0
 private void simpleButton2_Click(object sender, EventArgs e)
 {
     //保存
     Entity.DbLoginFor _DbLoginFor = new Entity.DbLoginFor();
     _DbLoginFor.ConnString    = CreateConnString();
     _DbLoginFor.Db_Type       = 2;
     _DbLoginFor.DBName        = this.comboBox2.Text.Trim();
     _DbLoginFor.LoginDb_Descp = "MSSQL_" + this.textBox1.Text.Trim() + "_" + _DbLoginFor.DBName;
     _DbLoginFor.LoginDb_Id    = Repository.StringUnitity.GetNewGUID();
     _DbLoginFor.ServerIP      = this.textBox1.Text.Trim();
     _DbLoginFor.ServerName    = string.Empty;
     _DbLoginFor.ServerPort    = 0;
     if (this.comboBox1.SelectedIndex == 0)
     {
         _DbLoginFor.PassWord = this.textBox3.Text.Trim();
         _DbLoginFor.UserName = this.textBox2.Text.Trim();
     }
     else
     {
         _DbLoginFor.PassWord = string.Empty;
         _DbLoginFor.UserName = string.Empty;
     }
     Core.CoreDbLoginFor _CoreDbLoginFor = new Core.CoreDbLoginFor();
     try
     {
         _CoreDbLoginFor.AddEntity(_DbLoginFor);
         this.Close();
     }
     catch (Exception ex)
     {
         Repository.MsgBox.Warning("新增失败:" + ex.Message);
     }
 }