Esempio n. 1
0
        public ActionResult ClubcardDetails(int id,string type)
        {
            CustomerAndCard cusAndCard = new CustomerAndCard();
            CustomerMgm custMgm = new CustomerMgm();
            ClubCardMgm cardMgm = new ClubCardMgm();
            var ddllist =GetddlList(DDLlist.CardType, false, null, null);
            ViewData["CardType"] =ddllist;
            if(type=="cust")
            {

                var recust = custMgm.GetCustomerByID(id);
                ClubCardVO recard = new ClubCardVO();
                if(recust.CardFlag==1)
                {
                    recard = cardMgm.GetClubCardByCustID(recust.CustomerID);
                }

                cusAndCard = GetCusAndCardModel(recard, recust);
            }
            else if(type == "card")
            {
                var recard = cardMgm.GetClubCardByID(id);
                var recust = custMgm.GetCustomerByID(recard.CustomerID);
                cusAndCard = GetCusAndCardModel(recard, recust);
            }

            return View(cusAndCard);
        }
Esempio n. 2
0
        public ActionResult RechargeCash()
        {
            int cardid = NullHelper.Convert<int>(Request["id"],0);
            if(cardid>0)
            {
                IClubCardMgm cardMgm = new ClubCardMgm();
                var card = cardMgm.GetClubCardByID(cardid);
                IClubCardTypeMgm ctypeMgm = new ClubCardTypeMgm();
                var ctype = ctypeMgm.GetCardTypeByID(card.ClubCardTypeID);
                ViewData["name"] = card.CustName;
                ViewData["cno"] = card.ClubCardNo;
                ViewData["ctype"] = card.ClubCardTypeName;
                ViewData["discount"] = ctype.PayDiscount;
            }
            else
            {
                ViewData["name"] = "";
                ViewData["cno"] = "";
                ViewData["ctype"] = "";
                ViewData["discount"] = "";
            }

            //recharge.
            return View();
        }
Esempio n. 3
0
        public JsonResult ChangeCardNoSub(int id, string CardNo)
        {
            IClubCardMgm cardMgm = new ClubCardMgm();

            ReturnedData data = new ReturnedData();
            try
            {
                ClubCardVO card = cardMgm.GetClubCardByID(id);
                if (card.CardStatus == 1)
                {
                    cardMgm.UpdateClubCardNo(id, CardNo);
                    data.Success = true;
                    data.Message = "会员卡补卡成功";
                }
                else
                {
                    data.Success = false;
                    data.Message = "该会员卡不处于挂失状态,不需要补卡";
                }

            }
            catch (Exception ex)
            {
                LogHandler.Error(ex.ToString());
                data.Success = false;
                data.Message = "会员卡补卡成功";
            }

            return Json(data, JsonRequestBehavior.AllowGet);
        }
Esempio n. 4
0
 //
 // GET: /ClubcardRecharge/
 public ActionResult Index()
 {
     int id = NullHelper.Convert<int>(Request["id"], 0);
     CustomerAndCard cuscard = new CustomerAndCard();
     if(id>0)
     {
         IClubCardMgm cardMgm = new ClubCardMgm();
         ClubCardVO card = cardMgm.GetClubCardByID(id);
         ICustomerMgm custMgm = new CustomerMgm();
         CustomerVO cust = custMgm.GetCustomerByID(card.CustomerID);
         cuscard = GetCusAndCardModel(card, cust);
     }
     return View(cuscard);
 }
Esempio n. 5
0
 public ActionResult RechargePkg()
 {
     int cardid = NullHelper.Convert<int>(Request["id"], 0);
     ClubCardMgm cardMgm = new ClubCardMgm();
     var card = cardMgm.GetClubCardByID(cardid);
     ViewData["PkgBag"] = GetddlList(DDLlist.Pkg, false, null, null);
     ViewBag.Data = card;
     return View();
 }
Esempio n. 6
0
 //
 // GET: /ClubcardConsume/
 public ActionResult Index()
 {
     ViewData["ConItem"] = GetddlList(DDLlist.PkgItem, false, null, null,null);
     //ViewData["CardPkgItem"]=GetddlList(DDLlist.CardPkg,null,null,null,)
     int id = NullHelper.Convert<int>(Request["id"], 0);
     ViewBag.StoreName = Emp.StroeName;
     ViewBag.Recivor = Emp.UserName;
     CustomerAndCard cuscard = new CustomerAndCard();
     if (id > 0)
     {
         IClubCardMgm cardMgm = new ClubCardMgm();
         ClubCardVO card = cardMgm.GetClubCardByID(id);
         ICustomerMgm custMgm = new CustomerMgm();
         CustomerVO cust = custMgm.GetCustomerByID(card.CustomerID);
         cuscard = GetCusAndCardModel(card, cust);
     }
     return View(cuscard);
 }
Esempio n. 7
0
 public ActionResult SetCardStatus(int id)
 {
     IClubCardMgm cardMgm = new ClubCardMgm();
     ClubCardVO card = cardMgm.GetClubCardByID(id);
     return View(card);
 }
Esempio n. 8
0
 public ActionResult ResetPassword(int id)
 {
     IClubCardMgm cardMgm = new ClubCardMgm();
     ClubCardVO card = cardMgm.GetClubCardByID(id);
     return View(card);
 }
Esempio n. 9
0
 public ActionResult ChangeCardNo(int id)
 {
     IClubCardMgm cardMgm = new ClubCardMgm();
     ClubCardVO card = cardMgm.GetClubCardByID(id);
     return View(card);
 }