public IActionResult Index() { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); return(View()); }
public IActionResult ViewDetails(int id) { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); var payement = paymentService.GetPayment(id); return(View(payement)); }
public IActionResult TransactionView(Guid code, FindModel model) { if (model != null) { code = model.Code; } StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses().Where(s => s.Status != 1 && s.Status != 2), "Status", "Name"); decimal df = 0; var link = transactionLinkService.GetTransactionLinks().Where(s => s.LinkCode == code).FirstOrDefault(); var tr = transactionService.GetTransaction(link.TransactionID); TransactionDetails details = new TransactionDetails(); details.TransactionID = tr.Id; details.FirstName = tr.FirstName; details.LastName = tr.LastName; details.BuyerEmail = tr.BuyerEmail; details.ItemName = tr.ItemName; details.DescriptionOfItem = tr.DescriptionOfItem; details.Amount = tr.Amount; details.DeliveryType = tr.DeliveryTypeID == 1 ? "Free Delivery" : tr.DeliveryTypeID == 2 ? "Paid Delivery" : ""; details.Deliveryfee = tr.Deliveryfee != 0 ? tr.Deliveryfee : tr.Deliveryfee == 0 ? 0 : 0; details.DeliveryTime = tr.DeliveryTime; details.TermsOfReturns = tr.TermsOfReturns; details.ProductImageUrl = tr.ProductImageUrl; details.ProductImageUrl1 = tr.ProductImageUrl1; details.ProductImageUrl2 = tr.ProductImageUrl2; details.ProductImageUrl3 = tr.ProductImageUrl3; details.ProductImageUrl4 = tr.ProductImageUrl4; details.SellerName = tr.SellerName; details.SellerEmail = tr.SellerEmail; details.escrowfee = tr.escrowfee; details.Totalfee = tr.Totalfee; details.LinkCode = link.LinkCode; details.LinkID = link.Id; details.statusID = tr.Status; details.Status = tr.Status == 1 ? "<div style=\"color:red\">Pending<div>" : tr.Status == 2 ? "<div style=\"color:yellow\">Paid</div>" : tr.Status == 3 ? "<div style=\"color:purple\">Shipped</div>" : tr.Status == 4 ? "<div style=\"color:green\">Receieved</div>" : ""; return(View(details)); }
public IActionResult ExpiredDetails(int id) { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); var tr = transactionService.GetTransaction(id); var link = transactionLinkService.GetTransactionLinks().Where(s => s.TransactionID == tr.Id).FirstOrDefault(); TransactionDetails details = new TransactionDetails(); details.TransactionID = tr.Id; details.FirstName = tr.FirstName; details.LastName = tr.LastName; details.BuyerEmail = tr.BuyerEmail; details.ItemName = tr.ItemName; details.DescriptionOfItem = tr.DescriptionOfItem; details.Amount = tr.Amount; details.DeliveryType = tr.DeliveryTypeID == 1 ? "Free Delivery" : tr.DeliveryTypeID == 2 ? "Paid Delivery" : ""; details.Deliveryfee = tr.Deliveryfee != 0 ? tr.Deliveryfee : tr.Deliveryfee == 0 ? 0 : 0; details.DeliveryTime = tr.DeliveryTime; details.TermsOfReturns = tr.TermsOfReturns; details.ProductImageUrl = tr.ProductImageUrl; details.ProductImageUrl1 = tr.ProductImageUrl1; details.ProductImageUrl2 = tr.ProductImageUrl2; details.ProductImageUrl3 = tr.ProductImageUrl3; details.ProductImageUrl4 = tr.ProductImageUrl4; details.SellerName = tr.SellerName; details.SellerEmail = tr.SellerEmail; details.escrowfee = tr.escrowfee; details.Totalfee = tr.Totalfee; details.LinkCode = link.LinkCode; details.LinkID = link.Id; details.statusID = tr.Status; details.Status = "Expired"; return(View(details)); }