Пример #1
0
        /// ********************************************************************************************************* ///

        internal bool addPriceFromAddSellingPrice()
        {
            bool b = false;

            try {
                if (addSellingPrice.textBox_price.DoubleValue == 0)
                {
                    ShowMessage.error(Common.Messages.Error.Error006);
                }
                else if (isDublicatePrice(addSellingPrice.ItemId, addSellingPrice.Mode, addSellingPrice.textBox_price.DoubleValue, 0))
                {
                    ShowMessage.error(Common.Messages.Error.Error007);
                }
                else
                {
                    SellingPrice sellingPrice = new SellingPrice();
                    sellingPrice.ItemId = addSellingPrice.ItemId;
                    sellingPrice.Mode   = addSellingPrice.Mode;
                    sellingPrice.Price  = addSellingPrice.textBox_price.DoubleValue;
                    CommonMethods.setCDMDForAdd(sellingPrice);
                    int id = add(sellingPrice);
                    UIComboBox.sellingPriceForItemAndMode(addSellingPrice.ComboBox, addSellingPrice.ItemId, addSellingPrice.Mode, addSellingPrice);
                    addSellingPrice.ComboBox.SelectedValue = id;
                    b = true;
                }
            } catch (Exception) {
            }
            return(b);
        }