Пример #1
0
        public ActionResult Delete(int id, Employee employee)
        {
            try
            {
                // TODO: Add delete logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Пример #2
0
        public ActionResult Create(Employee employee)
        {
            try
            {
                // TODO: Add insert logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Пример #3
0
 public void update(Employee employee)
 {
     SessionFactory.GetCurrentSession().Update(employee);
     SessionFactory.GetCurrentSession().Flush();
 }
Пример #4
0
 public void save(Employee employee)
 {
     SessionFactory.GetCurrentSession().Save(employee);
 }
Пример #5
0
 public void delete(Employee employee)
 {
     SessionFactory.GetCurrentSession().Delete(employee);
     SessionFactory.GetCurrentSession().Flush();
 }