public ActionResult Delete(int?id) { if (!id.HasValue) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (UserViewModel == null) { return(RedirectToAction("Index", "Home")); } if (!_customAuthentication.CheckUserInRoles(UserViewModel.ToUserEntity(), "Admin,Moderator")) { return(new HttpStatusCodeResult(403)); } var bid = _bidService.GetBidById(id.Value); if (bid == null) { return(HttpNotFound()); } if (Request.IsAjaxRequest()) { DeleteEntity(bid); return(Content("")); } return(View(bid.ToBidViewModel())); }
public ActionResult AddOrEditBid(int id = 0) { BidMasterVM bidVM = new BidMasterVM(); ViewBag.RFQNOs = dropDown.DDLGetRFQNOs(); if (id == 0) { return(PartialView(bidVM)); } else { bidVM = _BidSerivce.GetBidById(id); return(PartialView(bidVM)); } }