Pārlūkot izejas kodu

Corrections importation

Patrick Germain 4 mēneši atpakaļ
vecāks
revīzija
f8d2931112

+ 11 - 11
Fuel_ASO/App.config

@@ -11,35 +11,35 @@
     <userSettings>
         <Fuel01.Properties.Settings>
             <setting name="key_ope" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="nom_ope" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="abrev_ope" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="server_adress" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="serveur_dir" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="server_signalr" serializeAs="String">
                 <value>http://www.aformatix.com/signalR/srv/</value>
             </setting>
-            <setting name="server_adress_datas" serializeAs="String">
-                <value>http://localhost/api/Windows/GetListAchats</value>
-            </setting>
-            <setting name="server_adress_bin" serializeAs="String">
-                <value>http://tdf.axpower.eu/Fuel_ASO_Install.exe</value>
-            </setting>
             <setting name="chemin_copie_locale" serializeAs="String">
                 <value>C:\inetpub\wwwroot\ASOStationService\Achats</value>
             </setting>
             <setting name="use_locale" serializeAs="String">
                 <value>False</value>
             </setting>
+            <setting name="server_adress_datas" serializeAs="String">
+                <value>http://localhost/api/Windows/GetListAchats</value>
+            </setting>
+            <setting name="server_adress_bin" serializeAs="String">
+                <value>http://tdf.axpower.eu/Fuel_ASO_Install.exe</value>
+            </setting>
             <setting name="adresse_copie_api" serializeAs="String">
                 <value>http://localhost/api/FileUpload/</value>
             </setting>

+ 7 - 4
Fuel_ASO/Fuel_ASO.csproj

@@ -45,7 +45,7 @@
     <MapFileExtensions>true</MapFileExtensions>
     <ProductName>Fuel</ProductName>
     <PublisherName>Aformatix</PublisherName>
-    <ApplicationRevision>1</ApplicationRevision>
+    <ApplicationRevision>3</ApplicationRevision>
     <ApplicationVersion>2.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>
@@ -104,7 +104,7 @@
     <ManifestKeyFile>Fuel01_CléTemporaire.pfx</ManifestKeyFile>
   </PropertyGroup>
   <PropertyGroup>
-    <GenerateManifests>false</GenerateManifests>
+    <GenerateManifests>true</GenerateManifests>
   </PropertyGroup>
   <PropertyGroup>
     <TargetZone>LocalIntranet</TargetZone>
@@ -113,7 +113,10 @@
     <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
   </PropertyGroup>
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>false</SignAssembly>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Ionic.Utils.Zip, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c551e179877da246, processorArchitecture=MSIL">
@@ -439,7 +442,7 @@
   </PropertyGroup>
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_StartDate="2018/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_UseUniversalClock="True" BuildVersion_BuildVersioningStyle="None.None.YearDayOfYearStamp.Increment" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_IncrementBeforeBuild="False" BuildVersion_DetectChanges="False" />
+      <UserProperties BuildVersion_DetectChanges="False" BuildVersion_IncrementBeforeBuild="False" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.YearDayOfYearStamp.Increment" BuildVersion_UseUniversalClock="True" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2018/1/1" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
     </VisualStudio>
   </ProjectExtensions>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 38 - 58
Fuel_ASO/Main.Designer.cs

@@ -47,9 +47,7 @@
             this.mnh_vehi_acc = new System.Windows.Forms.ToolStripMenuItem();
             this.mnu_vehi_sep = new System.Windows.Forms.ToolStripSeparator();
             this.mnu_vehi_imp = new System.Windows.Forms.ToolStripMenuItem();
-            this.mnu_vehi_imp_parc = new System.Windows.Forms.ToolStripMenuItem();
             this.mnu_vehi_imp_tdf = new System.Windows.Forms.ToolStripMenuItem();
-            this.parisNice17ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.mnu_sta = new System.Windows.Forms.ToolStripButton();
             this.mnu_sep1 = new System.Windows.Forms.ToolStripSeparator();
             this.mnu_saisie = new System.Windows.Forms.ToolStripButton();
@@ -57,6 +55,7 @@
             this.mnu_param = new System.Windows.Forms.ToolStripButton();
             this.mnu_verif = new System.Windows.Forms.ToolStripButton();
             this.mnu_about = new System.Windows.Forms.ToolStripButton();
+            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
             this.splitContainer1 = new System.Windows.Forms.SplitContainer();
             this.splitContainer3 = new System.Windows.Forms.SplitContainer();
             this.dg_epr = new System.Windows.Forms.DataGridView();
@@ -76,7 +75,6 @@
             this.button1 = new System.Windows.Forms.Button();
             this.text_file = new System.Windows.Forms.TextBox();
             this.timerSigR = new System.Windows.Forms.Timer(this.components);
-            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
             this.statusBar.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.tbepreuveBindingSource)).BeginInit();
@@ -124,7 +122,7 @@
             this.toolStripStatusLabel1.Image = global::Fuel01.Properties.Resources.red;
             this.toolStripStatusLabel1.Margin = new System.Windows.Forms.Padding(0);
             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
-            this.toolStripStatusLabel1.Size = new System.Drawing.Size(34, 24);
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(41, 25);
             this.toolStripStatusLabel1.Text = " ";
             this.toolStripStatusLabel1.Visible = false;
             this.toolStripStatusLabel1.TextChanged += new System.EventHandler(this.toolStripStatusLabel1_TextChanged);
@@ -132,17 +130,17 @@
             // eprstat
             // 
             this.eprstat.Name = "eprstat";
-            this.eprstat.Size = new System.Drawing.Size(0, 17);
+            this.eprstat.Size = new System.Drawing.Size(0, 15);
             // 
             // stastat
             // 
             this.stastat.Name = "stastat";
-            this.stastat.Size = new System.Drawing.Size(0, 17);
+            this.stastat.Size = new System.Drawing.Size(0, 15);
             // 
             // tslbl1
             // 
             this.tslbl1.Name = "tslbl1";
-            this.tslbl1.Size = new System.Drawing.Size(0, 17);
+            this.tslbl1.Size = new System.Drawing.Size(0, 15);
             // 
             // dataSet1
             // 
@@ -203,7 +201,7 @@
             this.main_mnu.Name = "main_mnu";
             this.main_mnu.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0);
             this.main_mnu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
-            this.main_mnu.Size = new System.Drawing.Size(1148, 25);
+            this.main_mnu.Size = new System.Drawing.Size(1148, 34);
             this.main_mnu.TabIndex = 12;
             this.main_mnu.Text = "Menu";
             // 
