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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
| using System;
using System.Collections.Generic;
//using System.Linq;
//using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
//Google Map Subgurim
using Subgurim.Controles;
//Classe Technique
using WebApplication1.Classe_Metier;
using WebApplication1.Classe_Technique;
using System.Drawing;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
//using AjaxControlToolkit;
namespace WebApplication1
{
public partial class Index : System.Web.UI.Page
{
private static List<string> liste********* = new List<string>();//Liste qui contient l'ensemble des *********
private static List<Button> listeDeBouton = new List<Button>(); //Liste qui contient les boutons
private static List<PlaceHolder> listeDePlaceHolder = new List<PlaceHolder>(); //Liste qui contient les Placeholder associer au boutons
protected void Page_Init(object sender, EventArgs e)
{
if (!IsPostBack)
{
Task backgroundTaskUpdate = new Task(new Action(() => Geolocalisation.run(GMap1)));
backgroundTaskUpdate.Start();
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)//Ne s'éxécute qu'une seule fois au chargement de la pages
{
Dictionary<string, int> dictionnaireDesCodes********* = new Dictionary<string, int>();
Dictionary<string , int > dictionnaireDesCodes********* = new Dictionary<string,int>();
//Des jeux d'enregistrement pour récupérer le résultat des reqûetes
DataTable jeuxEnregistrement********* = SqlServer.executerUneRequeteLecture(VariableGlobale.requeteListe*********);
//Variable qui contient la liste des *********
List<ListItem> listeItems********* = new List<ListItem>();
for (int i = 0; i < jeuxEnregistrement*********.Rows.Count; i++)
{
string nomPrenom********* = jeuxEnregistrement*********.Rows[i]["******"].ToString() + jeuxEnregistrement*********.Rows[i]["*********"].ToString();
listeItems*********.Add(new ListItem(jeuxEnregistrement*********.Rows[i]["*******"].ToString() + ' ' + jeuxEnregistrement*********.Rows[i]["*********"].ToString() + ' ' + jeuxEnregistrement*********.Rows[i]["*******"].ToString(), jeuxEnregistrement*********.Rows[i]["*********"].ToString()));
controleLiteralDesOptions.Text += "<option value=\"" + jeuxEnregistrement*********.Rows[i]["*********"].ToString() + " " + jeuxEnregistrement*********.Rows[i]["*********"].ToString()+"\">";
if (!dictionnaireDes*********.ContainsKey(nomPrenom*********))
{
dictionnaireDes*********.Add(jeuxEnregistrement*********.Rows[i]["*********"].ToString() + jeuxEnregistrement*********.Rows[i]["*********"].ToString(), int.Parse(jeuxEnregistrement*********.Rows[i]["*********"].ToString()));
}
else
{
Debug.Write("Homonyme *********");
}
}
//Je rempli la liste avec ma liste d'item en tableau
Liste_Des_*********.Items.AddRange(listeItems*********.ToArray());
Liste_Des_*********.DataBind();//Je lie la liste avec ces items
GoogleMap.renderUI(GMap1);//Interface utilisateur , hauteur , largeur , scroll de la google map
GoogleMap.renderRegion(GMap1);//Chercher et ajoutez les regions
Session["*********"] = *********;
Session["*********"] = *********;
}
if (Session["listeRow"] != null)//Si la session n'est pas pas vide
{
*********
}
if (Session["infoWindow"] != null)
{
List<GInfoWindow> listeMarker = (List<GInfoWindow>)Session["infoWindow"];
foreach (GInfoWindow monmarker in listeMarker)
{
GMap1.Add(monmarker);
}
}
Panel.Attributes["class"] = "row panel";
}
protected void Bouton_Ajouter_Un_*********_Click(object sender, EventArgs e)
{
*********
protected void Bouton_Rechercher_Click(object sender, EventArgs e)
{
*********
protected void BoutonImpression_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, GetType(), "temp", "<script language='javascript'>window.print();window.location.reload();</script>", false);
}
protected void Bouton_Ajoute_Click(object sender, EventArgs e)
{
string mastring = elementCacher.Value.ToString();
}
protected void BoutonRechercheRoute(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, GetType(), "temp", "<script language='javascript'>calculateAndDisplayRoute(directionsService, directionsDisplay)</script>", false);
///// le code JavaScript(ex lien en haut) se trouve dans un autre fichier
}
}
} |
Partager