Пример #1
0
        public PartialViewResult PopInfoList(string bid, string shopCode)
        {
            TaskMemberApp                app     = new TaskMemberApp();
            marketShopApp                shopApp = new marketShopApp();
            var                          items   = app.getData(bid, shopCode);
            List <MemberListModel>       list    = new List <MemberListModel>();
            V_CRM_MEMBER_APPTableAdapter ad      = new V_CRM_MEMBER_APPTableAdapter();

            foreach (var item in items)
            {
                var temp = new MemberListModel()
                {
                    memberNo    = item.memberId,
                    mf_memberNo = item.mfMemberId,
                    shop        = shopApp.getShopName(item.shopCode),
                    pic_Url     = item.picUrl == null ? "" : item.picUrl.Replace("/data/upload", "https://iretailerapp.flnet.com/MessagesQC"),
                    time        = item.InTime.Value.ToString("yyyy-MM-dd HH:mm"),
                    name        = ""
                };
                var table = ad.GetDataByNo(item.mfMemberId);
                if (table.Count > 0)
                {
                    temp.name = table[0].IsMEMBER_NAMENull() ? "" : table[0].MEMBER_NAME;
                }
                list.Add(temp);
            }
            return(PartialView("_POPListSubView", list));
        }
Пример #2
0
        public ActionResult PopInfo(string bid, string shopCode, string userId)
        {
            // if (billNo.Equals("MBSTT201802061701585396"))
            //{
            TaskMemberApp                app     = new TaskMemberApp();
            marketShopApp                shopApp = new marketShopApp();
            var                          items   = app.getData(bid, shopCode);
            List <MemberListModel>       list    = new List <MemberListModel>();
            V_CRM_MEMBER_APPTableAdapter ad      = new V_CRM_MEMBER_APPTableAdapter();

            foreach (var item in items)
            {
                var temp = new MemberListModel()
                {
                    memberNo    = item.memberId,
                    mf_memberNo = item.mfMemberId,
                    shop        = shopApp.getShopName(item.shopCode),
                    pic_Url     = item.picUrl == null ? "" : item.picUrl.Replace("/data/upload", "https://iretailerapp.flnet.com/MessagesQC"),
                    time        = item.InTime.Value.ToString("yyyy-MM-dd HH:mm"), name = ""
                };
                var table = ad.GetDataByNo(item.mfMemberId);
                if (table.Count > 0)
                {
                    temp.name = table[0].IsMEMBER_NAMENull() ? "" : table[0].MEMBER_NAME;
                }
                list.Add(temp);
            }
            ViewData["vModel"]   = list;
            ViewData["bid"]      = bid;
            ViewData["userId"]   = userId;
            ViewData["shopCode"] = shopCode;
            return(View("POPListView"));
            //}
            //else
            //{
            //  return View("POPView2");
            //}
        }
Пример #3
0
        public PartialViewResult popView(string mfid, string userId)
        {
            MemberMode    model   = new MemberMode();
            marketShopApp shopApp = new marketShopApp();


            V_CRM_MEMBER_APPTableAdapter ad = new V_CRM_MEMBER_APPTableAdapter();
            var table = ad.GetDataByMFID(mfid);

            if (table.Count > 0)
            {
                var row = table[0];
                model = new MemberMode()
                {
                    adder            = row.MEMBER_ADDR,
                    LAST_BUY_DATE    = row.LAST_BUY_DATE,
                    LAST_BUY_MODEL   = row.LAST_BUY_MODEL,
                    LAST_BUY_QTY     = (int)row.LAST_BUY_QTY,
                    LAST_INSHOP      = shopApp.getShopName(row.LAST_INSHOP_CODE),
                    LAST_INSHOP_TIME = row.LAST_INSHOP_TIME,
                    MEMBER_NO        = row.MEMBER_NO,
                    MF_MEMBER_ID     = row.MF_MEMBER_ID,
                    MEMO             = row.MEMO,
                    name             = row.MEMBER_NAME,
                    phoneNumber      = row.MOBILE,
                    weiChat          = row.WECHAT_NO,
                    VISIT_COUNT      = (int)row.VISIT_COUNT,
                    picRUL           = row.IsIMGFACETIMENull() ? "" : row.IMGFACETIME.Replace("/data/upload", "https://iretailerapp.flnet.com/MessagesQC"),
                    age         = (int)row.AGE, MemberType = row.CG_TYPE_NAME, regShop = shopApp.getShopName(row.REG_SHOP_CODE),
                    regShopCode = row.REG_SHOP_CODE
                };
                if (model.regShopCode == null)
                {
                    List <marketSalesShopEntity> shops = shopApp.getShopByUserId(userId);
                    if (shops.Count > 0)
                    {
                        model.regShop     = shops[0].SHOP_NAME;
                        model.regShopCode = shops[0].SHOP_CODE;
                    }
                }
                model.IOList = new List <Member_IOSHOPMode>();
                V_CRM_MEMBER_IOSHOP_LOG_APPTableAdapter IOAD = new V_CRM_MEMBER_IOSHOP_LOG_APPTableAdapter();
                var iologs = IOAD.GetDataByMFID(row.MF_MEMBER_ID);
                foreach (var item in iologs)
                {
                    model.IOList.Add(new Member_IOSHOPMode()
                    {
                        SHOP_NAME = item.SHOP_NAME, Time = item.VISIT_TIME
                    });
                }
                model.ByList = new List <Member_ByMode>();
                V_CRM_MEMBER_HISSALES_APPTableAdapter byAD = new V_CRM_MEMBER_HISSALES_APPTableAdapter();
                var bylogs = byAD.GetData(row.MOBILE);
                foreach (var item in bylogs)
                {
                    model.ByList.Add(new Member_ByMode()
                    {
                        byTime = item.BUY_DATE, MAC = item.BUY_MODEL, qty = (int)item.BUY_QTY
                    });
                }
                model.lookMacsList = new List <string>();
                if (!row.IsFOLLOW_PRODUCTNull())
                {
                    model.lookMacsList.AddRange(row.FOLLOW_PRODUCT.Split(",".ToCharArray()));
                }
            }
            return(PartialView("POPView", model));
        }