Beispiel #1
0
        public DataTable GetReportList()
        {
            string    query        = "select report_code, report_name from " + ConfigManager.GetReportTableName() + " order by report_order;";
            DataTable dtReportList = GetDataTable(query);

            return(dtReportList);
        }
Beispiel #2
0
 public DataTable GetReportArguments(string reportCode)
 {
     try
     {
         string query = "select * from " + ConfigManager.GetReportTableName() + " where upper(report_code) ='" + reportCode.ToUpper() + "'";
         LogWriter.WriteLog(query);
         DataTable dtReportArgs = GetDataTable(query);
         return(dtReportArgs);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #3
0
        public string GetConnectionStringForReport(string REPORT_CODE)
        {
            string    query      = "select connection_string from " + ConfigManager.GetReportTableName() + " Where report_code='" + REPORT_CODE + "'";
            DataTable dtConSring = GetDataTable(query);

            if (dtConSring.Rows.Count > 0 && !dtConSring.Rows[0][0].ToString().Trim().Equals(string.Empty))
            {
                return(dtConSring.Rows[0][0].ToString());
            }
            else
            {
                return(string.Empty);
            }
        }
Beispiel #4
0
        public DataTable GetReportList(string roleName)
        {
            string    query        = string.Format("select report_code, report_name from {0} where report_code in (select report_code from report_authorization where role = '{1}') order by report_order", ConfigManager.GetReportTableName(), roleName);
            DataTable dtReportList = GetDataTable(query);

            return(dtReportList);
        }
Beispiel #5
0
        public DataRow GetReportConfigInfo(string reportCode)
        {
            DataTable dataTable = new DataTable();

            try
            {
                string query = "select field_caps, sql_from,detail_fieldsets from " + ConfigManager.GetReportTableName() + " where upper(report_code) ='" + reportCode.ToUpper() + "'";
                using (MySqlConnection dbConnection = new MySqlConnection(ConnectionString))
                {
                    using (MySqlDataAdapter adapter = new MySqlDataAdapter())
                    {
                        adapter.SelectCommand = new MySqlCommand(query, dbConnection);
                        adapter.Fill(dataTable);
                        return(dataTable.Rows[0]);
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception("From GetDataTable method:" + ex.Message);
            }
            return(null);
        }