コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Workers_Compensation workers_Compensation = db.Workers_Compensation.Find(id);

            db.Workers_Compensation.Remove(workers_Compensation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID,EmployeeID,Org_Number,Division_District,WC_TypeID,Injury_Date,Claim_Number,Injury_Type,Body_Parts,Job_Class,Tx_Date,EROI_Date,Tx_EROI_LAG,Claim_Ruling_TypeID,Claim_Ruling_Date,TTD_ONSET_Date,Restricted_RTW,Full_Duty_RTW,TTD_Award_Notice,RTW_Notice,Lost_Time,Lost_Time_Year,MVA,H_EQ,Tree_Brush,CTS,HL,OP,OD_NOC,Comments")] Workers_Compensation workers_Compensation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workers_Compensation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Claim_Ruling_TypeID = new SelectList(db.Claim_Ruling_Type, "ID", "Claim_Ruling_Type1", workers_Compensation.Claim_Ruling_TypeID);
     ViewBag.EmployeeID          = new SelectList(db.Employees, "ID", "First_Name", workers_Compensation.EmployeeID);
     ViewBag.WC_TypeID           = new SelectList(db.WC_Type, "ID", "WC_Type1", workers_Compensation.WC_TypeID);
     return(View(workers_Compensation));
 }
コード例 #3
0
        // GET: Workers_Compensation_Upgrade/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Workers_Compensation workers_Compensation = db.Workers_Compensation.Find(id);

            if (workers_Compensation == null)
            {
                return(HttpNotFound());
            }
            return(View(workers_Compensation));
        }
コード例 #4
0
        public ActionResult Create([Bind(Include = "ID,EmployeeID,Org_Number,Division_District,WC_TypeID,Injury_Date,Claim_Number,Injury_Type,Body_Parts,Claim_Ruling_TypeID,Comments")] Workers_Compensation workers_Compensation)
        {
            if (ModelState.IsValid)
            {
                System.Diagnostics.Debug.WriteLine("WC Type: " + workers_Compensation.WC_TypeID);
                System.Diagnostics.Debug.WriteLine("Claim ruling type: " + workers_Compensation.Claim_Ruling_TypeID);
                db.Workers_Compensation.Add(workers_Compensation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Claim_Ruling_TypeID = new SelectList(db.Claim_Ruling_Type, "ID", "Claim_Ruling_Type1", workers_Compensation.Claim_Ruling_TypeID);
            ViewBag.EmployeeID          = new SelectList(db.Employees, "ID", "First_Name", workers_Compensation.EmployeeID);
            ViewBag.WC_TypeID           = new SelectList(db.WC_Type, "ID", "WC_Type1", workers_Compensation.WC_TypeID);
            return(View(workers_Compensation));
        }
コード例 #5
0
        // GET: Workers_Compensation_Upgrade/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Workers_Compensation workers_Compensation = db.Workers_Compensation.Find(id);

            if (workers_Compensation == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Claim_Ruling_TypeID = new SelectList(db.Claim_Ruling_Type, "ID", "Claim_Ruling_Type1", workers_Compensation.Claim_Ruling_TypeID);
            ViewBag.EmployeeID          = new SelectList(db.Employees, "ID", "First_Name", workers_Compensation.EmployeeID);
            ViewBag.WC_TypeID           = new SelectList(db.WC_Type, "ID", "WC_Type1", workers_Compensation.WC_TypeID);
            return(View(workers_Compensation));
        }