private bool DeductBalanceForCancellingGRN(Guid UnloadingId, SqlTransaction tran) { bool isSaved = false; // get stacks unloaded. List <StackUnloadedBLL> list = null; StackUnloadedBLL o = new StackUnloadedBLL(); o.UnloadingId = UnLoadingId; list = o.GetStackInformationByUnloadingId(); if (list != null) { if (list.Count > 0) { foreach (StackUnloadedBLL i in list) { InventoryServices.GetInventoryService().LoadFromStack(i.StackId, i.NumberOfbags, 0, tran); } } } else { isSaved = false; } return(isSaved); }