private void DeleteLot() { if (SelectedLot == null || SelectedLot.Id == 0) { MessagesService.Show("Удаление лота", "Лот не выбран или не существует"); return; } LotService.DeleteLot(SelectedLot.Id); Init(); }
public ActionResult DeleteLot(int lotId) { LotService ls = new LotService(); BLLMethodResult result = ls.DeleteLot(lotId); if (result.Result == 0) { return(RedirectToAction("LotsOfUser", "Lot")); } else { return(RedirectToAction("Message", "Home", new { str = result.Message })); } }