@@ -213,7 +211,7 @@
             this.mnu_ope.Image = ((System.Drawing.Image)(resources.GetObject("mnu_ope.Image")));
             this.mnu_ope.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_ope.Name = "mnu_ope";
-            this.mnu_ope.Size = new System.Drawing.Size(64, 22);
+            this.mnu_ope.Size = new System.Drawing.Size(96, 29);
             this.mnu_ope.Text = "&Opération";
             this.mnu_ope.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
             this.mnu_ope.Click += new System.EventHandler(this.mnu_ope_Click);
@@ -228,66 +226,50 @@
             this.mnu_vehi_dow.Image = ((System.Drawing.Image)(resources.GetObject("mnu_vehi_dow.Image")));
             this.mnu_vehi_dow.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_vehi_dow.Name = "mnu_vehi_dow";
-            this.mnu_vehi_dow.Size = new System.Drawing.Size(69, 28);
+            this.mnu_vehi_dow.Size = new System.Drawing.Size(102, 29);
             this.mnu_vehi_dow.Text = "&Véhicules";
             // 
             // mnh_vehi_acc
             // 
             this.mnh_vehi_acc.Name = "mnh_vehi_acc";
-            this.mnh_vehi_acc.Size = new System.Drawing.Size(120, 22);
+            this.mnh_vehi_acc.Size = new System.Drawing.Size(270, 34);
             this.mnh_vehi_acc.Text = "Accéder";
             this.mnh_vehi_acc.Click += new System.EventHandler(this.mnh_vehi_acc_Click);
             // 
             // mnu_vehi_sep
             // 
             this.mnu_vehi_sep.Name = "mnu_vehi_sep";
-            this.mnu_vehi_sep.Size = new System.Drawing.Size(117, 6);
+            this.mnu_vehi_sep.Size = new System.Drawing.Size(267, 6);
             // 
             // mnu_vehi_imp
             // 
             this.mnu_vehi_imp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.mnu_vehi_imp_parc,
-            this.mnu_vehi_imp_tdf,
-            this.parisNice17ToolStripMenuItem});
+            this.mnu_vehi_imp_tdf});
             this.mnu_vehi_imp.Name = "mnu_vehi_imp";
-            this.mnu_vehi_imp.Size = new System.Drawing.Size(120, 22);
+            this.mnu_vehi_imp.Size = new System.Drawing.Size(270, 34);
             this.mnu_vehi_imp.Text = "Importer";
             // 
-            // mnu_vehi_imp_parc
-            // 
-            this.mnu_vehi_imp_parc.Name = "mnu_vehi_imp_parc";
-            this.mnu_vehi_imp_parc.Size = new System.Drawing.Size(143, 22);
-            this.mnu_vehi_imp_parc.Text = "Parc Auto";
-            this.mnu_vehi_imp_parc.Click += new System.EventHandler(this.mnu_vehi_imp_parc_Click);
-            // 
             // mnu_vehi_imp_tdf
             // 
             this.mnu_vehi_imp_tdf.Name = "mnu_vehi_imp_tdf";
-            this.mnu_vehi_imp_tdf.Size = new System.Drawing.Size(143, 22);
+            this.mnu_vehi_imp_tdf.Size = new System.Drawing.Size(270, 34);
             this.mnu_vehi_imp_tdf.Text = "TDF";
             this.mnu_vehi_imp_tdf.Click += new System.EventHandler(this.mnu_vehi_imp_tdf_Click);
             // 
-            // parisNice17ToolStripMenuItem
-            // 
-            this.parisNice17ToolStripMenuItem.Name = "parisNice17ToolStripMenuItem";
-            this.parisNice17ToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
-            this.parisNice17ToolStripMenuItem.Text = "Paris-Nice 17";
-            this.parisNice17ToolStripMenuItem.Click += new System.EventHandler(this.parisNice17ToolStripMenuItem_Click);
-            // 
             // mnu_sta
             // 
             this.mnu_sta.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
             this.mnu_sta.Image = ((System.Drawing.Image)(resources.GetObject("mnu_sta.Image")));
             this.mnu_sta.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_sta.Name = "mnu_sta";
-            this.mnu_sta.Size = new System.Drawing.Size(53, 28);
+            this.mnu_sta.Size = new System.Drawing.Size(79, 29);
             this.mnu_sta.Text = "Stations";
             this.mnu_sta.Click += new System.EventHandler(this.mnu_sta_Click);
             // 
             // mnu_sep1
             // 
             this.mnu_sep1.Name = "mnu_sep1";
-            this.mnu_sep1.Size = new System.Drawing.Size(6, 31);
+            this.mnu_sep1.Size = new System.Drawing.Size(6, 34);
             // 
             // mnu_saisie
             // 
@@ -295,7 +277,7 @@
             this.mnu_saisie.Image = ((System.Drawing.Image)(resources.GetObject("mnu_saisie.Image")));
             this.mnu_saisie.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_saisie.Name = "mnu_saisie";
-            this.mnu_saisie.Size = new System.Drawing.Size(40, 28);
+            this.mnu_saisie.Size = new System.Drawing.Size(60, 29);
             this.mnu_saisie.Text = "Saisie";
             this.mnu_saisie.Click += new System.EventHandler(this.mnu_saisie_Click);
             // 
@@ -305,7 +287,7 @@
             this.mnu_gest.Image = ((System.Drawing.Image)(resources.GetObject("mnu_gest.Image")));
             this.mnu_gest.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_gest.Name = "mnu_gest";
-            this.mnu_gest.Size = new System.Drawing.Size(51, 28);
+            this.mnu_gest.Size = new System.Drawing.Size(76, 29);
             this.mnu_gest.Text = "Gestion";
             this.mnu_gest.Click += new System.EventHandler(this.mnu_gest_Click);
             // 
@@ -315,7 +297,7 @@
             this.mnu_param.Image = ((System.Drawing.Image)(resources.GetObject("mnu_param.Image")));
             this.mnu_param.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_param.Name = "mnu_param";
-            this.mnu_param.Size = new System.Drawing.Size(121, 28);
+            this.mnu_param.Size = new System.Drawing.Size(180, 29);
             this.mnu_param.Text = "Paramètres généraux";
             this.mnu_param.Click += new System.EventHandler(this.mnu_param_Click);
             // 
@@ -324,7 +306,7 @@
             this.mnu_verif.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
             this.mnu_verif.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_verif.Name = "mnu_verif";
-            this.mnu_verif.Size = new System.Drawing.Size(58, 22);
+            this.mnu_verif.Size = new System.Drawing.Size(87, 29);
             this.mnu_verif.Text = "Vérif TVA";
             this.mnu_verif.Click += new System.EventHandler(this.mnu_verif_Click);
             // 
