public ActionResult SubscriptionTransactionConsumerResult(string tc_)
        {
            ConsumerDataModel consdata = new ConsumerDataModel();

            System.Threading.Thread.Sleep(200);
            consdata.GetConsumerDetailsData(tc_);
            var searchuser = consdata.ConsumerDetails.Where(x => x.tc_id == tc_).FirstOrDefault();

            if (searchuser != null)
            {
                consdata.GetConsumerInvoiceDetails(tc_);
                consdata.GetConsumerUnpaidInvoices(tc_);


                ViewBag.usern       = searchuser.username;
                ViewBag.name        = searchuser.name;
                ViewBag.surn        = searchuser.surname;
                ViewBag.tckn        = searchuser.tc_id;
                ViewBag.phn         = searchuser.phone;
                ViewBag.mail        = searchuser.email;
                ViewBag.unpaidcount = consdata.ConsumerUnpaidInvoices.Count(y => y.ispaid == false);

                return(View(consdata));
            }
            else
            {
                TempData["result"] = "<script>alert('Kullanıcı bulunamadı');</script>";
                return(RedirectToAction("SearchConsumerSubscriber"));
            }
        }
        //[OutputCache(Duration = 180, VaryByParam = "*", Location = System.Web.UI.OutputCacheLocation.Server)]
        public ActionResult Index(string tc)
        {
            ConsumerDataModel consmodel = new ConsumerDataModel();

            System.Threading.Thread.Sleep(200);
            consmodel.GetConsumerBillRawData();
            var searchuser2 = consmodel.ConsumerBillRawData.Where(y => y.tc_id == tc).FirstOrDefault();

            if (searchuser2 != null)
            {
                consmodel.GetConsumerPaidInvoices(tc);
                consmodel.GetConsumerUnpaidInvoices(tc);
            }
            else
            {
                TempData["Message"] = "<script>alert('Kayıt bulunamadı');</script>";
            }



            return(View(consmodel));
        }
        public ActionResult PayInvoiceConsumer_(string tc_, int id)
        {
            ConsumerDataModel consmodel = new ConsumerDataModel();

            System.Threading.Thread.Sleep(200);
            consmodel.GetConsumerBillRawData();
            var searchuser  = consmodel.ConsumerBillRawData.Where(x => x.bill_id == id).FirstOrDefault();
            var searchuser2 = consmodel.ConsumerBillRawData.Where(y => y.tc_id == tc_).FirstOrDefault();

            if (searchuser != null && searchuser2 != null)
            {
                consmodel.GetConsumerPayInvoice(id);
                consmodel.GetConsumerPaidInvoices(tc_);
                consmodel.GetConsumerUnpaidInvoices(tc_);
                TempData["Message"] = "<script>alert('Fatura ödeme işlemi tamamlandı');</script>";
                ViewBag.IsReload    = true;
                return(RedirectToAction("SearchConsumerSubscriberResult", "AdminOperations", new { tc_ = searchuser2.tc_id.ToString() }));
            }
            else
            {
                return(RedirectToAction("SearchConsumerSubscriberResult", "AdminOperations", new { tc_ = searchuser2.tc_id.ToString() }));
            }
        }