public void BindSqlGroupListGrid()
    {
        messageSqlContent.InnerHtml = "";
        _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
        DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
        dbSearchDBEntity.SqlContent = txtSql.Text.Trim();
        _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);

        DataSet dsResult = new DataSet();

        try
        {
            dsResult = DbSearchBP.ItemSqlSelect(_dbSearchEntity).QueryResult;
            gridViewSql.DataSource = dsResult.Tables[0].DefaultView;
            gridViewSql.DataBind();
        }
        catch
        {
            messageSqlContent.InnerHtml = GetLocalResourceObject("Error1").ToString();
        }
    }
    public void BindGroupListGrid()
    {
        messageContent.InnerHtml = "";
        _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
        DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
        dbSearchDBEntity.SqlContent = txtManualAdd.Text.Trim();
        _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);

        DataSet dsResult = new DataSet();

        try
        {
            dsResult = DbSearchBP.ItemSelect(_dbSearchEntity).QueryResult;
            gridViewCSDBResultList.DataSource = dsResult.Tables[0].DefaultView;
            //gridViewCSDBSearchList.DataKeyNames = new string[] { "ID" };//主键
            gridViewCSDBResultList.DataBind();
        }
        catch
        {
            messageContent.InnerHtml = GetLocalResourceObject("Error1").ToString();
        }

        //if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0)
        //{
        //    messageContent.InnerHtml = GetLocalResourceObject("InsertSuccess").ToString();
        //}
        //else
        //{
        //    messageContent.InnerHtml = GetLocalResourceObject("UpdateSuccess").ToString();
        //}
    }
    //导出Excel文件
    protected void btnExport_Click(object sender, EventArgs e)
    {
        messageContent.InnerHtml = "";
        _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
        DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
        dbSearchDBEntity.SqlContent = txtManualAdd.Text.Trim();
        _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);

        DataSet dsResult = new DataSet();

        try
        {
            dsResult = DbSearchBP.ItemSelect(_dbSearchEntity).QueryResult;
            gridViewCSDBResultList.DataSource = dsResult.Tables[0].DefaultView;
            //gridViewCSDBSearchList.DataKeyNames = new string[] { "ID" };//主键
            gridViewCSDBResultList.DataBind();
        }
        catch
        {
            messageContent.InnerHtml = GetLocalResourceObject("Error1").ToString();
            return;
        }

        if (dsResult.Tables.Count == 0 || dsResult.Tables[0].Rows.Count == 0)
        {
            messageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString();
            return;
        }

        CommonFunction.ExportExcelForLM(dsResult);
    }
 private DataSet GetTreeViewTable()
 {
     DataTable dtResult = new DataTable();
     messageContent.InnerHtml = "";
     _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
     _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
     _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
     _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
     _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
     DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
     _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);
     return DbSearchBP.MenuSelect(_dbSearchEntity).QueryResult;
 }
    private void GetTableColumsList()
    {
        messageContent.InnerHtml = "";
        _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
        DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
        dbSearchDBEntity.TableID = tvTableList.SelectedValue;
        _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);

        DataSet dsResult = DbSearchBP.TableColumsSelect(_dbSearchEntity).QueryResult;

        //GridviewControl.GridViewDataBind(gridViewCSDBSearchList, dsResult.Tables[0]);

        gridViewCSDBSearchList.DataSource = dsResult.Tables[0].DefaultView;
        //gridViewCSDBSearchList.DataKeyNames = new string[] { "ID" };//主键
        gridViewCSDBSearchList.DataBind();
    }
    private void GetSqlTableColumsList()
    {
        messageContent.InnerHtml = "";
        _dbSearchEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _dbSearchEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _dbSearchEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _dbSearchEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _dbSearchEntity.DbSearchDBEntity = new List<DbSearchDBEntity>();
        DbSearchDBEntity dbSearchDBEntity = new DbSearchDBEntity();
        dbSearchDBEntity.TableID = TreeViewSql.SelectedValue;
        _dbSearchEntity.DbSearchDBEntity.Add(dbSearchDBEntity);

        //DataSet dsResult = DbSearchBP.SqlTableColumsSelect(_dbSearchEntity).QueryResult;

        //gridViewSql.DataSource = dsResult.Tables[0].DefaultView;
        //gridViewSql.DataBind();
    }