예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PayrollCust payrollCust = db.PayrollCusts.Find(id);

            db.PayrollCusts.Remove(payrollCust);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "prCust_id,prCust_OrgId,prCust_CustId,prCust_paymnt,prCust_date")] PayrollCust payrollCust)
 {
     if (ModelState.IsValid)
     {
         db.Entry(payrollCust).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.prCust_CustId = new SelectList(db.Customers, "Cust_id", "Cust_Firstname", payrollCust.prCust_CustId);
     ViewBag.prCust_OrgId  = new SelectList(db.Organizations, "org_id", "org_name", payrollCust.prCust_OrgId);
     return(View(payrollCust));
 }
예제 #3
0
        // GET: PayrollCusts/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PayrollCust payrollCust = db.PayrollCusts.Find(id);

            if (payrollCust == null)
            {
                return(HttpNotFound());
            }
            return(View(payrollCust));
        }
예제 #4
0
        // GET: PayrollCusts/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PayrollCust payrollCust = db.PayrollCusts.Find(id);

            if (payrollCust == null)
            {
                return(HttpNotFound());
            }
            ViewBag.prCust_CustId = new SelectList(db.Customers, "Cust_id", "Cust_Firstname", payrollCust.prCust_CustId);
            ViewBag.prCust_OrgId  = new SelectList(db.Organizations, "org_id", "org_name", payrollCust.prCust_OrgId);
            return(View(payrollCust));
        }