Esempio n. 1
0
        public ActionResult EditProgram(RobotProgramViewModel program)
        {
            if (!ModelState.IsValid)
            {
                return(View(program));
            }

            _robotProgramModel.UpdateProgram(program);
            return(RedirectToAction("Get"));
        }
        public void UpdateProgram(RobotProgramViewModel program)
        {
            try
            {
                RobotProgramDto programDto = Mapper.Map <RobotProgramDto>(program);

                _robotProgramService.UpdateProgram(programDto);
            }
            catch (FaultException ex)
            {
                throw new HttpException((int)HttpStatusCode.InternalServerError, "Error occured while updating program", ex);
            }
        }
Esempio n. 3
0
        public ActionResult CreateProgram()
        {
            var program = new RobotProgramViewModel();

            return(View(program));
        }