@@ -336,12 +318,22 @@
             this.mnu_about.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.mnu_about.Name = "mnu_about";
             this.mnu_about.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.mnu_about.Size = new System.Drawing.Size(59, 28);
+            this.mnu_about.Size = new System.Drawing.Size(90, 29);
             this.mnu_about.Text = "A Propos";
             this.mnu_about.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             this.mnu_about.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal;
             this.mnu_about.Click += new System.EventHandler(this.mnu_about_Click);
             // 
+            // toolStripButton1
+            // 
+            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+            this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
+            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.toolStripButton1.Name = "toolStripButton1";
+            this.toolStripButton1.Size = new System.Drawing.Size(193, 29);
+            this.toolStripButton1.Text = "Paramètres techniques";
+            this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
+            // 
             // splitContainer1
             // 
             this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -382,7 +374,7 @@
             this.splitContainer3.Panel2.Controls.Add(this.bt_test);
             this.splitContainer3.Panel2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.splitContainer3_Panel2_MouseDoubleClick);
             this.splitContainer3.Size = new System.Drawing.Size(378, 510);
-            this.splitContainer3.SplitterDistance = 450;
+            this.splitContainer3.SplitterDistance = 448;
             this.splitContainer3.SplitterWidth = 6;
             this.splitContainer3.TabIndex = 1;
             // 
@@ -404,7 +396,7 @@
             this.dg_epr.ReadOnly = true;
             this.dg_epr.RowHeadersWidth = 62;
             this.dg_epr.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dg_epr.Size = new System.Drawing.Size(378, 450);
+            this.dg_epr.Size = new System.Drawing.Size(378, 448);
             this.dg_epr.TabIndex = 6;
             this.dg_epr.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dg_epr_CellMouseDoubleClick);
             // 
@@ -443,7 +435,7 @@
             this.bt_doAll.Location = new System.Drawing.Point(225, 0);
             this.bt_doAll.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.bt_doAll.Name = "bt_doAll";
-            this.bt_doAll.Size = new System.Drawing.Size(75, 54);
+            this.bt_doAll.Size = new System.Drawing.Size(75, 56);
             this.bt_doAll.TabIndex = 4;
             this.bt_doAll.Text = "ALL";
             this.bt_doAll.UseVisualStyleBackColor = true;
@@ -456,7 +448,7 @@
             this.bt_do.Location = new System.Drawing.Point(150, 0);
             this.bt_do.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.bt_do.Name = "bt_do";
-            this.bt_do.Size = new System.Drawing.Size(75, 54);
+            this.bt_do.Size = new System.Drawing.Size(75, 56);
             this.bt_do.TabIndex = 3;
             this.bt_do.Text = "Do";
             this.bt_do.UseVisualStyleBackColor = true;
@@ -469,7 +461,7 @@
             this.bt_retry.Location = new System.Drawing.Point(75, 0);
             this.bt_retry.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.bt_retry.Name = "bt_retry";
-            this.bt_retry.Size = new System.Drawing.Size(75, 54);
+            this.bt_retry.Size = new System.Drawing.Size(75, 56);
             this.bt_retry.TabIndex = 1;
             this.bt_retry.Text = "ReTry SigR";
             this.bt_retry.UseVisualStyleBackColor = true;
@@ -482,7 +474,7 @@
             this.bt_test.Location = new System.Drawing.Point(0, 0);
             this.bt_test.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.bt_test.Name = "bt_test";
-            this.bt_test.Size = new System.Drawing.Size(75, 54);
+            this.bt_test.Size = new System.Drawing.Size(75, 56);
             this.bt_test.TabIndex = 0;
             this.bt_test.Text = "Msg test";
             this.bt_test.UseVisualStyleBackColor = true;
@@ -508,7 +500,7 @@
             this.splitContainer2.Panel2.Controls.Add(this.text_file);
             this.splitContainer2.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer2_Panel2_Paint);
             this.splitContainer2.Size = new System.Drawing.Size(764, 510);
-            this.splitContainer2.SplitterDistance = 450;
+            this.splitContainer2.SplitterDistance = 448;
             this.splitContainer2.SplitterWidth = 6;
             this.splitContainer2.TabIndex = 0;
             // 
@@ -531,7 +523,7 @@
             this.dg_sta.ReadOnly = true;
             this.dg_sta.RowHeadersWidth = 62;
             this.dg_sta.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dg_sta.Size = new System.Drawing.Size(764, 450);
+            this.dg_sta.Size = new System.Drawing.Size(764, 448);
             this.dg_sta.TabIndex = 7;
             this.dg_sta.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dg_sta_CellMouseDoubleClick);
             // 
@@ -600,16 +592,6 @@
             this.timerSigR.Interval = 5000;
             this.timerSigR.Tick += new System.EventHandler(this.timerSigR_Tick);
             // 
-            // toolStripButton1
-            // 
-            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
-            this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
-            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.toolStripButton1.Name = "toolStripButton1";
-            this.toolStripButton1.Size = new System.Drawing.Size(131, 22);
-            this.toolStripButton1.Text = "Paramètres techniques";
-            this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
-            // 
             // Main
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -686,7 +668,6 @@
         private System.Windows.Forms.ToolStripSeparator mnu_sep1;
         private System.Windows.Forms.ToolStripButton mnu_sta;
         private System.Windows.Forms.ToolStripMenuItem mnu_vehi_imp_tdf;
-        private System.Windows.Forms.ToolStripMenuItem mnu_vehi_imp_parc;
         private System.Windows.Forms.ToolStripMenuItem mnu_vehi_imp;
         private System.Windows.Forms.ToolStripSeparator mnu_vehi_sep;
         private System.Windows.Forms.ToolStripMenuItem mnh_vehi_acc;
@@ -703,7 +684,6 @@
         private System.Windows.Forms.Button bt_doAll;
         private System.Windows.Forms.TextBox text_file;
         private System.Windows.Forms.ToolStripButton mnu_verif;
-        private System.Windows.Forms.ToolStripMenuItem parisNice17ToolStripMenuItem;
         private System.Windows.Forms.Button button1;
         private System.Windows.Forms.ToolStripButton toolStripButton1;
     }

+ 8 - 8
Fuel_ASO/Main.resx

@@ -139,7 +139,7 @@
   <data name="mnu_ope.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -154,7 +154,7 @@
   <data name="mnu_vehi_dow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -169,7 +169,7 @@
   <data name="mnu_sta.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -184,7 +184,7 @@
   <data name="mnu_saisie.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -199,7 +199,7 @@
   <data name="mnu_gest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -214,7 +214,7 @@
   <data name="mnu_param.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -229,7 +229,7 @@
   <data name="mnu_about.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
