public ActionResult VianetBillInquiry()
        {
            VianetBillInquiryModel wpm = new VianetBillInquiryModel();
            var productdetails         = GetVianetproductDetails();

            wpm.ProductLogo = productdetails.ProductLogo;

            string AgentId  = Session["AgentId"].ToString();
            var    TxnLimit = _transactionLimit.GetTransactionLimitForUser(AgentId);
            var    trangrid = ProjectGrid.TransactionLimit(TxnLimit);

            ViewData["trangrid"] = trangrid;

            return(View(wpm));
        }
        public ActionResult VianetBillInquiry(VianetBillInquiryModel wpm)
        {
            VianetBillInquiryCommon wpc = wpm.MapObject <VianetBillInquiryCommon>();
            var productdetails          = GetVianetproductDetails();

            wpm.ProductLogo     = productdetails.ProductLogo;
            wpm.CommissionType  = productdetails.CommissionType;
            wpm.CommissionValue = productdetails.CommissionValue;

            wpc.IpAddress = ApplicationUtilities.GetIP();
            wpc.UserId    = ApplicationUtilities.GetSessionValue("userid").ToString();
            var inquiry = _vianet.CheckVianetAccount(wpc);
            VianetBillInquiryResponseModel vnet = new VianetBillInquiryResponseModel();

            vnet.ProductLogo     = productdetails.ProductLogo;
            vnet.CommissionType  = productdetails.CommissionType;
            vnet.CommissionValue = productdetails.CommissionValue;
            vnet.ProductId       = productdetails.ProductId.EncryptParameter();
            if (inquiry.GatewayName.ToUpper() == "PRABHUPAY")
            {
                if (inquiry.Code == shared.Models.ResponseCode.Success)
                {
                    var obj = Newtonsoft.Json.JsonConvert.SerializeObject(inquiry.Data);
                    var prabhupayinqresp = Newtonsoft.Json.JsonConvert.DeserializeObject <PrabhuPayVianetBillInquiryResponseModel>(obj);
                    vnet.CustomerName     = prabhupayinqresp.CustomerName;
                    vnet.VianetCustomerId = prabhupayinqresp.VianetCustomerId;
                    vnet.PaymentMessage   = prabhupayinqresp.PaymentMessage;
                    List <PlansModel> lst = new List <PlansModel>();
                    foreach (var item in prabhupayinqresp.RenewalPlans)
                    {
                        PlansModel plan = new PlansModel()
                        {
                            PlanId          = item.PlanId,
                            PlanAmount      = item.PlanAmount,
                            PlanName        = item.PlanName,
                            PlanDescription = item.PlanDescription
                        };
                        lst.Add(plan);
                    }
                    //wlink.RenewalPlans = lst;
                    //var planlst = DropdownPlan(lst);
                    //if (planlst == null)
                    //{
                    //    ViewBag.Planlist = null;
                    //}
                    ViewBag.Planlist       = ApplicationUtilities.SetDDLValue(DropdownPlan(lst), "", "--Select--");
                    vnet.Encryptioncontent = (prabhupayinqresp.VianetCustomerId + prabhupayinqresp.BillAmount).EncryptParameter();

                    string AgentId  = Session["AgentId"].ToString();
                    var    TxnLimit = _transactionLimit.GetTransactionLimitForUser(AgentId);
                    var    trangrid = ProjectGrid.TransactionLimit(TxnLimit);
                    ViewData["trangrid"] = trangrid;

                    return(View("VianetBillPayment", vnet));
                }
                else
                {
                    string AgentId  = Session["AgentId"].ToString();
                    var    TxnLimit = _transactionLimit.GetTransactionLimitForUser(AgentId);
                    var    trangrid = ProjectGrid.TransactionLimit(TxnLimit);
                    ViewData["trangrid"] = trangrid;

                    this.ShowPopup(1, inquiry.Message);
                    return(View(wpm));
                }
            }
            this.ShowPopup(1, "Service Unavaliable");
            return(View(wpm));
        }