public void Query() { try { SMSLog entityS = new SMSLog(_conn); StringBuilder Cndstring = new StringBuilder(); Cndstring.Append(entityS.SLG_MESSAGE.cds_NotEqual("Successful")); Cndstring.Append(" and "); Cndstring.Append(entityS.SLG_DTTM.cds_BetweenDate(DateTime.Now.Date, DateTime.Now.Date)); entityS.query(null, Cndstring.ToString(), ""); while (entityS.read()) { switch (MoblieType) { case "SMSTaiwanMoblie": //QueryTaiwanMoblie(); break; case "SMSCHTMoblie": QueryCHTMoblie(entityS.SLG_SERNO.ToString(), entityS.SLG_CONTENT.ToString()); break; default: break; } } } catch (Exception ex) { string ErrMessage = ex.Message; } }