Beispiel #1
0
 public ActionResult Create(ProjectViewModel projectVM)
 {
     try
     {
         using (Service1Client service = new Service1Client())
         {
             ProjectDto projectDto = new ProjectDto
             {
                 Name        = projectVM.Name,
                 Description = projectVM.Description,
                 Created     = projectVM.Created,
                 Client      = projectVM.Client,
                 Price       = projectVM.Price,
                 managerId   = projectVM.managerId,
                 managerDto  = new ManagerDto
                 {
                     Id = projectVM.managerId,
                 }
             };
             service.PostProject(projectDto);
         }
         ViewBag.Managers = LoadManagers.LoadManagersData();
         return(RedirectToAction("Index"));
     }
     catch
     {
         ViewBag.Managers = LoadManagers.LoadManagersData();
         return(View());
     }
 }
Beispiel #2
0
        public override void BusInit(IBusManager bmgr)
        {
            _cpu     = bmgr.CPU;
            _sandbox = bmgr.IsSandbox;
            _memory  = bmgr.FindDevice <IMemoryDevice>();

            bmgr.RegisterIcon(_iconRd);
            bmgr.RegisterIcon(_iconWr);
            bmgr.Events.SubscribeBeginFrame(BusBeginFrame);
            bmgr.Events.SubscribeEndFrame(BusEndFrame);

            bmgr.Events.SubscribeRdMemM1(0xFF00, 0x3D00, BusReadMem3D00_M1);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0x4000, BusReadMemRam);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0x8000, BusReadMemRam);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0xC000, BusReadMemRam);

            OnSubscribeIo(bmgr);

            bmgr.Events.SubscribeReset(BusReset);
            bmgr.Events.SubscribeNmiRq(BusNmiRq);
            bmgr.Events.SubscribeNmiAck(BusNmiAck);

            foreach (var fs in LoadManagers.First().GetSerializers())
            {
                bmgr.AddSerializer(fs);
            }
        }
Beispiel #3
0
        public ActionResult Edit(int id)
        {
            ProjectViewModel projctVM = new ProjectViewModel();

            using (Service1Client service = new Service1Client())
            {
                var projectDto = service.GetProjectById(id);
                projctVM = new ProjectViewModel(projectDto);
            }

            ViewBag.Managers = LoadManagers.LoadManagersData();
            return(View(projctVM));
        }