/// <summary>
        /// Update a current Product
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void RegisterRadButton_UpdateCurrentProduct(object sender, EventArgs e)
        {
            //MessageBox.Show("Update Product");
            try
            {
                #region Validate ProductNameRadTextBoxControl
                if (String.IsNullOrEmpty(ProductNameRadTextBoxControl.Text))
                {
                    errorProductProvider.SetError(ProductNameRadTextBoxControl, "Introduzca un nombre para el producto.");
                    ProductNameRadTextBoxControl.Focus();
                    return;
                }
                errorProductProvider.Clear();
                #endregion

                //Update Product
                //Create Product
                Product _p = new Product()
                {
                    ProductID           = this._currentProductToEdit.ProductID,
                    ProductCode         = ProductCodeRadTextBoxControl.Text,
                    ProductName         = ProductNameRadTextBoxControl.Text,
                    Description         = DescriptionRadTextBoxControl.Text != string.Empty ? DescriptionRadTextBoxControl.Text : null,
                    State               = StateRadCheckBox.Checked,
                    InvoiceWithoutStock = InvoiceWithoutStockRadCheckBox.Checked,
                    InvoiceWithPrice    = GetInvoiceWithPrice(),
                };
                if (CategoryIDComboBox.SelectedIndex != 0)
                {
                    _p.CategoryID = (int)CategoryIDComboBox.SelectedValue;
                }

                if (UnitIDComboBox.SelectedIndex != 0)
                {
                    _p.UnitID = (int)UnitIDComboBox.SelectedValue;
                }
                //Create Product Details
                ProductDetail _pd = new ProductDetail()
                {
                    ProductID        = _p.ProductID,
                    ProductDetailsID = this._currentProductToEdit.ProductDetails.FirstOrDefault().ProductDetailsID,
                    ProductCost      = Convert.ToDecimal(ProductCostRadMaskedEditBox.Value),
                    BodegaID         = 1,
                    Stock            = this._currentProductToEdit.ProductDetails.FirstOrDefault().Stock,
                };
                if (Convert.ToDouble(UnitPrice1RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice1 = Convert.ToDecimal(UnitPrice1RadMaskedEditBox.Value);
                }
                if (Convert.ToDouble(UnitPrice2RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice2 = Convert.ToDecimal(UnitPrice2RadMaskedEditBox.Value);
                }
                if (Convert.ToDouble(UnitPrice3RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice3 = Convert.ToDecimal(UnitPrice3RadMaskedEditBox.Value);
                }
                if (TaxIDComboBox.SelectedIndex != 0)
                {
                    _pd.TaxID = (int)TaxIDComboBox.SelectedValue;
                }

                /*
                 * var InitialStock = Convert.ToInt32(InitialStockRadMaskedEditBox.Value);
                 * _pd.Stock = InitialStock;
                 */

                _p.ProductDetails.Add(_pd);

                this._serviceProductBL.Update(_p);
                RadMessageBox.Show(null, "Producto actualizado satisfactoriamente", "JOSIAS INDUSTRIAL SRL", MessageBoxButtons.OK, RadMessageIcon.Info);
            }
            catch (Exception ex)
            {
                RadMessageBox.Show(null, string.Format("Error : {0}", ex.Message), "JOSIAS INDUSTRIAL SRL", MessageBoxButtons.OK, RadMessageIcon.Error);
                return;
            }
        }
        /// <summary>
        /// Register a new Product
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void RegisterRadButton_RegisterNewProduct(object sender, EventArgs e)
        {
            try
            {
                //Validate a new product to register

                #region Validate ProductCodeRadTextBoxControl
                if (String.IsNullOrEmpty(ProductCodeRadTextBoxControl.Text))
                {
                    errorProductProvider.SetError(ProductCodeRadTextBoxControl, "Introduzca un código.");
                    ProductCodeRadTextBoxControl.Focus();
                    return;
                }
                errorProductProvider.Clear();
                if (isExitProductCode)
                {
                    errorProductProvider.SetError(ProductCodeRadTextBoxControl, "Código existe en la base de datos");
                    return;
                }
                errorProductProvider.Clear();
                #endregion
                #region Validate ProductNameRadTextBoxControl
                if (String.IsNullOrEmpty(ProductNameRadTextBoxControl.Text))
                {
                    errorProductProvider.SetError(ProductNameRadTextBoxControl, "Introduzca un nombre para el producto.");
                    ProductNameRadTextBoxControl.Focus();
                    return;
                }
                errorProductProvider.Clear();
                #endregion
                #region Validate ProductCostRadMaskedEditBox
                if (Convert.ToDouble(ProductCostRadMaskedEditBox.Value) == 0.00)
                {
                    errorProductProvider.SetError(ProductCostRadMaskedEditBox, "Introduzca el costo por unidad.");
                    ProductCostRadMaskedEditBox.Focus();
                    return;
                }
                errorProductProvider.Clear();
                #endregion
                #region Validate InitialStockRadMaskedEditBox
                if (Convert.ToInt32(InitialStockRadMaskedEditBox.Value) == 0)
                {
                    errorProductProvider.SetError(InitialStockRadMaskedEditBox, "Introduzca la cantidad Inicial.");
                    InitialStockRadMaskedEditBox.Focus();
                    return;
                }
                errorProductProvider.Clear();
                #endregion

                //Create Product
                Product _p = new Product()
                {
                    ProductCode         = ProductCodeRadTextBoxControl.Text,
                    ProductName         = ProductNameRadTextBoxControl.Text,
                    Description         = DescriptionRadTextBoxControl.Text != string.Empty ? DescriptionRadTextBoxControl.Text : null,
                    State               = StateRadCheckBox.Checked,
                    InvoiceWithoutStock = InvoiceWithoutStockRadCheckBox.Checked,
                    InvoiceWithPrice    = GetInvoiceWithPrice(),
                };
                if (CategoryIDComboBox.SelectedIndex != 0)
                {
                    _p.CategoryID = (int)CategoryIDComboBox.SelectedValue;
                }

                if (UnitIDComboBox.SelectedIndex != 0)
                {
                    _p.UnitID = (int)UnitIDComboBox.SelectedValue;
                }
                //Create Product Details
                ProductDetail _pd = new ProductDetail()
                {
                    ProductCost = Convert.ToDecimal(ProductCostRadMaskedEditBox.Value),
                    BodegaID    = 1,
                };
                if (Convert.ToDouble(UnitPrice1RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice1 = Convert.ToDecimal(UnitPrice1RadMaskedEditBox.Value);
                }
                if (Convert.ToDouble(UnitPrice2RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice2 = Convert.ToDecimal(UnitPrice2RadMaskedEditBox.Value);
                }
                if (Convert.ToDouble(UnitPrice3RadMaskedEditBox.Value) != 0.00)
                {
                    _pd.UnitPrice3 = Convert.ToDecimal(UnitPrice3RadMaskedEditBox.Value);
                }
                if (TaxIDComboBox.SelectedIndex != 0)
                {
                    _pd.TaxID = (int)TaxIDComboBox.SelectedValue;
                }

                var InitialStock = Convert.ToInt32(InitialStockRadMaskedEditBox.Value);
                _pd.Stock = InitialStock;

                //Create Kardex
                Kardex _k = new Kardex()
                {
                    RegisterDate = DateTime.Now,
                    TypeOfMove   = "Inventario Inicial",
                    KardexIn     = InitialStock,
                    KardexStock  = InitialStock
                };

                _pd.Kardexes.Add(_k);
                _p.ProductDetails.Add(_pd);
                this._serviceProductBL.Add(_p);
                this._currentParentForm.FillProductsRadGridView();
                RadMessageBox.Show(null, "Producto registrado satisfactoriamente", "JOSIAS INDUSTRIAL SRL", MessageBoxButtons.OK, RadMessageIcon.Info);
            }
            catch (Exception ex)
            {
                RadMessageBox.Show(null, string.Format("Error : {0}", ex.InnerException), "JOSIAS INDUSTRIAL SRL", MessageBoxButtons.OK, RadMessageIcon.Error);
                return;
            }
        }