@@ -244,7 +244,7 @@
   <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
+        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
         YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
         /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
         I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM

+ 18 - 18
Fuel_ASO/Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace Fuel01.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -97,55 +97,55 @@ namespace Fuel01.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/ASOStationService/achats")]
-        public string server_adress_datas {
+        [global::System.Configuration.DefaultSettingValueAttribute("C:\\inetpub\\wwwroot\\ASOStationService\\Achats")]
+        public string chemin_copie_locale {
             get {
-                return ((string)(this["server_adress_datas"]));
+                return ((string)(this["chemin_copie_locale"]));
             }
             set {
-                this["server_adress_datas"] = value;
+                this["chemin_copie_locale"] = value;
             }
         }
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("http://www.aformatix.com/ASOstationservice/download/Fuel_ASO_Install.exe")]
-        public string server_adress_bin {
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool use_locale {
             get {
-                return ((string)(this["server_adress_bin"]));
+                return ((bool)(this["use_locale"]));
             }
             set {
-                this["server_adress_bin"] = value;
+                this["use_locale"] = value;
             }
         }
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("C:\\inetpub\\wwwroot\\ASOStationService\\Achats")]
-        public string chemin_copie_locale {
+        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/api/Windows/GetListAchats")]
+        public string server_adress_datas {
             get {
-                return ((string)(this["chemin_copie_locale"]));
+                return ((string)(this["server_adress_datas"]));
             }
             set {
-                this["chemin_copie_locale"] = value;
+                this["server_adress_datas"] = value;
             }
         }
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("False")]
-        public bool use_locale {
+        [global::System.Configuration.DefaultSettingValueAttribute("http://tdf.axpower.eu/Fuel_ASO_Install.exe")]
+        public string server_adress_bin {
             get {
-                return ((bool)(this["use_locale"]));
+                return ((string)(this["server_adress_bin"]));
             }
             set {
-                this["use_locale"] = value;
+                this["server_adress_bin"] = value;
             }
         }
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/ASOStationService/api/FileUpLoad/upLoadFiles")]
+        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/api/FileUpload/")]
         public string adresse_copie_api {
             get {
                 return ((string)(this["adresse_copie_api"]));

+ 7 - 7
Fuel_ASO/Properties/Settings.settings

@@ -20,20 +20,20 @@
     <Setting Name="server_signalr" Type="System.String" Scope="User">
       <Value Profile="(Default)">http://www.aformatix.com/signalR/srv/</Value>
     </Setting>
-    <Setting Name="server_adress_datas" Type="System.String" Scope="User">
-      <Value Profile="(Default)">http://localhost/ASOStationService/achats</Value>
-    </Setting>
-    <Setting Name="server_adress_bin" Type="System.String" Scope="User">
-      <Value Profile="(Default)">http://www.aformatix.com/ASOstationservice/download/Fuel_ASO_Install.exe</Value>
-    </Setting>
     <Setting Name="chemin_copie_locale" Type="System.String" Scope="User">
       <Value Profile="(Default)">C:\inetpub\wwwroot\ASOStationService\Achats</Value>
     </Setting>
     <Setting Name="use_locale" Type="System.Boolean" Scope="User">
       <Value Profile="(Default)">False</Value>
     </Setting>
+    <Setting Name="server_adress_datas" Type="System.String" Scope="User">
+      <Value Profile="(Default)">http://localhost/api/Windows/GetListAchats</Value>
+    </Setting>
+    <Setting Name="server_adress_bin" Type="System.String" Scope="User">
+      <Value Profile="(Default)">http://tdf.axpower.eu/Fuel_ASO_Install.exe</Value>
+    </Setting>
     <Setting Name="adresse_copie_api" Type="System.String" Scope="User">
-      <Value Profile="(Default)">http://localhost/ASOStationService/api/FileUpLoad/upLoadFiles</Value>
+      <Value Profile="(Default)">http://localhost/api/FileUpload/</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 392 - 389
Fuel_ASO/f_impvehi.cs

@@ -36,14 +36,7 @@ namespace Fuel01
             {
                 Import_tdf();
             }
-            else if (mode == "parc")
-            {
-                Import_parc();
-            }
-            else
-            {
-                Import_PN();
-            }
+            
         }
 
         private void Bt_openFile_Click(object sender, EventArgs e)
@@ -67,17 +60,33 @@ namespace Fuel01
 
         private void F_vehi_FormClosing(object sender, FormClosingEventArgs e)
         {
-            if (hasChanged) SaveData();
+
             DataTable tb_vehi_change = tb_vehi.GetChanges();
 
-            if (tb_vehi_change != null)
+            if (tb_vehi_change != null || hasChanged)
             {
-                MessageBox.Show("Veuillez Valider ou Abandonner", "Modifications en cours");
+                var result = MessageBox.Show("Voulez-vous valider les madifications apportées ?", "Modifications en cours",
+                    MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
+
+                if (result == DialogResult.Yes) 
+                {
+                    SaveData();
+                }
+                if (result == DialogResult.Cancel)
+                {
+                    e.Cancel = true;
+                    return;
+                }
             }
-            e.Cancel = (tb_vehi_change != null);
+
+            e.Cancel = false;
         }
 
-        private void Import_parc()
+
+
+
+
+        private void Import_tdf()
         {
             Excel.Application xlApp;
             Excel.Workbook xlWorkBook;
@@ -91,21 +100,24 @@ namespace Fuel01
             }
             catch (Exception ex)
             {
-                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct {ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct\r\n{ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 return;
             }
 
-            uint[] indexCol = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15 };
-            for (uint row = 3; row < 800; row++)
+            uint[] indexCol = { 1, 2, 6, 8 };
+            string categ = "A";
+            int indiceVide = 0;
+
+            for (uint row = 2; row < 800 && indiceVide<10; row++)
             {
                 string model = "";
                 string immat = "";
                 string bandeau = "";
+                string cmp = "";
                 string famille = "";
                 string pilote = "";
-                string carbu = "D";
-                string cmp = "";
-                string categ = "A";
+                bool ligneVide = true;
+                
 
                 int vide = 0;
                 for (int colNdx = 0; colNdx < indexCol.Length; colNdx++)
@@ -114,6 +126,7 @@ namespace Fuel01
                     var varex = xlWorkSheet.Cells[row, col].Value;
                     if (varex != null)
                     {
+                        ligneVide = false;
                         string b = "";
                         string mytype = varex.GetType().ToString();
                         switch (mytype)
@@ -130,6 +143,10 @@ namespace Fuel01
                                 break;
                         }
 
+                        int p;
+                        if (col == 12 && (p = b.IndexOf('\n')) != -1)
+                            b = b.Substring(0, p);
+                        b = b.Replace('\n', ' ');
                         while (b.Contains("  "))
                             b = b.Replace("  ", " ");
                         switch (col)
@@ -137,223 +154,35 @@ namespace Fuel01
                             case 1:
                                 bandeau = b;
                                 break;
-
                             case 2:
-                                famille = b;
-                                break;
-
-                            case 3:
-                                pilote = b;
-                                break;
-
-                            case 4:
-                                pilote = new StringBuilder(pilote).Append(" ").Append(b).ToString();
-                                break;
-
-                            case 5:
-                                carbu = b;
-                                break;
-
-                            case 6:
                                 model = b;
                                 break;
 
-                            case 7:
-                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
+                            case 6:
+                                famille = b;
                                 break;
-
                             case 8:
-                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
-                                break;
-
-                            case 9:
-                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
-                                break;
-
-                            case 15:
-                                categ = b.ToUpper() == "M" ? "M" : "A";
+                                immat = b;
                                 break;
                         }
                     }
                 }
 
-                if (bandeau != "")
+                if (ligneVide)
                 {
-                    vide = 0;
-                    DataSet1.tb_vehiRow myNewRow = null;
-                    string key = "999999";
-                    bool newrow = false;
                     try
                     {
-                        if (!checkZero.Checked)
-                        {
-
-                            myNewRow = FindOnekey(bandeau);
-                            if (myNewRow == null)
-                            {
-                                continue;
-                            }
-                            else
-                            {
-                                key = myNewRow["key_vehi"].ToString();
-                            }
-                        }
-                        if (myNewRow == null)
-                        {
-                            key = FindNewkey();
-                            myNewRow = tb_vehi.Newtb_vehiRow();
-                            newrow = true;
-                        }
-                        myNewRow["key_vehi"] = key;
-                        myNewRow["ope_vehi"] = Program.key_ope;
-                        myNewRow["num_vehi"] = bandeau;
-                        myNewRow["cmpnum_vehi"] = cmp;
-                        myNewRow["immat_vehi"] = immat;
-                        myNewRow["type_vehi"] = model;
-                        myNewRow["famille_vehi"] = famille;
-                        myNewRow["categ_vehi"] = categ;
-                        myNewRow["cond_vehi"] = pilote;
-                        myNewRow["sort1_vehi"] = string.Format("{0}{1:00000}{2}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"]);
-                        switch (carbu)
-                        {
-                            case "D":
-                                carbu = "DIESEL";
-                                break;
-
-                            case "E":
-                                carbu = "SP98";
-                                break;
-
-                            default:
-                                carbu = "?";
-                                break;
-                        }
-
-                        if (carbu == "?")
-                        {
-                            if (categ == "M")
-                            {
-                                myNewRow["carbu_vehi"] = "SP98";
-                            }
-                            else
-                            {
-                                myNewRow["carbu_vehi"] = "DIESEL";
-                            }
-                        }
-                        else
+                        string m = (string)(xlWorkSheet.Cells[row, 4].Value);
+                        if (m != null && m.Contains("MOTOS"))
                         {
-                            myNewRow["carbu_vehi"] = carbu;
+                            categ = "M";
                         }
-
-                        if (newrow)
-                            tb_vehi.Addtb_vehiRow(myNewRow);
-                        StatusLabel1.Text = string.Format("{0}{1:00000}{2}-{3}-{4}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"], myNewRow["cond_vehi"], myNewRow["immat_vehi"]);
-                        Application.DoEvents();
-                        Thread.Sleep(5);
                     }
-                    catch (Exception ex)
-                    {
-                        MessageBox.Show(string.Format("{3}\r\nPb. à insertion de {0} {1} {2}", bandeau, pilote, model, ex.Message));
-                    }
-                }
-                else
-                { vide++; }
-                if (vide > 10)
-                {
-                    break;
-                }
-            }
-
-            xlApp?.Quit();
-
-            StatusLabel1.Text = "F I N I .................";
-        }
-
-        private void Import_PN()
-        {
-            Excel.Application xlApp;
-            Excel.Workbook xlWorkBook;
-            Excel.Worksheet xlWorkSheet;
-            object misValue = System.Reflection.Missing.Value;
-            try
-            {
-                xlApp = new Excel.Application();
-                xlWorkBook = xlApp.Workbooks.Open(textNomFile.Text, misValue);
-                xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
-            }
-            catch (Exception ex)
-            {
-                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct \r\n {ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                return;
-            }
-            uint[] indexCol = { 1, 3, 4, 6, 7, 8, 9 };
-            string categ = "A";
-            for (uint row = 2; row < 200; row++)
-            {
-                string model = "";
-                string immat = "";
-                string bandeau = "";
-                string carbu = "";
-                string famille = "";
-                string pilote = "";
-
-                int vide = 0;
-                for (int colNdx = 0; colNdx < indexCol.Length; colNdx++)
-                {
-                    uint col = indexCol[colNdx];
-                    var varex = xlWorkSheet.Cells[row, col].Value;
-                    if (varex != null)
+                    catch (Exception e)
                     {
-                        string b = "";
-                        string mytype = varex.GetType().ToString();
-                        switch (mytype)
-                        {
-                            case "System.Int16":
-                            case "System.Int32":
-                            case "System.Int64":
-                            case "System.Double":
-                                b = ((Int32)varex).ToString();
-                                break;
-
-                            default:
-                                b = (string)varex;
-                                break;
-                        }
-
-                        b = b.Replace('\n', ' ');
-                        while (b.Contains("  "))
-                            b = b.Replace("  ", " ");
-                        switch (col)
-                        {
-                            case 1:
-                                bandeau = b;
-                                break;
-
-                            case 3:
-                                famille = b;
-                                break;
-
-                            case 4:
-                                pilote = b;
-                                break;
-
-                            case 6:
-                                model = b;
-                                break;
-
-                            case 7:
-                                carbu = b;
-                                break;
-
-                            case 8:
-                                immat = b;
-                                break;
-
-                            case 9:
-                                categ = b;
-                                break;
-                        }
+                        Console.WriteLine(e.Message);
                     }
+                    indiceVide++;
                 }
 
                 if (bandeau != "")
@@ -381,14 +210,14 @@ namespace Fuel01
                         myNewRow["key_vehi"] = key;
                         myNewRow["ope_vehi"] = Program.key_ope;
                         myNewRow["num_vehi"] = bandeau;
-                        myNewRow["cmpnum_vehi"] = "";
+                        myNewRow["cmpnum_vehi"] = cmp;
                         myNewRow["immat_vehi"] = immat;
                         myNewRow["type_vehi"] = model;
                         myNewRow["famille_vehi"] = famille;
                         myNewRow["categ_vehi"] = categ;
                         myNewRow["cond_vehi"] = pilote;
                         myNewRow["sort1_vehi"] = string.Format("{0}{1:00000}{2}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"]);
-                        myNewRow["carbu_vehi"] = carbu == "E" ? "SP98" : "DIESEL";
+                        myNewRow["carbu_vehi"] = categ == "M" ? "SP98" : "DIESEL";
                         if (newrow)
                             tb_vehi.Addtb_vehiRow(myNewRow);
                         StatusLabel1.Text = string.Format("{0}{1:00000}{2}-{3}-{4}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"], myNewRow["cond_vehi"], myNewRow["immat_vehi"]);
@@ -405,178 +234,13 @@ namespace Fuel01
                     break;
             }
 
