Exemplo n.º 1
0
        private bool ValidatePickList()
        {
            foreach (DataRowView drv in _dvPickListMakeup)
            {
                var itemID         = Convert.ToInt32(drv["ItemID"]);
                var storeID        = Convert.ToInt32(drv["StoreID"]);
                var unitID         = Convert.ToInt32(drv["UnitID"]);
                var manufacturerID = Convert.ToInt32(drv["ManufacturerID"]);

                if (BLL.Settings.BlockWhenExpectingPriceChange &&
                    ReceiveDoc.DoesPriceNeedToBeChanged(storeID, itemID, unitID, manufacturerID))
                {
                    XtraMessageBox.Show(
                        string.Format("The item {0}({1},{2}) cannot be issued because it is waiting for price change.", drv["FullItemName"], drv["Unit"], drv["ManufacturerName"]),
                        "Price Pending", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return(true);
                }
            }
            return(false);
        }