70 lines
1.8 KiB
C#
70 lines
1.8 KiB
C#
using System;
|
|
using System.Configuration;
|
|
|
|
|
|
namespace VECV_WebApi.Common
|
|
{
|
|
class GlobalConstants
|
|
{
|
|
|
|
private GlobalConstants()
|
|
{
|
|
}
|
|
// To get connection string
|
|
public static string ConnectionString
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["Vecv_GoData"].ToString();
|
|
//ConfigurationSettings.AppSettings["Vecv_GoData"].ToString();
|
|
|
|
}
|
|
|
|
}
|
|
//Date Time Format
|
|
public static string DateTimeFormat
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["DateTimeFormat"].ToString();
|
|
}
|
|
|
|
}
|
|
//Date Time Format
|
|
public static string DateFormat
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["DateFormat"].ToString();
|
|
}
|
|
|
|
}
|
|
|
|
//Path At Which The Log file is Created and write
|
|
public static string ReportPath
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["Text_FilePath"].ToString() + "_" + DateTime.Now.ToString(GlobalConstants.DateFormat) + ".txt";
|
|
}
|
|
}
|
|
//Report Date Time Format
|
|
public static string ReportFormat
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["ReportFormat"].ToString();
|
|
}
|
|
|
|
}
|
|
|
|
//Get Excel File Path Format
|
|
public static string ExcelFilePath
|
|
{
|
|
get
|
|
{
|
|
return System.Configuration.ConfigurationManager.AppSettings["Excel_FilePath"].ToString();
|
|
}
|
|
}
|
|
}
|
|
} |