public bx_agentpoint FindWorkAgentpoint(int agentId)
        {
            bx_agentpoint agentpoint = new bx_agentpoint();

            try
            {
                agentpoint = DataContextFactory.GetDataContext().bx_agentpoint.OrderByDescending(o => o.ModifiTime).FirstOrDefault(x => x.AgentId == agentId && x.IsShowForWebChat == true && x.Deleted == false);
            }
            catch (Exception ex)
            {
                logError.Info("发生异常:" + ex.Source + "\n" + ex.StackTrace + "\n" + ex.Message + "\n" + ex.InnerException);
            }
            return(agentpoint);
        }
        public bx_agentpoint FindById(int agentpointId)
        {
            bx_agentpoint agentpoint = new bx_agentpoint();

            try
            {
                agentpoint = DataContextFactory.GetDataContext().bx_agentpoint.FirstOrDefault(x => x.id == agentpointId && x.Deleted == false);
            }
            catch (Exception ex)
            {
                logError.Info("发生异常:" + ex.Source + "\n" + ex.StackTrace + "\n" + ex.Message + "\n" + ex.InnerException);
            }
            return(agentpoint);
        }
Пример #3
0
        public static AgentPoint ConverToViewModel(this bx_agentpoint agentpoint)
        {
            AgentPoint vm = new AgentPoint();

            if (agentpoint != null)
            {
                vm = new AgentPoint
                {
                    id          = agentpoint.id,
                    AgentId     = agentpoint.AgentId,
                    Address     = agentpoint.Address,
                    Phone       = agentpoint.Phone,
                    create_time = agentpoint.create_time
                }
            }
            ;
            return(vm);
        }
    }