Esempio n. 1
0
        public void GetAllCall()
        {
            callTable.Clear();
            CallList.Clear();
            string sql = "select * from CallLogTable where CallType=0 or CallType=2";

            callTable = AccessHelper.Adapter(sql, null);
            for (int i = callTable.Rows.Count - 1; i >= 0; i--)
            {
                try
                {
                    var dm = new DataModel();
                    dm.SetData(callTable.Rows[i]);
                    if (dm.CallerID == "")
                    {
                        continue;
                    }
                    CallList.Add(dm);
                }
                catch (Exception ex)
                {
                    Log4Helper.Error(this.GetType(), "数据库存在异常数据", ex);
                    continue;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 获取媒体文件信息
        /// </summary>
        /// <param name="_callID"></param>
        /// <param name="_date"></param>
        /// <returns></returns>
        public static DataTable GetMediaInfo(string _callID, string _date)
        {
            string sql = "select * from CallLogTable where CallerID = @CallerID and StartDate = @StartDate order by ID desc";//and StartDate = @StartDate order by ID desc";

            OleDbParameter[] para =
            {
                new OleDbParameter("@CallerID",  OleDbType.VarChar),
                new OleDbParameter("@StartDate", OleDbType.VarChar),
            };
            para[0].Value = _callID;
            para[1].Value = _date;

            return(AccessHelper.Adapter(sql, para));
        }