//建立数据库连接 public static SqlConnection GetSqlconnection() { string value = ConfigUtility.GetConnString("conn"); SqlConnection conn = new SqlConnection(value); conn.Open(); return(conn); }
static void Main(string[] args) { try { WriteConsoleAndLog("导入开始"); string path = ConfigUtility.GetConfigValue("filePath"); ImportBusiness.ImportStart(path); } catch (Exception ex) { Logger.GetLogger(ex.Message).Error(ex); WriteConsoleAndLog(ex.ToString()); } WriteConsoleAndLog("导入完成"); Console.Read(); }