+            xlWorkBook?.Close();
             xlApp?.Quit();
 
             StatusLabel1.Text = "F I N I .................";
+            MessageBox.Show($"Importation de {textNomFile.Text} terminée.", "Importation",MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
-
-        private void Import_tdf()
-        {
-            Excel.Application xlApp;
-            Excel.Workbook xlWorkBook;
-            Excel.Worksheet xlWorkSheet;
-            object misValue = System.Reflection.Missing.Value;
-            try
-            {
-                xlApp = new Excel.Application();
-                xlWorkBook = xlApp.Workbooks.Open(textNomFile.Text, misValue);
-                xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
-            }
-            catch (Exception ex)
-            {
-                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct\r\n{ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                return;
-            }
-
-            uint[] indexCol = { 2, 4, 5, 6, 7, 8, 11, 12 };
-            string categ = "A";
-            for (uint row = 2; row < 800; row++)
-            {
-                string model = "";
-                string immat = "";
-                string bandeau = "";
-                string cmp = "";
-                string famille = "";
-                string pilote = "";
-                bool ligneVide = true;
-
-                int vide = 0;
-                for (int colNdx = 0; colNdx < indexCol.Length; colNdx++)
-                {
-                    uint col = indexCol[colNdx];
-                    var varex = xlWorkSheet.Cells[row, col].Value;
-                    if (varex != null)
-                    {
-                        string b = "";
-                        string mytype = varex.GetType().ToString();
-                        switch (mytype)
-                        {
-                            case "System.Int16":
-                            case "System.Int32":
-                            case "System.Int64":
-                            case "System.Double":
-                                b = ((Int32)varex).ToString();
-                                break;
-
-                            default:
-                                b = (string)varex;
-                                break;
-                        }
-
-                        int p;
-                        if (col == 12 && (p = b.IndexOf('\n')) != -1)
-                            b = b.Substring(0, p);
-                        b = b.Replace('\n', ' ');
-                        while (b.Contains("  "))
-                            b = b.Replace("  ", " ");
-                        switch (col)
-                        {
-                            case 2:
-                                model = b;
-                                break;
-
-                            case 4:
-
-                                immat = new StringBuilder(immat).Append(" ").Append(b).ToString();
-                                break;
-
-                            case 5:
-                                immat = new StringBuilder(immat).Append(" ").Append(b).ToString();
-                                break;
-
-                            case 6:
-                                immat = new StringBuilder(immat).Append(" ").Append(b).ToString();
-                                break;
-
-                            case 7:
-                                bandeau = b;
-                                break;
-
-                            case 8:
-                                cmp = b;
-                                break;
-
-                            case 11:
-                                famille = b;
-                                break;
-
-                            case 12:
-                                pilote = b;
-                                break;
-                        }
-                    }
-                }
-
-                if (ligneVide)
-                {
-                    try
-                    {
-                        string m = (string)(xlWorkSheet.Cells[row, 4].Value);
-                        if (m != null && m.Contains("MOTOS"))
-                        {
-                            categ = "M";
-                        }
-                    }
-                    catch (Exception e)
-                    {
-                        Console.WriteLine(e.Message);
-                    }
-                }
-                if (bandeau != "")
-                {
-                    vide = 0;
-                    DataSet1.tb_vehiRow myNewRow = null;
-                    string key = "999999";
-                    bool newrow = false;
-                    try
-                    {
-                        if (!checkZero.Checked)
-                        {
-                            myNewRow = FindOnekey(bandeau);
-                            if (myNewRow != null)
-                            {
-                                key = myNewRow["key_vehi"].ToString();
-                            }
-                        }
-                        if (myNewRow == null)
-                        {
-                            key = FindNewkey();
-                            myNewRow = tb_vehi.Newtb_vehiRow();
-                            newrow = true;
-                        }
-                        myNewRow["key_vehi"] = key;
-                        myNewRow["ope_vehi"] = Program.key_ope;
-                        myNewRow["num_vehi"] = bandeau;
-                        myNewRow["cmpnum_vehi"] = cmp;
-                        myNewRow["immat_vehi"] = immat;
-                        myNewRow["type_vehi"] = model;
-                        myNewRow["famille_vehi"] = famille;
-                        myNewRow["categ_vehi"] = categ;
-                        myNewRow["cond_vehi"] = pilote;
-                        myNewRow["sort1_vehi"] = string.Format("{0}{1:00000}{2}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"]);
-                        myNewRow["carbu_vehi"] = categ == "M" ? "SP98" : "DIESEL";
-                        if (newrow)
-                            tb_vehi.Addtb_vehiRow(myNewRow);
-                        StatusLabel1.Text = string.Format("{0}{1:00000}{2}-{3}-{4}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"], myNewRow["cond_vehi"], myNewRow["immat_vehi"]);
-                        Application.DoEvents();
-                    }
-                    catch (Exception ex)
-                    {
-                        MessageBox.Show(string.Format("{3}\r\nPb. à insertion de {0} {1} {2}", bandeau, pilote, model, ex.Message));
-                    }
-                }
-                else
-                    vide++;
-                if (vide > 10)
-                    break;
-            }
-
-            xlApp?.Quit();
-
-            StatusLabel1.Text = "F I N I .................";
-        }
-
-        private void Init_list_famille()
+        private void Init_list_famille()
         {
             XDocument xRoot = XDocument.Load(Program.folder + @"\param\famille.xml");
             var data = from item in xRoot.Descendants("tb_famille")
@@ -616,7 +280,11 @@ namespace Fuel01
             if (File.Exists(Program.subfolder + @"\vehicule.json"))
                 File.Copy(Program.subfolder + @"\vehicule.json", Program.subfolder + @"\vehicule.back.json", true);
 
-            DbUtil.SaveToJson<DataSet1.tb_vehiDataTable>(Program.subfolder + @"\statvehiculeion.json", tb_vehi);
+            if (DbUtil.SaveToJson<DataSet1.tb_vehiDataTable>(Program.subfolder + @"\vehicule.json", tb_vehi))
+            {
+                tb_vehi.AcceptChanges();
+                hasChanged = false;
+            }
         }
 
         private void Tb_allValid_Click(object sender, EventArgs e)
