Ejemplo n.º 1
0
        public static void AddPosition()
        {
            Console.WriteLine("Введите ID должности");
            var idPosition = Console.ReadLine();

            Console.WriteLine("Введите название должности");
            var nameOfPosition = Console.ReadLine();

            var currentinfo = new Position()
            {
                IDPosition     = Int32.Parse(idPosition),
                NameOfPosition = nameOfPosition
            };

            positionLogic.AddPosition(currentinfo);
        }
Ejemplo n.º 2
0
 public ActionResult AddPosition(int idPosition, string nameOfPosition)
 {
     _ = _positionLogic.AddPosition(new Position((int)TempData.Peek("IDPosition"), nameOfPosition));
     return(RedirectToAction("GetPosition", new { idPosition = TempData.Peek("IDPosition") }));
 }