예제 #1
0
        public void RefreshVisitList()
        {
            CRM_VisitLogic    cvs   = new CRM_VisitLogic();
            SystemUserLogic   sul   = new SystemUserLogic();
            CRM_CustomerLogic ccusl = new CRM_CustomerLogic();
            CRM_ContactLogic  cconl = new CRM_ContactLogic();
            var showvisitlist       = from visit in cvs.GetAll()
                                      join customer in ccusl.GetAll()
                                      on visit.CusId equals customer.Id
                                      join user in sul.GetAllUsers()
                                      on visit.VSuperiorId equals user.Id
                                      join contact in cconl.GetAll()
                                      on visit.ConId equals contact.Id
                                      select new
            {
                Id                  = visit.Id,
                CusCode             = customer.CusCode,
                CusName             = customer.CusName,
                UserName            = user.UserName,
                ContactName         = contact.Name,
                VTitle              = visit.VTitle,
                VContent            = visit.VContent,
                VType               = visit.VType,
                VPlanDate           = visit.VPlanDate,
                VCompleteDate       = visit.VCompleteDate,
                VSuperiorDate       = visit.VSuperiorDate,
                VSuperiorSuggestion = visit.VSuperiorSuggestion,
                VStatus             = visit.VStatus
            };

            this.dgvVisitInfo.DataSource = showvisitlist.ToList();
        }
예제 #2
0
        /// <summary>
        /// 根据销售员id显示客户信息
        /// </summary>
        public void LoadCusInfo()
        {
            var showCusList = from customer in ccl.GetAll(saleid)
                              join user in sul.GetAllUsers()
                              on customer.SaleId equals user.Id
                              select new
            {
                Id            = customer.Id,
                CusCode       = customer.CusCode,
                CusName       = customer.CusName,
                Province      = customer.Province,
                City          = customer.City,
                BussinessType = customer.BussinessType,
                Scale         = customer.Scale,
                CusType       = customer.CusType,
                PhoneNum      = customer.PhoneNum,
                HomePage      = customer.HomePage,
                Address       = customer.Address,
                UserName      = user.UserName,
                SaleId        = customer.SaleId
            };

            dgvCusInfo.DataSource = showCusList.ToList();
        }
예제 #3
0
        /// <summary>
        /// 显示联系人列表
        /// </summary>
        public void LoadContactList()
        {
            dgvContactInfo.DataSource = null;
            var querylist = from contact in ccl.GetAll()
                            join customer in cusl.GetAll()
                            on contact.CusId equals customer.Id
                            select new
            {
                Id       = contact.Id,
                CusName  = customer.CusName,
                Name     = contact.Name,
                Gender   = contact.Gender,
                JiGuan   = contact.JiGuan,
                DeptName = contact.DeptName,
                Position = contact.Position,
                Mobile   = contact.Mobile,
                WX       = contact.WX,
                Email    = contact.Email
            };

            dgvContactInfo.DataSource = querylist.ToList();
        }