Ejemplo n.º 1
0
        public ActionResult Edit([Bind(Include = "Id,Manufacturer,Model,Serial1,Serial2,Status,CDMD,Additional1,Additional2,Location,Category,ContractId,CheckJob")] AssignmentOfToolsByJob assignmentOfToolsByJob)
        {
            if (ModelState.IsValid)
            {
                AssignmentOfToolsByJob assignmentOfToolsByJobB;
                assignmentOfToolsByJobB = db.AssignmentOfToolsByJobs.Find(assignmentOfToolsByJob.Id);

                assignmentOfToolsByJobB.Manufacturer = assignmentOfToolsByJob.Manufacturer;
                assignmentOfToolsByJobB.Model        = assignmentOfToolsByJob.Model;
                assignmentOfToolsByJobB.Serial1      = assignmentOfToolsByJob.Serial1;
                assignmentOfToolsByJobB.Serial2      = assignmentOfToolsByJob.Serial2;
                assignmentOfToolsByJobB.Status       = assignmentOfToolsByJob.Status;
                assignmentOfToolsByJobB.CDMD         = assignmentOfToolsByJob.CDMD;
                assignmentOfToolsByJobB.Additional1  = assignmentOfToolsByJob.Additional1;
                assignmentOfToolsByJobB.Additional2  = assignmentOfToolsByJob.Additional2;
                assignmentOfToolsByJobB.Location     = assignmentOfToolsByJob.Location;
                assignmentOfToolsByJobB.Category     = assignmentOfToolsByJob.Category;
                assignmentOfToolsByJobB.ContractId   = assignmentOfToolsByJob.ContractId;



                //db.Entry(assignmentOfToolsByJob).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(assignmentOfToolsByJob));
        }
Ejemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            AssignmentOfToolsByJob assignmentOfToolsByJob = db.AssignmentOfToolsByJobs.Find(id);

            db.AssignmentOfToolsByJobs.Remove(assignmentOfToolsByJob);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
        // GET: ToolbyJob/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AssignmentOfToolsByJob assignmentOfToolsByJob = db.AssignmentOfToolsByJobs.Find(id);

            if (assignmentOfToolsByJob == null)
            {
                return(HttpNotFound());
            }
            return(View(assignmentOfToolsByJob));
        }
Ejemplo n.º 4
0
        public ActionResult Create([Bind(Include = "Id,Manufacturer,Model,Serial1,Serial2,Status,CDMD,Additional1,Additional2,Category")] AssignmentOfToolsByJob assignmentOfToolsByJob)
        {
            if (ModelState.IsValid)
            {
                assignmentOfToolsByJob.ContractId = 0;
                assignmentOfToolsByJob.Location   = "WAREHOUSE";

                db.AssignmentOfToolsByJobs.Add(assignmentOfToolsByJob);

                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(assignmentOfToolsByJob));
        }