コード例 #1
0
        public void GetTotalRecordCount()
        {
            try
            {
                if (ViewState["SqlString"] != null && ViewState["SqlString"].ToString() != "")
                {
                    int    TotalRecordCount = 0;
                    string _sqlstring       = ViewState["SqlString"].ToString();
                    if (ConditionString != "")
                    {
                        _sqlstring += " WHERE " + ConditionString;
                    }

                    string DBConnectString = null;
                    if (ViewState["DBConnectString"] != null)
                    {
                        DBConnectString = (string)ViewState["DBConnectString"];
                    }
                    TreeTableBLL.ExecSqlStringByTotalCount(DBConnectString, _sqlstring, out TotalRecordCount);
                    ViewState["TotalRecordCount"] = TotalRecordCount;
                }
            }
            catch (System.Exception err)
            {
                LogWriter.WriteLog("UC_GridView.FillDataSource: TreeTableBLL.ExecSqlString Error!", err);
                LogWriter.WriteLog(ViewState["SqlString"].ToString());
            }
        }