1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| private void btnCalculs_Click(object sender, EventArgs e)
{
string profil = lstProfils[cbProfileECT.SelectedIndex].cle;
string lettre_profil;
lettre_profil = profil.Substring(0, 1);
Program.coeffs.chargerTable("SELECT * FROM Alpha_Compression", "Alpha");
float[] SCT = new float[5];
SCT[0] = Single.Parse(tbSCT1.Text);
SCT[1] = Single.Parse(tbSCT2.Text) * (float)Program.coeffs.extraireValeur("Select Alpha FROM Alpha_Compression WHERE Lettre='" + lettre_profil + "'");
SCT[4] = Single.Parse(tbSCT5.Text);
try
{
lettre_profil = profil.Substring(1, 1);
SCT[2] = Single.Parse(tbSCT3.Text);
SCT[3] = Single.Parse(tbSCT4.Text)
* (float)Program.coeffs.extraireValeur("Select Alpha FROM Alpha_Compression WHERE Lettre='" + lettre_profil + "'");
}
catch
{
}
float x = 0.0F;
for (int i = 0; i < 5; i++)
x += SCT[i];
...
} |
Partager