|
|
@@ -24,7 +24,7 @@ namespace Fuel01
|
|
|
DataSet1.tb_stationDataTable tb_station = new DataSet1.tb_stationDataTable();
|
|
|
|
|
|
DataSet1.tb_stationRow current_sta = null;
|
|
|
- string Id_sta { get; set; }
|
|
|
+ string Id_sta { get; set; }
|
|
|
|
|
|
List<Produit> lproduit = new List<Produit>();
|
|
|
|
|
|
@@ -193,12 +193,12 @@ namespace Fuel01
|
|
|
}
|
|
|
|
|
|
|
|
|
- private static string makeItCLean(string strExcel, string data)
|
|
|
+ private static string makeItCLean(string strExcel, string data)
|
|
|
{
|
|
|
string ret = data;
|
|
|
- if (strExcel.Length > 0 && strExcel.Substring(0, 1) == "#")
|
|
|
- {
|
|
|
- ret = strExcel.Substring(1) + data;
|
|
|
+ if (strExcel.Length > 0 && strExcel.Substring(0, 1) == "#")
|
|
|
+ {
|
|
|
+ ret = strExcel.Substring(1) + data;
|
|
|
}
|
|
|
return ret;
|
|
|
}
|
|
|
@@ -361,18 +361,27 @@ namespace Fuel01
|
|
|
|
|
|
private void vt_qtt_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- this.vt_ttc.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
+ //this.vt_ttc.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
if (vt_ttc.Text == "")
|
|
|
{
|
|
|
vt_ttc.Text = "0";
|
|
|
vt_qtt.SelectAll();
|
|
|
}
|
|
|
+ float ttc = 0;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ ttc = (float)Convert.ToDouble(this.vt_ttc.Text);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
float qtt = 0;
|
|
|
- float puttc = 0;
|
|
|
+ float puttc = (float)Convert.ToDouble(this.vt_pu.Text);
|
|
|
float tva = 0;
|
|
|
- float ttc = 0;
|
|
|
+
|
|
|
float ht = 0;
|
|
|
-
|
|
|
+
|
|
|
qtt = ttc / puttc;
|
|
|
ht = (qtt * puttc) / (1 + (tva / 100));
|
|
|
|
|
|
@@ -382,8 +391,8 @@ namespace Fuel01
|
|
|
vt_ttc.Refresh();
|
|
|
vt_ht.Refresh();
|
|
|
|
|
|
- this.vt_qtt.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
- this.vt_ht.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
+ //this.vt_qtt.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
+ //this.vt_ht.DataBindings["Text"].BindingManagerBase.EndCurrentEdit();
|
|
|
}
|
|
|
|
|
|
private void vt_qtt_Enter(object sender, EventArgs e)
|