using MySql.Data.MySqlClient; using System; using System.Collections.Generic; using System.Data; using System.Data.OracleClient; namespace WX.CRM.DAL.Res { public class AutoDial_Dal { public DataTable GetAutoDialPool() { try { var param = new List { new OracleParameter() { ParameterName = "v_data", OracleType = OracleType.Cursor,Direction = ParameterDirection.Output } }; DataSet dest = OracleHelper.DataQueray(CommandType.StoredProcedure, "PAK_RES_AUTODIAL.GetAutoDialPool", param.ToArray()); return dest.Tables[0]; } catch { throw; } } public void ClearAutoDialPool() { try { OracleHelper.ExecuteNonQuery(OracleHelper.AYCRMConn, CommandType.StoredProcedure, "PAK_RES_AUTODIAL.ClearAutoDialPool", null); } catch { throw; } } public int InsertDataToMySql(string mobile, string resid) { try { string sql = "insert into AutoCall(mobile,resid)values(@mobile,@resid)"; var param = new List { new MySqlParameter("@mobile",mobile), new MySqlParameter("@resid",resid) }; return new MySqlDbHelper().ExecuteNonQuery(sql, param.ToArray()); } catch { throw; } } public DataTable GetAutoDialDayReport(DateTime stime, DateTime etime) { try { var param = new List { new OracleParameter() { ParameterName = "v_stime", OracleType = OracleType.DateTime, Value = stime }, new OracleParameter() { ParameterName = "v_etime", OracleType = OracleType.DateTime, Value = etime }, new OracleParameter() { ParameterName = "v_data", OracleType = OracleType.Cursor,Direction = ParameterDirection.Output } }; DataSet dest = OracleHelper.DataQueray(CommandType.StoredProcedure, "PAK_RES_AUTODIAL.GetDayReport", param.ToArray()); return dest.Tables[0]; } catch { throw; } } } }