private void btnDetails_Click(object sender, EventArgs e)
 {
     using (FrmProductDetails frm = new FrmProductDetails(this.Product))
     {
         if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Repository.Sql.Product.UpdateDetails(this.Product);
         }
     }
 }
        private void btnSupportNewLanguage_Click(object sender, EventArgs e)
        {
            int languageId = 1;

            using (FrmLanguageSelector frm = new FrmLanguageSelector())
            {
                frm.ShowDialog();
                languageId = frm.SelectedLanguage;

                if (Repository.Sql.Product.LanguageExists(this.Product.ProductId.Value, languageId))
                {
                    MessageBox.Show("Language already exists. Nothing added.");
                    return;
                }
            }

            using (FrmProductDetails frm = new FrmProductDetails(null))
            {
                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    Repository.Sql.Product.InsertDetail(
                        this.Product,
                        languageId,
                        frm.ProductName,
                        frm.ProductDescription,
                        frm.PriceDetails,
                        frm.GuarantyDetails);

                    if (this.Product.ArticleLanguage <= 0)
                    {
                        this.Product.ArticleLanguage  = languageId;
                        this.Product.ProductName      = frm.ProductName;
                        this.Product.BriefDescription = frm.ProductDescription;
                        this.Product.PriceDetails     = frm.PriceDetails;
                        this.Product.GuarantyDetails  = frm.GuarantyDetails;
                    }
                }
            }
        }