Example #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CommitteeSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCommitteeSet(Committee committee)
 {
     base.AddObject("CommitteeSet", committee);
 }
Example #2
0
        public ActionResult AddCommittee(CommitteeViewModel cvm)
        {
            if(ModelState.IsValid)
            {
                using (new UnitOfWork(_currentContext))
                {
                    var committee = new Committee
                        {
                            Name = cvm.Name,
                            Description = cvm.Description
                        };
                    committeeRepository.Add(committee);
                }

                TempData[Const.ActionResultInfo] = "Цикловая комиссия успешно добавлена";
                return RedirectToAction("Committees");
             }

            TempData[Const.ActionErrorInfo] =
                "Ошибка добавления цикловой комиссии. Проверьте правильность введенных данных";
            return View();
        }
Example #3
0
 /// <summary>
 /// Create a new Committee object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Committee CreateCommittee(global::System.Int32 id, global::System.String name)
 {
     Committee committee = new Committee();
     committee.Id = id;
     committee.Name = name;
     return committee;
 }