public static GetEntryGateDataReply Send(int entityID, EntryGate entryGate) { var msg = pool.New(); msg.Init(entityID, entryGate); MessageManager.GetInstance().Send(msg); return(msg); }
public ActionResult DeleteConfirmed(int id) { EntryGate entryGate = db.EntryGate.Find(id); db.EntryGate.Remove(entryGate); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,IsActive,IdAttraction")] EntryGate entryGate) { if (ModelState.IsValid) { db.Entry(entryGate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdAttraction = new SelectList(db.Attraction, "Id", "Name", entryGate.IdAttraction); return(View(entryGate)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EntryGate entryGate = db.EntryGate.Find(id); if (entryGate == null) { return(HttpNotFound()); } return(View(entryGate)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EntryGate entryGate = db.EntryGate.Find(id); if (entryGate == null) { return(HttpNotFound()); } ViewBag.IdAttraction = new SelectList(db.Attraction, "Id", "Name", entryGate.IdAttraction); return(View(entryGate)); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += applicationThreadException; Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); AppDomain.CurrentDomain.UnhandledException += currentDomainUnhandledException; try { Application.Run(EntryGate.DecideForm()); } catch (Exception x) { HandleException(x); } }
protected override async Task <ICommandResult> Handle(CreateNewEntryGateCommand command) { var entryGate = _entryGateRepository.GetByName(command.NewEntryGatename); if (entryGate == null) { var EntryGate = new EntryGate(); var details = new EntryGate { AltId = new Guid(), Name = command.NewEntryGatename, StreetInformation = "", IsEnabled = true, ModifiedBy = command.ModifiedBy, CreatedUtc = DateTime.UtcNow, }; EntryGate = _entryGateRepository.Save(details); return(new CreateNewEntryGateCommandResult { IsExisting = false, AltId = EntryGate.AltId.ToString(), Id = EntryGate.Id, Success = true }); } else { return(new CreateNewEntryGateCommandResult { IsExisting = true, AltId = entryGate.AltId.ToString(), Id = entryGate.Id, Success = false }); } }
public void Init(int entityID, EntryGate entryGate) { this.entityID = entityID; this.entryGate = entryGate; }