public ActionResult OfferPage(String OfferID) { WorkWithOffers WWO = new WorkWithOffers(Server); Offers ShowOffer = new Offers(); if (OfferID == null) { ShowOffer = (Offers)Session["ShowOffer"]; } else { ShowOffer = WWO.GetOfferByID(OfferID); } Session["ShowOffer"] = ShowOffer; if (User.Identity.Name != "") { WorkWithUsers WWU = new WorkWithUsers(); if (WWU.GetUserRole(IdentityExtensions.GetUserId(User.Identity)) == "Banned") { return(RedirectToAction("UserBanned", "AccessDenied")); } } return(View(ShowOffer)); }
public ActionResult OrderConfirm(string OfferID) { if (OfferID == null) { OfferID = (string)Session["OfferID"]; } Session["OfferID"] = OfferID; WorkWithOffers WWO = new WorkWithOffers(Server); return(View(WWO.GetOfferByID(OfferID))); }
public ActionResult Create(string OfferID) { Offers Offer; if (OfferID == null) { Offer = new Offers(); } else { WorkWithOffers WWO = new WorkWithOffers(Server); Offer = WWO.GetOfferByID(OfferID); ViewBag.Currency = WWO.GetAndDeleteCurrency(Offer); imageURLs.Clear(); if (Offer.Photo1URL != null) { imageURLs.Enqueue(Offer.Photo1URL); } if (Offer.Photo2URL != null) { imageURLs.Enqueue(Offer.Photo2URL); } if (Offer.Photo3URL != null) { imageURLs.Enqueue(Offer.Photo3URL); } if (Offer.Photo4URL != null) { imageURLs.Enqueue(Offer.Photo4URL); } } WorkWithTags WWT = new WorkWithTags(); ViewBag.Tags = WWT.GetTagsNamesList(); if (ViewBag.Currency == null) { ViewBag.Currency = "USA"; } if (User.Identity.Name == "") { return(RedirectToAction("AccessDenied", "AccessDenied")); } else { return(View(Offer)); } }