Exemplo n.º 1
0
        public List <CallDetails> GetAllCallData(long Id)
        {
            VoxBayDataAccess obj = new VoxBayDataAccess();
            var result           = obj.GetAllCallDetails(Id);
            var callDetails      = new List <CallDetails>();

            foreach (DataRow dr in result.Rows)
            {
                var callData = new CallDetails();
                callData.CallType  = dr["CallType"].ToString();
                callData.AgentName = dr["AgentNumber"].ToString();
                callData.Duration  = Convert.ToInt32(dr["Duration"] == System.DBNull.Value ? 0 : dr["Duration"]);
                callData.CallTime  = dr["Date"].ToString();
                callData.Recording = dr["Recording"].ToString();
                callDetails.Add(callData);
            }
            return(callDetails);
        }