public ActionResult DeleteConfirmed(int id)
        {
            SiteCall siteCall = db.SiteCalls.Find(id);

            db.SiteCalls.Remove(siteCall);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: SiteCalls/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SiteCall siteCall = db.SiteCalls.Find(id);

            if (siteCall == null)
            {
                return(HttpNotFound());
            }
            return(View(siteCall));
        }
 public ActionResult Edit([Bind(Include = "Id,datetimeCall,classificationID,salesRepID,storeID,displayBrands,coldBrands,largestCases,coverage,display,currentCases,total750mlCold,schematicFacings,coldBox,pod,cbf,notes")] SiteCall siteCall)
 {
     if (ModelState.IsValid)
     {
         db.Entry(siteCall).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.salesRepID       = new SelectList(db.SalesReps, "Id", "name", siteCall.salesRepID);
     ViewBag.classificationID = new SelectList(db.Classifications, "Id", "name", siteCall.classificationID);
     ViewBag.storeID          = new SelectList(db.Stores, "Id", "storeid", siteCall.storeID);
     ViewBag.displayBrands    = new SelectList(db.Brands, "Id", "brand1", siteCall.displayBrands);
     ViewBag.coldBrands       = new SelectList(db.Brands, "Id", "brand1", siteCall.coldBrands);
     return(View(siteCall));
 }
        // GET: SiteCalls/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SiteCall siteCall = db.SiteCalls.Find(id);

            if (siteCall == null)
            {
                return(HttpNotFound());
            }
            ViewBag.salesRepID       = new SelectList(db.SalesReps, "Id", "name", siteCall.salesRepID);
            ViewBag.classificationID = new SelectList(db.Classifications, "Id", "name", siteCall.classificationID);
            ViewBag.storeID          = new SelectList(db.Stores, "Id", "storeid", siteCall.storeID);
            ViewBag.displayBrands    = new SelectList(db.Brands, "Id", "brand1", siteCall.displayBrands);
            ViewBag.coldBrands       = new SelectList(db.Brands, "Id", "brand1", siteCall.coldBrands);
            return(View(siteCall));
        }