public dynamic UnConfirm(WarehouseMutationOrder model) { try { if (!AuthenticationModel.IsAllowed("UnConfirm", 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 UnConfirm record"); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } var data = _warehouseMutationOrderService.GetObjectById(model.Id); model = _warehouseMutationOrderService.UnconfirmObject(data, _warehouseMutationOrderDetailService, _itemService, _barringService, _warehouseItemService, _stockMutationService); } catch (Exception ex) { LOG.Error("Unconfirm 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 UnConfirm(WarehouseMutationOrder model) { try { var data = _warehouseMutationOrderService.GetObjectById(model.Id); model = _warehouseMutationOrderService.UnconfirmObject(data, _warehouseMutationOrderDetailService, _itemService, _barringService, _warehouseItemService, _stockMutationService); } catch (Exception ex) { LOG.Error("Unconfirm Failed", ex); model.Errors.Add("Generic", "Error : " + ex); } return(Json(new { model.Errors })); }