public ActionResult Edit(int id)
        {
            var           datamodel = _Cardrepo.GetCardDetailsInfo(id);
            CardViewModel model     = new CardViewModel()
            {
                CardNumber     = datamodel.CardNumber,
                CardStatusId   = datamodel.CardStatusId,
                CardTypeId     = datamodel.CardTypeId,
                CardValue      = datamodel.CardValue,
                isActive       = datamodel.isActive,
                ValidTill      = datamodel.ValidTill,
                CardStatusList = _Cardrepo.GetAllCardStatusList(),
                CardTypeList   = _Cardrepo.GetAllCardTypeList(),
            };

            model.CardRule = _Cardrepo.GetCardRule(model.CardTypeId);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("Edit", model));
            }
            return(View(model));
        }