示例#1
0
        public ActionResult FinalSubmit(SubmitOrderDetails finalOrder)
        {
            var newOrder = new Orders()
            {
                OrderID = currentOrderID, CustID = currentUser.CustID, Comments = finalOrder.comments, PrepaidAmount = finalOrder.prepay
            };

            using (db)
            {
                db.orders.Attach(newOrder);
                db.Entry(newOrder).Property(x => x.Comments).IsModified      = true;
                db.Entry(newOrder).Property(x => x.PrepaidAmount).IsModified = true;
                db.SaveChanges();
            }

            return(RedirectToAction("IndexReturn"));
        }
示例#2
0
        public ActionResult QuoteDone(int id)
        {
            var item = db.quotes.Where(x => x.QuoteID == id).First();

            item.QuoteStatusID = 3;
            using (db)
            {
                db.quotes.Attach(item);
                db.Entry(item).Property(x => x.QuoteStatusID).IsModified = true;
                db.SaveChanges();
            }
            return(RedirectToAction("ListQuotes"));
        }
示例#3
0
 public ActionResult Edit(Samples updatedSample)
 {
     updatedSample.AssayStatus = "Received";
     using (db)
     {
         db.samples.Attach(updatedSample);
         db.Entry(updatedSample).Property(x => x.ScheduleCompletion).IsModified = true;
         db.Entry(updatedSample).Property(x => x.DateArrived).IsModified        = true;
         db.Entry(updatedSample).Property(x => x.ActualWeight).IsModified       = true;
         db.Entry(updatedSample).Property(x => x.MTD).IsModified         = true;
         db.Entry(updatedSample).Property(x => x.AssayStatus).IsModified = true;
         db.SaveChanges();
     }
     return(RedirectToAction("SentOrders"));
 }