Exemple #1
0
        private bool ValidAvailabilityStock()
        {
            if (mObjSeller != null && !string.IsNullOrEmpty(txtSellerCode.Text) && !string.IsNullOrEmpty(txtQuantity.Text))
            {
                bool lBolChekced          = chkReprogrammed.IsChecked ?? false;
                int  lIntRequiredQuantity = Convert.ToInt32(txtQuantity.Text);

                int lIntAvailabilityStock = !lBolChekced?
                                            mObjAuctionsFactory.GetAuctionStockService().GetAvailableQuantityForAuctionOnCurrentAuction(AuctionId, mObjSeller.Id) :
                                                mObjAuctionsFactory.GetAuctionStockService().GetAvailableQuantityForReprogramOnCurrentAuction(AuctionId, mObjSeller.Id);

                if (lIntAvailabilityStock >= lIntRequiredQuantity ||
                    mObjBatch != null && mObjBatch.Id > 0 && (lIntAvailabilityStock + mObjBatch.Quantity) >= lIntRequiredQuantity)
                {
                    tblErrorQuantity.Visibility = Visibility.Collapsed;
                    return(true);
                }
                else
                {
                    tblErrorQuantity.Visibility = Visibility.Visible;
                    return(false);
                }
            }
            return(true);
        }
Exemple #2
0
 private int GetQuantityForFutureAuctions(ItemTypeGenderEnum pEnmGender)
 {
     return(mObjAuctionsFactory.GetAuctionStockService().GetAvailableQuantityForFutureAuctions(mLonAuction, mLonCustomer, pEnmGender));
 }