public ActionResult DeleteConfirmed(int id)
        {
            WalkInPayments walkInPayments = db.WalkInPayments.Find(id);

            db.WalkInPayments.Remove(walkInPayments);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "WalkInPaymentsId,paymentmethod,CardNumber,CVVnumber,ExpiryDate,UserId,DateTimeofpayment,TrackingNumberOfRequest,Priceofrepair")] WalkInPayments walkInPayments)
 {
     if (ModelState.IsValid)
     {
         db.Entry(walkInPayments).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(walkInPayments));
 }
        // GET: WalkInPayments/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WalkInPayments walkInPayments = db.WalkInPayments.Find(id);

            if (walkInPayments == null)
            {
                return(HttpNotFound());
            }
            return(View(walkInPayments));
        }
        public ActionResult Create(WalkInPayments walkInPayments, DeviceStatusWalkIns deviceStatusWalkIns)
        {
            if (ModelState.IsValid)
            {
                walkInPayments.DateTimeofpayment       = DateTime.Now;
                walkInPayments.Priceofrepair           = Convert.ToString(deviceStatusWalkIns.Price);
                walkInPayments.TrackingNumberOfRequest = deviceStatusWalkIns.TrackingNumber;
                walkInPayments.UserId = User.Identity.GetUserId();
                db.WalkInPayments.Add(walkInPayments);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(walkInPayments));
        }