示例#1
0
 public bool CreateSWJL(string start, string end, out string msg)
 {
     try
     {
         log.WriteLog("查询" + start + "-" + end + "死亡记录数据");
         log.WriteLog(SqlStr.SwjlSql(start, end));
         DataTable data = sqlClient.ExecuteQuery(SqlStr.SwjlSql(start, end), CommandType.Text);
         if (data.Rows.Count < 0)
         {
             msg = "无死亡记录数据\n";
         }
         else
         {
             CSVUtil.SaveCSV(data, fluUrl + "\\hdr_死亡记录" + start + "-" + end + ".csv");
             CSVUtil.SaveCSV(data, backUpUrl + "\\hdr_死亡记录" + start + "-" + end + ".csv");
             msg = "死亡记录数据生成成功\n";
         }
         log.WriteLog("查询成功");
     }
     catch (Exception ex)
     {
         msg = ex.Message;
         log.WriteLog("查询失败:" + ex.Message, LogType.Error);
         return(false);
     }
     return(true);
 }
示例#2
0
 public bool CreateMZHZY(string start, string end, out string msg)
 {
     try
     {
         //执行两个门诊病案存储过程
         sqlClient.ExecuteSP(SqlStr.MZ_MZLGFY);
         sqlClient.ExecuteSP(SqlStr.MZ_MZLGPELBLE);
         log.WriteLog("查询" + start + "-" + end + "门诊和在院流感数据");
         log.WriteLog(SqlStr.MzhzySql(start, end));
         DataTable data = sqlClient.ExecuteQuery(SqlStr.MzhzySql(start, end), CommandType.Text);
         if (data.Rows.Count < 0)
         {
             msg = "无门诊和在院流感数据\n";
         }
         else
         {
             CSVUtil.SaveCSV(data, fluUrl + "\\flu_门诊和在院流感" + start + "-" + end + ".csv");
             CSVUtil.SaveCSV(data, backUpUrl + "\\flu_门诊和在院流感" + start + "-" + end + ".csv");
             msg = "门诊和在院流感数据生成成功\n";
         }
         log.WriteLog("查询成功");
     }
     catch (Exception ex)
     {
         msg = ex.Message;
         log.WriteLog("查询失败:" + ex.Message, LogType.Error);
         return(false);
     }
     return(true);
 }