Пример #1
0
        public ActionResult EditUsek(int id, Usek collection)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var dao = new UsekDao();
                    dao.Update(collection);
                    return(RedirectToAction("DetailUsek", new { id = id }));
                }

                TempData[MessagesHelper.Warning] = Resources.LopTexts.ZkontrolujteZadaneUdaje;
            }
            catch
            {
                TempData[MessagesHelper.Danger] = Resources.LopTexts.DosloKNeocekavaneChybe;
            }

            return(View(collection));
        }
Пример #2
0
 public IList <Oddeleni> GetAllByUsek(Usek usek)
 {
     return(Session.CreateCriteria <Oddeleni>().Add(Restrictions.Eq("Usek", usek)).List <Oddeleni>());
 }