Beispiel #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));
        }
Beispiel #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");
            //}
        }