public ActionResult DeleteConfirmed(int id)
        {
            Log03InitialStyle log03InitialStyle = db.LogInitialStyle.Find(id);

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

            if (log03InitialStyle == null)
            {
                return(HttpNotFound());
            }
            return(View(log03InitialStyle));
        }
 public ActionResult Edit([Bind(Include = "StyleID,SampleDate,Sample,Volume,Year,Width,ColourID,ArticleTypeId,ResultID,UserID,ArticleID")] Log03InitialStyle log03InitialStyle)
 {
     if (ModelState.IsValid)
     {
         db.Entry(log03InitialStyle).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ArticleID     = new SelectList(db.LogInitialArticle, "ArticleID", "StyleCode", log03InitialStyle.ArticleID);
     ViewBag.ArticleTypeId = new SelectList(db.SetupArticleTypes, "ArticleTypeId", "ArticleType", log03InitialStyle.ArticleTypeId);
     ViewBag.ColourID      = new SelectList(db.SetupColours, "ColourID", "ColourName", log03InitialStyle.ColourID);
     ViewBag.ResultID      = new SelectList(db.SetupResults, "ResultID", "ResultName", log03InitialStyle.ResultID);
     ViewBag.UserID        = new SelectList(db.SetupUserInfoes, "UserID", "UserName", log03InitialStyle.UserID);
     return(View(log03InitialStyle));
 }
        // GET: Log03InitialStyle/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Log03InitialStyle log03InitialStyle = db.LogInitialStyle.Find(id);

            if (log03InitialStyle == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ArticleID     = new SelectList(db.LogInitialArticle, "ArticleID", "StyleCode", log03InitialStyle.ArticleID);
            ViewBag.ArticleTypeId = new SelectList(db.SetupArticleTypes, "ArticleTypeId", "ArticleType", log03InitialStyle.ArticleTypeId);
            ViewBag.ColourID      = new SelectList(db.SetupColours, "ColourID", "ColourName", log03InitialStyle.ColourID);
            ViewBag.ResultID      = new SelectList(db.SetupResults, "ResultID", "ResultName", log03InitialStyle.ResultID);
            ViewBag.UserID        = new SelectList(db.SetupUserInfoes, "UserID", "UserName", log03InitialStyle.UserID);
            return(View(log03InitialStyle));
        }
        public JsonResult UpdateResult(TestValues TV, Log03InitialStyle LIS)
        {
            //string msg = string.Empty;
            try
            {
                SqlCommand xCommand = new SqlCommand("SP_UpdateResult", xConn);
                xCommand.CommandType = CommandType.StoredProcedure;

                xCommand.Parameters.AddWithValue("@ResultID", TV.ResultID);
                xCommand.Parameters.AddWithValue("@StyleID", TV.StyleID);

                xConn.Open();
                xCommand.ExecuteNonQuery();
                xConn.Close();
                //msg = "Data Inserted";
                return(Json("Successfully Updated", JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                throw;
                //msg = "Error ...!";
                //return Json(msg, JsonRequestBehavior.AllowGet);
            }
        }