public dynamic DeleteDetail(WarehouseMutationOrderDetail model) { try { if (!AuthenticationModel.IsAllowed("Edit", Core.Constants.Constant.MenuName.WarehouseMutation, Core.Constants.Constant.MenuGroupName.Master)) { Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "You are Not Allowed to Edit record"); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } var data = _warehouseMutationOrderDetailService.GetObjectById(model.Id); model = _warehouseMutationOrderDetailService.SoftDeleteObject(data, _warehouseMutationOrderService, _warehouseItemService); } catch (Exception ex) { LOG.Error("Delete Failed", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Errors })); }
public dynamic DeleteDetail(WarehouseMutationOrderDetail model) { try { var data = _warehouseMutationOrderDetailService.GetObjectById(model.Id); model = _warehouseMutationOrderDetailService.SoftDeleteObject(data, _warehouseMutationOrderService, _warehouseItemService); } catch (Exception ex) { LOG.Error("Delete Failed", ex); model.Errors.Add("Generic", "Error : " + ex); } return(Json(new { model.Errors })); }