public int CreateOffer(OfferBLL Offer) { int proposedReturnValue = -1; proposedReturnValue = _context.CreateOffer (Offer.ProductID, Offer.BuyerID, Offer.Offerprice, Offer.offerstate, Offer.ExpireDate, Offer.Comments, Offer.ProductName, Offer.BuyerName); return(proposedReturnValue); }
//Offer public OfferBLL FindOfferByID(int OfferID) { OfferBLL ProposedReturnValue = null; OfferDal DataLayerObject = _context.FindOfferByID(OfferID); if (null != DataLayerObject) { ProposedReturnValue = new OfferBLL(DataLayerObject); } return(ProposedReturnValue); }
public OfferBLL FindOfferByID(int OfferID) { OfferBLL rv = null; OfferDAL dal = ctx.FindOfferByID(OfferID); if (dal != null) { rv = new OfferBLL(dal); } return(rv); }
public List <OfferBLL> GetOffer(int skip, int take) { List <OfferBLL> ProposedReturnValue = new List <OfferBLL>(); List <OfferDal> ListOfDataLayerObjects = _context.GetOffers(skip, take); foreach (OfferDal offer in ListOfDataLayerObjects) { OfferBLL BusinessObject = new OfferBLL(offer); ProposedReturnValue.Add(BusinessObject); } return(ProposedReturnValue); }
public ActionResult Delete(int id, BusinessLogicLayer.OfferBLL collection) { try { using (ContextBll ctx = new ContextBll()) { ctx.DeleteOffer(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public ActionResult Edit(int id, BusinessLogicLayer.OfferBLL collection) { try { // TODO: Add insert logic here using (ContextBll ctx = new ContextBll()) { ctx.UpdateOffer(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public void DeleteOffer(OfferBLL offers) { _context.DeleteOffer(offers.offerID); }
public void UpdateOffer(OfferBLL offer) { _context.UpdateOffer (offer.offerID, offer.ProductID, offer.BuyerID, offer.Offerprice, offer.offerstate, offer.ExpireDate, offer.Comments); }