public ActionResult BookPackItemOperationGridViewPartialDelete(System.Int32 BookPackItemOperationID) { if (BookPackItemOperationID >= 0) { try { var item = BookPackItemOperationList.Where(c => c.BookPackItemOperationID == BookPackItemOperationID).FirstOrDefault(); BookPackItemOperationList.Remove(item); } catch (Exception e) { ViewData["EditError"] = e.Message; } } var model = BookPackItemOperationList; return(PartialView("_BookPackItemOperationGridViewPartial", model)); }
public ActionResult PackingGridViewPartialDelete(System.Int32 BookPackItemOperationID) { if (BookPackItemOperationID >= 0) { try { var item = BookPackItemOperationList.Where(c => c.BookPackItemOperationID == BookPackItemOperationID).FirstOrDefault(); BookPackItemOperationList.Remove(item); //BusinessLogicLayer.Entity.PPM.BookPackItemOperation entity = new BusinessLogicLayer.Entity.PPM.BookPackItemOperation(BookPackItemOperationID); //entity.Delete(); } catch (Exception e) { ViewData["EditError"] = e.Message; } } var model = BookPackItemOperationList;// new BusinessLogicLayer.Components.PPM.BookPackItemOperationLogic().GetByBookPackID(PackID); return(PartialView("_RepackGridViewPartial", model)); }