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")); } }
public ActionResult SearchConsumerSubscriberResult(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_); TempData["result"] = "Username:"******", Name:" + searchuser.name + ", Surname:" + searchuser.surname + ", TCno:" + searchuser.tc_id + ", Phone:" + searchuser.phone + ", Email:" + searchuser.email; return(View(consdata)); } else { TempData["result"] = "<script>alert('Kullanıcı bulunamadı');</script>"; return(RedirectToAction("SearchConsumerSubscriber")); } }