Exemple #1
0
        public ActionResult Deliver(SellPostedModel smodel, int BookId)
        {
            int x = bookRepo.Delivered(smodel, BookId);

            if (x == 1)
            {
                return(View("Index"));
            }
            else
            {
                return(Content("Problem Occured"));
            }
        }
Exemple #2
0
        public int DeliveredStatus(SellPostedModel model, int BookId)
        {
            SellPosting book = db.SellPostings.FirstOrDefault(x => x.BookId == BookId);

            book.Status = model.Status = 3;

            try
            {
                db.SaveChanges();
                return(1);
            }
            catch
            {
                return(0);
            }
        }
Exemple #3
0
        public int CreateSellpost(SellPostedModel model, int id)
        {
            SellPosting book = new SellPosting();

            book.BookId       = model.BookId;
            book.offeredPoint = model.offeredPoint;
            book.SellerId     = model.SellerId;
            book.BuyerId      = model.BuyerId;
            book.Status       = model.Status;

            try
            {
                db.SellPostings.Add(book);

                db.SaveChanges();
                return(1);
            }
            catch
            {
                return(0);
            }
        }