public ActionResult DeleteConfirmed(long id) { InvitationsOffersPost invitationsoffers = _invitationsoffersService.GetPost(id); invitationsoffers.UserName = User.Identity.Name; _invitationsoffersService.Delete(invitationsoffers); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind("ixInvitationOffer,sInvitationOffer,ixLanguage,ixLanguageStyle,sInvitationOffered,sAcceptDecline,ixResponseType,bActive")] InvitationsOffersPost invitationsoffers) { if (ModelState.IsValid) { invitationsoffers.UserName = User.Identity.Name; _invitationsoffersService.Edit(invitationsoffers); return(RedirectToAction("Index")); } ViewBag.ixLanguage = new SelectList(_invitationsoffersService.selectLanguages().Select(x => new { x.ixLanguage, x.sLanguage }), "ixLanguage", "sLanguage", invitationsoffers.ixLanguage); ViewBag.ixLanguageStyle = new SelectList(_invitationsoffersService.selectLanguageStyles().Select(x => new { x.ixLanguageStyle, x.sLanguageStyle }), "ixLanguageStyle", "sLanguageStyle", invitationsoffers.ixLanguageStyle); ViewBag.ixResponseType = new SelectList(_invitationsoffersService.selectResponseTypes().Select(x => new { x.ixResponseType, x.sResponseType }), "ixResponseType", "sResponseType", invitationsoffers.ixResponseType); return(View(invitationsoffers)); }
public ActionResult Edit(long id) { InvitationsOffersPost invitationsoffers = _invitationsoffersService.GetPost(id); if (invitationsoffers == null) { return(NotFound()); } ViewBag.ixLanguage = new SelectList(_invitationsoffersService.selectLanguages().Select(x => new { x.ixLanguage, x.sLanguage }), "ixLanguage", "sLanguage", invitationsoffers.ixLanguage); ViewBag.ixLanguageStyle = new SelectList(_invitationsoffersService.selectLanguageStyles().Select(x => new { x.ixLanguageStyle, x.sLanguageStyle }), "ixLanguageStyle", "sLanguageStyle", invitationsoffers.ixLanguageStyle); ViewBag.ixResponseType = new SelectList(_invitationsoffersService.selectResponseTypes().Select(x => new { x.ixResponseType, x.sResponseType }), "ixResponseType", "sResponseType", invitationsoffers.ixResponseType); return(View(invitationsoffers)); }
public Task Delete(InvitationsOffersPost invitationsoffersPost) { // Additional validations // Pre-process // Process this._invitationsoffersRepository.RegisterDelete(invitationsoffersPost); try { this._invitationsoffersRepository.Commit(); } catch (Exception ex) { this._invitationsoffersRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public Task <Int64> Create(InvitationsOffersPost invitationsoffersPost) { // Additional validations // Pre-process // Process this._invitationsoffersRepository.RegisterCreate(invitationsoffersPost); try { this._invitationsoffersRepository.Commit(); } catch (Exception ex) { this._invitationsoffersRepository.Rollback(); // Log exception throw; } // Post-process return(Task.FromResult(invitationsoffersPost.ixInvitationOffer)); }
public void RegisterDelete(InvitationsOffersPost invitationsoffersPost) { _context.InvitationsOffersPost.Remove(invitationsoffersPost); }
public void RegisterEdit(InvitationsOffersPost invitationsoffersPost) { _context.Entry(invitationsoffersPost).State = EntityState.Modified; }
public void RegisterCreate(InvitationsOffersPost invitationsoffersPost) { _context.InvitationsOffersPost.Add(invitationsoffersPost); }