@@ -758,4 +426,339 @@ namespace Fuel01
         }
         #endregion fonctions
     }
-}
+}
+
+/*
+         private void Import_parc()
+        {
+            Excel.Application xlApp;
+            Excel.Workbook xlWorkBook;
+            Excel.Worksheet xlWorkSheet;
+            object misValue = System.Reflection.Missing.Value;
+            try
+            {
+                xlApp = new Excel.Application();
+                xlWorkBook = xlApp.Workbooks.Open(textNomFile.Text, misValue);
+                xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct {ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                return;
+            }
+
+            uint[] indexCol = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15 };
+            for (uint row = 3; row < 800; row++)
+            {
+                string model = "";
+                string immat = "";
+                string bandeau = "";
+                string famille = "";
+                string pilote = "";
+                string carbu = "D";
+                string cmp = "";
+                string categ = "A";
+
+                int vide = 0;
+                for (int colNdx = 0; colNdx < indexCol.Length; colNdx++)
+                {
+                    uint col = indexCol[colNdx];
+                    var varex = xlWorkSheet.Cells[row, col].Value;
+                    if (varex != null)
+                    {
+                        string b = "";
+                        string mytype = varex.GetType().ToString();
+                        switch (mytype)
+                        {
+                            case "System.Int16":
+                            case "System.Int32":
+                            case "System.Int64":
+                            case "System.Double":
+                                b = ((Int32)varex).ToString();
+                                break;
+
+                            default:
+                                b = (string)varex;
+                                break;
+                        }
+
+                        while (b.Contains("  "))
+                            b = b.Replace("  ", " ");
+                        switch (col)
+                        {
+                            case 1:
+                                bandeau = b;
+                                break;
+
+                            case 2:
+                                famille = b;
+                                break;
+
+                            case 3:
+                                pilote = b;
+                                break;
+
+                            case 4:
+                                pilote = new StringBuilder(pilote).Append(" ").Append(b).ToString();
+                                break;
+
+                            case 5:
+                                carbu = b;
+                                break;
+
+                            case 6:
+                                model = b;
+                                break;
+
+                            case 7:
+                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
+                                break;
+
+                            case 8:
+                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
+                                break;
+
+                            case 9:
+                                immat = new StringBuilder(immat).Append(b).Append(" ").ToString();
+                                break;
+
+                            case 15:
+                                categ = b.ToUpper() == "M" ? "M" : "A";
+                                break;
+                        }
+                    }
+                }
+
+                if (bandeau != "")
+                {
+                    vide = 0;
+                    DataSet1.tb_vehiRow myNewRow = null;
+                    string key = "999999";
+                    bool newrow = false;
+                    try
+                    {
+                        if (!checkZero.Checked)
+                        {
+
+                            myNewRow = FindOnekey(bandeau);
+                            if (myNewRow == null)
+                            {
+                                continue;
+                            }
+                            else
+                            {
+                                key = myNewRow["key_vehi"].ToString();
+                            }
+                        }
+                        if (myNewRow == null)
+                        {
+                            key = FindNewkey();
+                            myNewRow = tb_vehi.Newtb_vehiRow();
+                            newrow = true;
+                        }
+                        myNewRow["key_vehi"] = key;
+                        myNewRow["ope_vehi"] = Program.key_ope;
+                        myNewRow["num_vehi"] = bandeau;
+                        myNewRow["cmpnum_vehi"] = cmp;
+                        myNewRow["immat_vehi"] = immat;
+                        myNewRow["type_vehi"] = model;
+                        myNewRow["famille_vehi"] = famille;
+                        myNewRow["categ_vehi"] = categ;
+                        myNewRow["cond_vehi"] = pilote;
+                        myNewRow["sort1_vehi"] = string.Format("{0}{1:00000}{2}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"]);
+                        switch (carbu)
+                        {
+                            case "D":
+                                carbu = "DIESEL";
+                                break;
+
+                            case "E":
+                                carbu = "SP98";
+                                break;
+
+                            default:
+                                carbu = "?";
+                                break;
+                        }
+
+                        if (carbu == "?")
+                        {
+                            if (categ == "M")
+                            {
+                                myNewRow["carbu_vehi"] = "SP98";
+                            }
+                            else
+                            {
+                                myNewRow["carbu_vehi"] = "DIESEL";
+                            }
+                        }
+                        else
+                        {
+                            myNewRow["carbu_vehi"] = carbu;
+                        }
+
+                        if (newrow)
+                            tb_vehi.Addtb_vehiRow(myNewRow);
+                        StatusLabel1.Text = string.Format("{0}{1:00000}{2}-{3}-{4}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"], myNewRow["cond_vehi"], myNewRow["immat_vehi"]);
+                        Application.DoEvents();
+                        Thread.Sleep(5);
+                    }
+                    catch (Exception ex)
+                    {
+                        MessageBox.Show(string.Format("{3}\r\nPb. à insertion de {0} {1} {2}", bandeau, pilote, model, ex.Message));
+                    }
+                }
+                else
+                { vide++; }
+                if (vide > 10)
+                {
+                    break;
+                }
+            }
+
+            xlApp?.Quit();
+
+            StatusLabel1.Text = "F I N I .................";
+        }
+
+        private void Import_PN()
+        {
+            Excel.Application xlApp;
+            Excel.Workbook xlWorkBook;
+            Excel.Worksheet xlWorkSheet;
+            object misValue = System.Reflection.Missing.Value;
+            try
+            {
+                xlApp = new Excel.Application();
+                xlWorkBook = xlApp.Workbooks.Open(textNomFile.Text, misValue);
+                xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Vérifier que le fichier n'est pas ouvert et est un fichier Excel correct \r\n {ex.Message}", "Ouverture de " + textNomFile.Text + " impossible", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                return;
+            }
+            uint[] indexCol = { 1, 3, 4, 6, 7, 8, 9 };
+            string categ = "A";
+            for (uint row = 2; row < 200; row++)
+            {
+                string model = "";
+                string immat = "";
+                string bandeau = "";
+                string carbu = "";
+                string famille = "";
+                string pilote = "";
+
+                int vide = 0;
+                for (int colNdx = 0; colNdx < indexCol.Length; colNdx++)
+                {
+                    uint col = indexCol[colNdx];
+                    var varex = xlWorkSheet.Cells[row, col].Value;
+                    if (varex != null)
+                    {
+                        string b = "";
+                        string mytype = varex.GetType().ToString();
+                        switch (mytype)
+                        {
+                            case "System.Int16":
+                            case "System.Int32":
+                            case "System.Int64":
+                            case "System.Double":
+                                b = ((Int32)varex).ToString();
+                                break;
+
+                            default:
+                                b = (string)varex;
+                                break;
+                        }
+
+                        b = b.Replace('\n', ' ');
+                        while (b.Contains("  "))
+                            b = b.Replace("  ", " ");
+                        switch (col)
+                        {
+                            case 1:
+                                bandeau = b;
+                                break;
+
+                            case 3:
+                                famille = b;
+                                break;
+
+                            case 4:
+                                pilote = b;
+                                break;
+
+                            case 6:
+                                model = b;
+                                break;
+
+                            case 7:
+                                carbu = b;
+                                break;
+
+                            case 8:
+                                immat = b;
+                                break;
+
+                            case 9:
+                                categ = b;
+                                break;
+                        }
+                    }
+                }
+
+                if (bandeau != "")
+                {
+                    vide = 0;
+                    DataSet1.tb_vehiRow myNewRow = null;
+                    string key = "999999";
+                    bool newrow = false;
+                    try
+                    {
+                        if (!checkZero.Checked)
+                        {
+                            myNewRow = FindOnekey(bandeau);
+                            if (myNewRow != null)
+                            {
+                                key = myNewRow["key_vehi"].ToString();
+                            }
+                        }
+                        if (myNewRow == null)
+                        {
+                            key = FindNewkey();
+                            myNewRow = tb_vehi.Newtb_vehiRow();
+                            newrow = true;
+                        }
+                        myNewRow["key_vehi"] = key;
+                        myNewRow["ope_vehi"] = Program.key_ope;
+                        myNewRow["num_vehi"] = bandeau;
+                        myNewRow["cmpnum_vehi"] = "";
+                        myNewRow["immat_vehi"] = immat;
+                        myNewRow["type_vehi"] = model;
+                        myNewRow["famille_vehi"] = famille;
+                        myNewRow["categ_vehi"] = categ;
+                        myNewRow["cond_vehi"] = pilote;
+                        myNewRow["sort1_vehi"] = string.Format("{0}{1:00000}{2}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"]);
+                        myNewRow["carbu_vehi"] = carbu == "E" ? "SP98" : "DIESEL";
+                        if (newrow)
+                            tb_vehi.Addtb_vehiRow(myNewRow);
+                        StatusLabel1.Text = string.Format("{0}{1:00000}{2}-{3}-{4}", myNewRow["categ_vehi"], myNewRow["num_vehi"], myNewRow["cmpnum_vehi"], myNewRow["cond_vehi"], myNewRow["immat_vehi"]);
+                        Application.DoEvents();
+                    }
+                    catch (Exception ex)
+                    {
+                        MessageBox.Show(string.Format("{3}\r\nPb. à insertion de {0} {1} {2}", bandeau, pilote, model, ex.Message));
+                    }
+                }
+                else
+                    vide++;
+                if (vide > 10)
+                    break;
+            }
+
+            xlApp?.Quit();
+
+            StatusLabel1.Text = "F I N I .................";
+        }
+ */

