Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            fonter();
            if ((!SessionModel.Connecté) || (SessionModel.SessionID != Session.SessionID))
            {
                SessionModel.Reset();
                Response.Redirect("index.aspx");
            }

            String civ, pren, nom, soc;

            civ  = SessionModel.Civilité;
            pren = SessionModel.PrénomUser;
            nom  = SessionModel.NomUser;
            soc  = SessionModel.Société;
            infoUtilisateur.Text = "BIENVENUE " + civ +
                                   ((pren == "" || pren.ToUpper() == "NULL") ? "" : (" " + pren)) +
                                   " " + nom +
                                   ((soc == "" || soc.ToUpper() == "NULL") ? "" : (" / " + soc));

            imagController imagC = new imagController();

            imagC.idimg    = "jo";
            imagC.longueur = 3;
            imagC.hautueur = 2;
            load();
            // Création de l'objet Bdd pour l'intéraction avec la base de donnée MySQL
            nbLettreTxt.Visible = false;
            ImagModel bdd = new ImagModel();

            bdd.AddContact(imagC);
            ReadOnly();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            // Créer d'un contact à ajouter
            imagController imagC = new imagController();

            imagC.idimg    = "jo";
            imagC.longueur = 3;
            imagC.hautueur = 2;

            // Création de l'objet Bdd pour l'intéraction avec la base de donnée MySQL
            ImagModel bdd = new ImagModel();

            bdd.AddContact(imagC);
        }