Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_salary_expense tbl_salary_expense = db.tbl_salary_expense.Find(id);

            db.tbl_salary_expense.Remove(tbl_salary_expense);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "salary_expense_id,employee_id,salary_type,salary_amount,user_name,date,year,user_id")] tbl_salary_expense tbl_salary_expense)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_salary_expense).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.user_id = new SelectList(db.tbl_user, "user_id", "user_name", tbl_salary_expense.user_id);
     return(View(tbl_salary_expense));
 }
Example #3
0
        // GET: /Salary/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_salary_expense tbl_salary_expense = db.tbl_salary_expense.Find(id);

            if (tbl_salary_expense == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_salary_expense));
        }
Example #4
0
        // GET: /Salary/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_salary_expense tbl_salary_expense = db.tbl_salary_expense.Find(id);

            if (tbl_salary_expense == null)
            {
                return(HttpNotFound());
            }
            ViewBag.user_id = new SelectList(db.tbl_user, "user_id", "user_name", tbl_salary_expense.user_id);
            return(View(tbl_salary_expense));
        }