+ 6 - 6
Setup_Fuel/Setup_Fuel.iss

@@ -14,7 +14,7 @@
 #define PRODUCT_NAME "Aso_Fuel"
 ;Répertoire installation
 #define PRODUCT_CODE "{{0AFFBDE8-FD9A-4572-A5F1-30789B83F5DA}"
-#define PRODUCT_VERSION "2.0.0.0"
+#define PRODUCT_VERSION "3.0.0.0"
 #define MANUFACTURER "AAX"
 #define TITLE "Aso Fuel"
 #define MyAppExeName "Fuel_ASO.exe"
@@ -36,11 +36,11 @@ Name: "fr" ; MessagesFile: "compiler:Languages\French.isl"
 [Files]
 ;Source: "D:\Patrick\Mes Téléchargements\dotNetFx45_Full_setup.exe"; DestDir: {app};  Check: NOT verifDotNet
 Source: "..\Fuel_ASO\Resources\pompe01.ico"; DestDir: "{app}\"; DestName: "pompe01.ico"; Flags: "ignoreversion"
-Source: "..\Fuel_ASO\bin\Debug\Fuel_ASO.exe" ; DestDir: "{app}\"; DestName: {#MyAppExeName} ;
-Source: "..\Fuel_ASO\bin\Debug\Fuel_ASO.exe.config" ; DestDir: "{app}\"; DestName: {#MyAppExeName}.config ;
-Source: "..\Fuel_ASO\bin\Debug\Microsoft.AspNet.SignalR.Client.dll"; DestDir: "{app}\"; DestName: "Microsoft.AspNet.SignalR.Client.dll";
-Source: "..\Fuel_ASO\bin\Debug\Newtonsoft.Json.dll"; DestDir: "{app}\"; DestName: "Newtonsoft.Json.dll";
-Source: "..\Fuel_ASO\bin\Debug\Ionic.Utils.Zip.dll"; DestDir: "{app}\"; DestName: "Ionic.Utils.Zip.dll";
+Source: "..\Fuel_ASO\bin\Release\Fuel_ASO.exe" ; DestDir: "{app}\"; DestName: {#MyAppExeName} ;
+Source: "..\Fuel_ASO\bin\Release\Fuel_ASO.exe.config" ; DestDir: "{app}\"; DestName: {#MyAppExeName}.config ;
+Source: "..\Fuel_ASO\bin\Release\Microsoft.AspNet.SignalR.Client.dll"; DestDir: "{app}\"; DestName: "Microsoft.AspNet.SignalR.Client.dll";
+Source: "..\Fuel_ASO\bin\Release\Newtonsoft.Json.dll"; DestDir: "{app}\"; DestName: "Newtonsoft.Json.dll";
+Source: "..\Fuel_ASO\bin\Release\Ionic.Utils.Zip.dll"; DestDir: "{app}\"; DestName: "Ionic.Utils.Zip.dll";
 
 [Registry]
 Root: "HKLM"; Subkey: "Software\{#MANUFACTURER}\{#PRODUCT_NAME}"; ValueType: string; ValueName: "softinstalled"; ValueData: "YES"; Flags:  createvalueifdoesntexist uninsdeletekey  ; Permissions: everyone-full; Languages: fr