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); } }
public ActionResult CreateProgram() { var program = new RobotProgramViewModel(); return(View(program)); }