//void GetAutoSQLName_SolutionsDB(string TableName)
        //{
        //    try
        //    {
        //        DataRowView myRow = (DataRowView)this.SolutionsDB_bindingSource.Current;
        //        if (myRow != null && myRow["SPFormat"].ToString().Length > 0)
        //        {
        //            this.txtSqlName_Insert.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Insert");
        //            this.txtSqlName_Delete.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Delete");
        //            this.txtSqlName_GetRecord.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "GetList");
        //            this.txtSqlName_Update.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Update");
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        CommonClasses.Messages.GeneralError(ex.Message, " Format");
        //    }
        //}
        void GetSelectDB_Tables()
        {
            try
            {
                DataTable myDataTable_SolutionsDBTables = new SolutionsDBTablesDAL().getList_Search(10000, 1, " SolutionsDBID= " + this.cmbSolutionsDB.SelectedValue.ToString(), "TableName");

                if (myDataTable_SolutionsDBTables != null)
                {
                    this.SolutionsDBTables_bindingSource.DataSource = myDataTable_SolutionsDBTables;
                }

                if (this.SolutionsDBTables_bindingSource.DataSource != null)
                {
                    this.cmbDBTables.DataSource = this.SolutionsDBTables_bindingSource;
                    this.cmbDBTables.DisplayMember = "TableName";
                    this.cmbDBTables.ValueMember = "ID";
                }

                this.cmbDBTables.Refresh();
                this.cmbDBTables.Update();

                this.GetSelectDB_TableColumns();
            }
            catch (Exception ex)
            {

            }
        }
        //void GetAutoSQLName_SolutionsDB(string TableName)
        //{
        //    try
        //    {
        //        DataRowView myRow = (DataRowView)this.SolutionsDB_bindingSource.Current;
        //        if (myRow != null && myRow["SPFormat"].ToString().Length > 0)
        //        {
        //            this.txtSqlName_Insert.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Insert");
        //            this.txtSqlName_Delete.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Delete");
        //            this.txtSqlName_GetRecord.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "GetList");
        //            this.txtSqlName_Update.Text = myRow["SPFormat"].ToString().Replace("{TableName}", TableName).Replace("{Action}", "Update");
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        CommonClasses.Messages.GeneralError(ex.Message, " Format");
        //    }
        //}
        void GetSelectDB_Tables()
        {
            try
            {
                //DataTable myDataTable_SolutionsDBTables = new SolutionsDBTablesDAL().getList_Search(10000, 1, " SolutionsDBID= " + this.cmbSolutionsDB.SelectedValue.ToString(), "TableName");

                DataTable myDataTable_SolutionsDBTables = new SolutionsDBTablesDAL().getUnMappedTables(int.Parse(this.cmbSolutions.SelectedValue.ToString()), int.Parse(this.cmbSolutionsDB.SelectedValue.ToString()));

                if (myDataTable_SolutionsDBTables != null)
                {
                    this.SolutionsDBTables_bindingSource.DataSource = myDataTable_SolutionsDBTables;
                }

                if (this.SolutionsDBTables_bindingSource.DataSource != null)
                {
                    this.dvgUnMappedTables.DataSource = this.SolutionsDBTables_bindingSource;
                    this.dvgUnMappedTables.Columns["clmName"].DataPropertyName = "TableName";
                }

                this.dvgUnMappedTables.Refresh();
                this.dvgUnMappedTables.Update();

            }
            catch (Exception ex)
            {

            }
        }
        void MySQL_Connect_GetTable()
        {
            try
            {
                DataRowView myRow = (DataRowView)this.SolutionsDB_bindingSource.Current;
                SolutionsDBTablesDAL SolutionsDBTablesDAL = new SolutionsDBTablesDAL();

                SolutionsDBTablesDAL.SolutionsDBID = this.CurrentDBID;
                SolutionsDBTablesDAL.isActive = true;
                SolutionsDBTablesDAL.UserId = Security.UserID;

                if (myRow != null && myRow["DBType"].ToString().ToLower() == "my sql")
                {
                    mySql_DB_Tables = new DataTable();
                    this.mySqlDBFunctions.Server = myRow["ServerName"].ToString();
                    this.mySqlDBFunctions.DatabaseName = myRow["DBName"].ToString();
                    this.mySqlDBFunctions.DBUserName = myRow["UserName"].ToString();
                    this.mySqlDBFunctions.DBPassword = myRow["DPassword"].ToString();

                    if (this.mySqlDBFunctions.getConnection().State == ConnectionState.Open)
                    {
                        mySql_DB_Tables = this.mySqlDBFunctions.getTablesList();

                        if (mySql_DB_Tables != null && mySql_DB_Tables.Rows.Count > 0)
                        {
                            foreach (DataRow myTableRow in mySql_DB_Tables.Rows)
                            {
                                SolutionsDBTablesDAL.TableName = myTableRow["Tables"].ToString();
                                SolutionsDBTablesDAL.Insert();
                            }

                        }

                    }
                    else
                    {
                        CommonClasses.Messages.GeneralError("Invalid server information.", " My DB SQL Connection");
                    }

                }
                else
                {
                    CommonClasses.Messages.GeneralError("Selected DB is not My Sql DB.", " My DB SQL Connection");
                }

            }
            catch (Exception ex)
            {
                CommonClasses.Messages.GeneralError(ex.Message, " My DB SQL Connection");
            }
        }