Exemple #1
0
 void Raschot()
 {
     if (ComboBox3.Text != "" && currency_id != "0")
     {
         sena          = textBox1.Text != "" ? Convert.ToDouble(textBox1.Text) : 0;
         LangName      = lanG.ReturnName(ComboBox3.Text);
         l1.Content    = LangName[1];
         l2.Content    = LangName[2];
         textBox2.Text = Convert.ToString(raschetSum.Kurs(ComboBox3.Text, sena, usd, eur, rub));
         activUSD      = sena * usd;
         if (LangName[1] == "(KGS)")
         {
             basaSum = textBox1.Text.Replace(',', '.');
             typeV   = "(KGS)";
         }
         else if (LangName[1] == "(USD)")
         {
             basaSum = textBox1.Text.Replace(',', '.');
             typeV   = "(USD)";
         }
         else if (LangName[1] == "(EUR)" || LangName[1] == "(RUB)")
         {
             basaSum = textBox2.Text.Replace(',', '.');
             typeV   = "(KGS)";
         }
     }
 }
        private void ComboBox3_DropDownClosed(object sender, EventArgs e)
        {
            textbox_m2.Text   = Convert.ToString(raschetSum.Kurs(ComboBox3.Text, sena, usd, eur, rub));
            textbox_summ.Text = raschetSum.Kurs(ComboBox3.Text, summ, usd, eur, rub).ToString();
            if (textBox_vz.Text != "")
            {
                vznos = Convert.ToDouble(textBox_vz.Text);
            }
            else
            {
                vznos = 0;
            }

            textbox_Som_vz2.Text = raschetSum.Kurs(ComboBox3.Text, vznos, usd, eur, rub).ToString();

            // MessageBox.Show();
            // textboxCarsKGS.Text = raschetSum.ReaderBasa(ComboBox3.Text, Convert.ToDouble(KgsCars), IdCarsCurs).ToString();
            //MessageBox.Show(raschetSum.ReaderBasa(ComboBox3.Text, Convert.ToDouble(KgsCars), IdCarsCurs).ToString());
            LangName    = lanG.ReturnName(ComboBox3.Text);
            l1.Content  = LangName[1];
            l2.Content  = LangName[1];
            l3.Content  = LangName[1];
            l4.Content  = LangName[1];
            l12.Content = LangName[2];
            l22.Content = LangName[2];
            l32.Content = LangName[2];
            l42.Content = LangName[2];
            li2.Content = LangName[2] + ":";
            li1.Content = LangName[1] + ":";
            if (KgsCars != "0")
            {
                textboxCarsUsd.Text = raschetSum.ReaderBasa(ComboBox3.Text, Convert.ToDouble(KgsCars), IdCarsCurs).ToString();
            }
            if (UsdCars != "0")
            {
                textboxCarsKGS.Text = raschetSum.ReaderBasa2(ComboBox3.Text, Convert.ToDouble(UsdCars), IdCarsCurs).ToString();
            }
            SummItogo();
        }