Ejemplo n.º 1
0
 /// <summary>
 /// Constructeur du formulaire
 /// </summary>
 /// <param name="infoEcole"></param>
 /// <param name="mailType"></param>
 /// <param name="_applClass"></param>
 public frmSendMail(Ecole infoEcole, MailType mailType, ApplClass _applClass)
 {
     InitializeComponent();
     _infoEcole = infoEcole;
     _mailType = mailType;
     p_applClass = _applClass;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="infoEcole"></param>
 /// <param name="modeDuplicate"></param>
 public frmItemCalendar(Ecole infoEcole)
 {
     InitializeComponent();
     _infoEcole = infoEcole;
     _dateSelected = infoEcole._planifEnCours.StartDate;
     p_modeDuplicate = false;
     this.Text = "Modifier la planification !";
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="infoEcole"></param>
 /// <param name="modeDuplicate"></param>
 public frmItemCalendar(Ecole infoEcole, DateTime dateSelected)
 {
     InitializeComponent();
     _infoEcole = infoEcole;
     _dateSelected = dateSelected;
     p_modeDuplicate = false;
     this.Text = "Planifier l'école !";
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="infoEcole"></param>
 /// <param name="modeDuplicate"></param>
 public frmItemCalendar(Ecole infoEcole, bool modeDuplicate)
 {
     InitializeComponent();
     _infoEcole = (Ecole)infoEcole.Clone() ;
     _infoEcole.Contact = (Contact)infoEcole.Contact.Clone();
     _dateSelected = infoEcole._planifEnCours.StartDate;
     p_modeDuplicate = true;
     this.Text = "Dupliquer l'école !";
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Ajouter une école depuis le fichier d'Import
 /// </summary>
 /// <param name="tabData"></param>
 public int AddSchoolFromImportFile(Ecole tabData)
 {
     _savePlanning = false;
     p_listEcole.InsertItem(tabData);
     return 1;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Importation du fichier
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnValider_Click(object sender, EventArgs e)
        {
            string _msgDump = String.Empty;
            progBar.Visible = true;
            lblNum.Visible = true;
            int nbAnomalies = 0;
            Log.Debug("Valider l'import...");
            m_numId = 0;

            Log.Debug("Importer {" + p_dataTable.Rows.Count.ToString() + "} lignes ...");
            int _nbAdd = 0;
            progBar.Maximum = p_dataTable.Rows.Count;
            for (int i = 0; i <= p_dataTable.Rows.Count - 1; i++)
            {
                progBar.Value = i;
                lblNum.Text = i.ToString("D4");
                lblNum.Refresh();
                if (p_dataTable.Rows[i][cmbRefClient.SelectedIndex] != DBNull.Value)
                {
                    try
                    {
                        m_numId++;
                        Ecole _lineEcole = new Ecole();
                        _lineEcole.IdEcole = getValue(cmbRefClient.SelectedIndex, i);
                        _lineEcole.Libelle = getSchoolName(getValue(cmbLibelle.SelectedIndex, i));

                        int _codePostal = 0;
                        if (cmbCodePostal.SelectedIndex > 0) { if (!Int32.TryParse(getValue(cmbCodePostal.SelectedIndex, i), out _codePostal)) { _codePostal = 0; } }
                        _lineEcole.CodePostal = _codePostal.ToString("D5");

                        _lineEcole.Adresse = getValue(cmbAdress.SelectedIndex, i);
                        _lineEcole.Ville = getValue(cmbLocalite.SelectedIndex, i);
                        _lineEcole.Telephone = getValue(cmbTelephone.SelectedIndex, i);
                        _lineEcole.initEcole();
                        _lineEcole.Contact.Nom = getValue(cmbNomContact.SelectedIndex, i);
                        _lineEcole.Contact.Email = getValue(cmbEmail.SelectedIndex, i);
                        _lineEcole.Contact.Complements = getValue(cmbComments.SelectedIndex, i);
                        _nbAdd += frm.UpdateSchoolFromImportFile(_lineEcole);
                    }
                    catch (Exception _exception)
                    {
                        nbAnomalies++;
                        Log.Debug("Anomalie lors de l'import : ligne " + i.ToString() + "..." + _exception.Message);
                        _msgDump += String.Format("Import de la ligne {0} : Ref {1}{2}", i, getValue(cmbRefClient.SelectedIndex, i), Environment.NewLine);
                    }
                }
                Button _bn = (Button)sender;
                _bn.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            if (nbAnomalies > 0)
            {
                MessageBox.Show("Attention, plusieurs lignes non conformes ont été ignorées");
                ClassOutils.writeDumpFile(_msgDump, "Import_");
            }
        }
Ejemplo n.º 7
0
 public EcoleChangedEventArgs(ChangeType change, Ecole item)
 {
     ChangeType = change;
     EcoleContext = item;
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Mise à jour des infos sur l'école dans la Collection
        /// </summary>
        /// <param name="ecoleUpdated">objet Ecole modifiée</param>
        public void updateSchoolScheduleInfo(Ecole ecoleUpdated, string oldPhotographe, bool withMail)
        {
            Log.Debug("updateSchoolScheduleInfo()");
            p_listEcole.SetItem(ecoleUpdated);
            this.UpdateEventGoogle(ecoleUpdated, oldPhotographe);

            if (withMail)
            {
                frmSendMail frmSendMail;
                if (oldPhotographe.Length > 0) { frmSendMail = new frmSendMail(ecoleUpdated, planningLab.frmSendMail.MailType.Update, p_applClass); }
                else { frmSendMail = new frmSendMail(ecoleUpdated, planningLab.frmSendMail.MailType.Confirm, p_applClass); }
                frmSendMail.ShowDialog(this);
            }
        }
Ejemplo n.º 9
0
  /// <summary>
 /// Ajoute une Ecole dans la Collection
 /// </summary>
 /// <param name="_infoEcole"></param>
 public void addEntry(Ecole _infoEcole)
 {
     Log.Debug("addEntry() : " + _infoEcole.Libelle);
     p_listEcole.InsertItem(_infoEcole);
     
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Supprimer un EVENT dans GOOGLE
        /// </summary>
        /// <param name="_ecole"></param>
        /// <param name="_oldPhotographe"></param>
        public void DeleteEventGoogle(Ecole _ecole, string _oldPhotographe)
        {
            if (!p_applClass.IsFctAuthorize("Google")) { return; }

            Log.Debug("Suppression de l'évènement Google...");

            if (p_applClass.Param.IsGoogleActivate)
            {
                Photographe _photo = p_applClass.Param.GetPhotographe(_oldPhotographe);
                if (_photo != null)
                {
                    Event _event = p_googleFct.GetEvent(_photo.IdGoogleCalendar, _ecole.IdEcole, this.getPeriode().StartDate, this.getPeriode().EndDate);
                    if (_event == null) { return; }
                    else { p_googleFct.DeleteEvent(_photo.IdGoogleCalendar, _event); }
                    Log.Debug("Mise à jour de 'événement Google Calendar effectuée...");
                    this.displayStatusGoogle("Mise à jour Google effectuée ...");
                }
                else
                {
                    Log.Debug("Calendrier Google non paramétré pour " + _oldPhotographe + "...");
                    this.displayStatusGoogle("Calendrier Google non paramétré pour " + _oldPhotographe + "...");
                }
            }
            else { Log.Debug("Service Google désactivé..."); this.displayStatusGoogle("Service Google désactivé ..."); }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Substitution ds champs variables
        /// </summary>
        /// <param name="_textModel"></param>
        /// <returns></returns>
        public static string doSubstitute(ApplClass _applClass, Ecole _infoEcole, string _textModel)
        {
            string _returnText = _textModel ?? String.Empty;
            // On fait la substitution des variables :
            // 1. {NOM_ECOLE}
            _returnText = _returnText.Replace("{NOM_ECOLE}", _infoEcole.Libelle);
            // 2. {NOM_CONTACT}
            _returnText = _returnText.Replace("{NOM_CONTACT}", _infoEcole.Contact.Titre + " " + _infoEcole.Contact.Nom);
            // 3. {DATE1}
            _returnText = _returnText.Replace("{DATE1}", _infoEcole._planifEnCours.StartDate.ToString("dd/MM/yyyy à HH:mm"));
            // 4. {DATE2}
            _returnText = _returnText.Replace("{DATE2}", _infoEcole._planifEnCours.EndDate.ToString("dd/MM/yyyy à HH:mm"));
            // 5. {PHOTO}
            _returnText = _returnText.Replace("{PHOTO}", _applClass.Param.GetNamePhotoGrapheFromId(_infoEcole._planifEnCours.IdPhotographe));

            return _returnText;
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Ajout d'un Item dans la ListView
 /// </summary>
 /// <param name="itemEcole">object Ecole</param>
 public void addItemInLstView(Ecole itemEcole)
 {
     m_nbSchool++;
     ListViewItem item = new ListViewItem(new[] {m_nbSchool.ToString(), itemEcole.Contact.Email, itemEcole.Libelle, itemEcole.Ville });
     item.UseItemStyleForSubItems = false;
     item.Name = itemEcole.IdEcole;
     item.ToolTipText = itemEcole.Libelle;
     item.Checked = false;
     if (itemEcole.Contact.Email != String.Empty)
     {
         // TODO : Mettre en forme la ligne
     }
     lstMailingSchool.Items.Add(item);
     lblNbSchools.Text = m_nbSchool.ToString();
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructeur du formulaire d'impression
 /// </summary>
 /// <param name="_infoEcole"></param>
 public frmPrint(Ecole _infoEcole)
 {
     p_ecoleToPrint = _infoEcole;
     InitializeComponent();
 }
Ejemplo n.º 14
0
        /// <summary>
        /// Mettre à jour une école depuis le fichier d'Import
        /// ATTENTION CETTE METHODE NE MET PAS A JOUR LES CONTACTS....
        /// // C'EST POUR CETTE RAISON QU'ON UTILISE PAS SetItem
        /// </summary>
        /// <param name="tabData"></param>
        public int UpdateSchoolFromImportFile(Ecole tabData)
        {
            _savePlanning = false;
            int _nbAdd = 0;

            foreach (Ecole _ecole in p_listEcole)
            {
                if (_ecole.IdEcole == tabData.IdEcole)
                {
                    // Mise à jour des informations
                    _ecole.Libelle = tabData.Libelle;
                    _ecole.Adresse = tabData.Adresse;
                    _ecole.CodePostal = tabData.CodePostal;
                    _ecole.Telephone = tabData.Telephone;
                    _ecole.Ville = tabData.Ville;
                    return _nbAdd;
                }
            }
            // Si l'école n'existe pas ==> On ajoute
            _nbAdd++;
            p_listEcole.InsertItem(tabData);
            return _nbAdd;
        }
Ejemplo n.º 15
0
 /// <summary>
 /// Constructeur du formulaire
 /// </summary>
 /// <param name="_infoEcole"></param>
 public frmAddEntry(Ecole _infoEcole)
 {
     InitializeComponent();
     p_infoEcole = _infoEcole;
 }
Ejemplo n.º 16
0
        /// <summary>
        /// Mettre à jour un EVENT dans GOOGLE
        /// </summary>
        /// <param name="_ecole"></param>
        /// <param name="oldPhotographe"></param>
        public void UpdateEventGoogle(Ecole _ecole, string oldPhotographe)
        {
            if (!p_applClass.IsFctAuthorize("Google")) { return; }

            Log.Debug("Mise à jour de l'évènement Google...");
            if (p_applClass.Param.IsGoogleActivate)
            {
                if (_ecole._planifEnCours == null) { return; }

                if (oldPhotographe != _ecole._planifEnCours.IdPhotographe && oldPhotographe != null && oldPhotographe != String.Empty)
                {
                    Photographe _oldPhoto = p_applClass.Param.GetPhotographe(oldPhotographe);
                    if (_oldPhoto != null)
                    {
                        Event _event = p_googleFct.GetEvent(_oldPhoto.IdGoogleCalendar, _ecole.IdEcole, this.getPeriode().StartDate, this.getPeriode().EndDate);
                        if (_event != null)
                        {
                            if (_event.ETag != GoogleFct.EMPY_EVENT)
                            {
                                p_googleFct.DeleteEvent(_oldPhoto.IdGoogleCalendar, _event);
                                string _idPhoto = _ecole.getPhotographeForSaison(this._saison);
                                Photographe _photo = p_applClass.Param.GetPhotographe(_idPhoto);
                                if (_photo != null)
                                {
                                    p_googleFct.CreateEvent(_ecole, _photo.IdGoogleCalendar);
                                    Log.Debug("Mise à jour de 'événement Google Calendar effectuée...");
                                    this.displayStatusGoogle("Mise à jour Google effectuée ...");
                                }
                                else
                                {
                                    Log.Debug("Calendrier Google non paramétré pour " + _idPhoto + "...");
                                    this.displayStatusGoogle("Calendrier Google non paramétré pour " + _idPhoto + "...");
                                }
                            }
                        }
                    }
                }
                else
                {
                    string _idPhoto = _ecole.getPhotographeForSaison(this._saison);
                    Photographe _photo = p_applClass.Param.GetPhotographe(_idPhoto);
                    if (_photo != null)
                    {
                        Event _event = p_googleFct.GetEvent(_photo.IdGoogleCalendar, _ecole.IdEcole, this.getPeriode().StartDate, this.getPeriode().EndDate);
                        if (_event == null) { p_googleFct.CreateEvent(_ecole, _photo.IdGoogleCalendar); }
                        else
                        {
                            if (_event.ETag != GoogleFct.EMPY_EVENT)
                            {
                                p_googleFct.UpdateEvent(_ecole, _photo.IdGoogleCalendar, _event);
                                Log.Debug("Mise à jour de 'événement Google Calendar effectuée...");
                                this.displayStatusGoogle("Mise à jour Google effectuée ...");
                            }
                        }
                    }
                    else
                    {
                        Log.Debug("Calendrier Google non paramétré pour " + _idPhoto + "...");
                        this.displayStatusGoogle("Calendrier Google non paramétré pour " + _idPhoto + "...");
                    }
                }
            }
            else { Log.Debug("Service Google désactivé..."); this.displayStatusGoogle("Service Google désactivé ..."); }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Formattage d'un Item du Calendrier
        /// </summary>
        /// <param name="_itemCal"></param>
        /// <param name="_itemEcole"></param>
        private void formatInfoCalendar(CalendarItem _itemCal, Ecole _itemEcole)
        {
            StringBuilder _infoText = new StringBuilder();
            _infoText.AppendLine(_itemEcole.Libelle);
            _infoText.AppendLine("Ville : " + _itemEcole.Ville);
            _infoText.AppendLine("Photographe : " + p_applClass.Param.GetNamePhotoGrapheFromId(_itemEcole._planifEnCours.IdPhotographe));
            _itemCal.Text = _infoText.ToString();
            _itemCal.ApplyColor(Color.FromArgb(p_applClass.Param.GetColorFromId(_itemEcole._planifEnCours.IdPhotographe)));
            _itemCal.StartDate = _itemEcole._planifEnCours.StartDate;
            _itemCal.EndDate = _itemEcole._planifEnCours.EndDate;

            _itemCal.Tag = _itemEcole.IdEcole;
               
            if (_itemEcole.Confirme)
            {
                _itemCal.Image = imgList.Images[0];
                _itemCal.ImageAlign = CalendarItemImageAlign.South;
            }
            else { _itemCal.Image = null; }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Evénément déclencher lors d'un clic sur l'ajout d'une entrée
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAddEntry_Click(object sender, EventArgs e)
 {
     Log.Debug("Ajout d'une nouvelle entrée...");
     Ecole _newEcole = new Ecole();
     frmAddEntry frmAjout = new frmAddEntry(_newEcole);
     frmAjout.ShowDialog(this);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Mise à jour du Control Calendar
 /// </summary>
 /// <param name="itemEcole"></param>
 public void updateControlCalendar(Ecole itemEcole, bool withShow)
 {
     StringBuilder _infoText = new StringBuilder();
     // On vérifie que le CalendarItem existe
     for (int i = 0; i < _itemsCalendar.Count; i++)
     {
         if ((string)_itemsCalendar[i].Tag == itemEcole.IdEcole)
         {
             if (itemEcole.isSchedule)
             {
                 this.formatInfoCalendar(_itemsCalendar[i], itemEcole);
                 if (withShow) { this.setViewRangeFromDate(itemEcole._planifEnCours.StartDate); }
                 return;
             }
             else
             {
                 _itemsCalendar.RemoveAt(i);
                 this.PlaceItems();
                 return;
             }
         }
     }
     if (itemEcole.isSchedule)
     {
         CalendarItem cal = new CalendarItem(objCalendar);
         this.formatInfoCalendar(cal, itemEcole);
         _itemsCalendar.Add(cal);
         if (withShow) { this.setViewRangeFromDate(itemEcole._planifEnCours.StartDate); }
     }
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Ajouter une école lors d'une duplication
 /// </summary>
 /// <param name="tabData"></param>
 public void AddEcoleFromDuplicate(Ecole tabData)
 {
     Log.Debug("AddEcoleFromDuplicate()");
     p_listEcole.InsertItem(tabData);
     // On repositionne la listView sur l'école que l'on vient d'ajouter
     ListViewItem _tempLst = lstToSchedule.TopItem;
     lvwColumnSorter.SortColumn = p_numColSort;
     lvwColumnSorter.Order = p_sortOrder;
     lstToSchedule.Sort();
     lstToSchedule.SetSortIcon(lvwColumnSorter.SortColumn, lvwColumnSorter.Order);
     lstToSchedule.TopItem = _tempLst;
 }
Ejemplo n.º 21
0
        /// <summary>
        /// Mise à jour d'un Item dans la ListView
        /// </summary>
        /// <param name="_"></param>
        private void updateItemInLstView(Ecole itemEcole)
        {
            itemEcole.setSaison(this._saison, _prevSaison);
            ListViewItem itemLstView = lstToSchedule.Items[itemEcole.IdEcole];
            if (!itemEcole.isSchedule) { itemLstView.SubItems[colDate.Index].Text = String.Empty; }
            else { itemLstView.SubItems[colDate.Index].Text = itemEcole._planifEnCours.StartDate.ToString("yyyy-MM-dd"); }
            if (itemEcole._planifPrevious != null) { itemLstView.SubItems[colDatePrevious.Index].Text = itemEcole._planifPrevious.StartDate.ToString("yyyy-MM-dd"); }
            else { itemLstView.SubItems[colDatePrevious.Index].Text = String.Empty; }

            itemLstView.SubItems[colFlag.Index].Text = itemEcole.getFlag();
            this.getColorFromScheduleStatus(itemEcole, ref itemLstView);
            if (itemEcole._planifEnCours == null) { itemLstView.SubItems[colPhoto.Index].Text = String.Empty; }
            else { itemLstView.SubItems[colPhoto.Index].Text = p_applClass.Param.GetNamePhotoGrapheFromId(itemEcole._planifEnCours.IdPhotographe); }

            itemLstView.SubItems[colName.Index].Text = itemEcole.Libelle;
            itemLstView.SubItems[colVille.Index].Text = itemEcole.Ville;
        }
Ejemplo n.º 22
0
 /// <summary>
 /// Mise à jour des infos sur l'école dans la Collection
 /// </summary>
 /// <param name="ecoleUpdated">objet Ecole modifiée</param>
 public void deleteSchoolScheduleInfo(Ecole ecoleUpdated, string oldPhotographe, bool withMail)
 {
     Log.Debug("deleteSchoolScheduleInfo()");
     p_listEcole.SetItem(ecoleUpdated);
     this.DeleteEventGoogle(ecoleUpdated, oldPhotographe);
     if (withMail)
     {
         frmSendMail frmSendMail;
         frmSendMail = new frmSendMail(ecoleUpdated, planningLab.frmSendMail.MailType.Delete, p_applClass);
         frmSendMail.ShowDialog(this);
     }
 }
Ejemplo n.º 23
0
        /// <summary>
        /// Ajout d'un Item dans la ListView
        /// </summary>
        /// <param name="itemEcole">object Ecole</param>
        public void addItemInLstView(Ecole itemEcole)
        {
            itemEcole.setSaison(this._saison, _prevSaison);
            string colDate;
            string colDatePrevious;
            if (!itemEcole.isSchedule) { colDate = ""; }
            else { colDate = itemEcole._planifEnCours.StartDate.ToString("yyyy-MM-dd"); }
            colDatePrevious = "";
            if (itemEcole._planifPrevious != null) { colDatePrevious = itemEcole._planifPrevious.StartDate.ToString("yyyy-MM-dd"); }

            string namePhoto;
            if (itemEcole._planifEnCours == null) { namePhoto = String.Empty; }
            else { namePhoto = p_applClass.Param.GetNamePhotoGrapheFromId(itemEcole._planifEnCours.IdPhotographe); }

            ListViewItem item = new ListViewItem(new[] { itemEcole.getFlag(), itemEcole.Libelle, itemEcole.Ville, colDate, namePhoto, itemEcole.IdEcole, colDatePrevious});
            item.Name = itemEcole.IdEcole;
            item.ToolTipText = itemEcole.Libelle;
            this.getColorFromScheduleStatus(itemEcole, ref item);
            lstToSchedule.Items.Add(item);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Mettre à jour un Evénement GOOGLE CALENDAR
        /// </summary>
        /// <param name="infoEcole"></param>
        /// <param name="IdGoogleCalendar"></param>
        public void UpdateEvent(Ecole infoEcole, string IdGoogleCalendar, Event googleEvent)
        {
            Log.Debug("Mise à jour d'un évènement Google Calendar");

            if (!p_isActivated) { return; }     // Si la fonction n'est pas activée, on sort de la fonction
            
            bool _returnGoogle = true;
            if (p_myService == null) { _returnGoogle = this.InitCnx(); }
            if (_returnGoogle)
            {
                try
                {
                    evnt = new Event();
                    StringBuilder _libelleEvent = new StringBuilder();
                    _libelleEvent.AppendFormat("{0} - {1}", infoEcole.Libelle, infoEcole.Ville);
                    if (infoEcole.Confirme) { _libelleEvent.AppendLine(" [Ecole confirmée]"); }
                    evnt.Summary = _libelleEvent.ToString();
                    evnt.Location = infoEcole.Adresse + " " + infoEcole.CodePostal + " " + infoEcole.Ville;
                    StringBuilder _description = new StringBuilder();
                    _description.AppendLine(infoEcole.IdEcole);
                    _description.AppendLine("Libelle : " + infoEcole.Libelle);
                    _description.AppendLine("Adresse : " + infoEcole.Adresse);
                    _description.AppendFormat("          {0} {1}\n", infoEcole.CodePostal, infoEcole.Ville);
                    _description.AppendLine("-------------------------------");
                    _description.AppendFormat("Contact :   {0} {1} ({2})\n", infoEcole.Contact.TitreCTC, infoEcole.Contact.NomCTC, infoEcole.Contact.FonctionCTC);
                    _description.AppendFormat("Téléphone : {0}\n", infoEcole.Contact.TelephoneCTC);
                    _description.AppendFormat("Portable  : {0}\n", infoEcole.Contact.PortableCTC);
                    _description.AppendFormat("EMail     : {0}\n", infoEcole.Contact.EmailCTC);
                    _description.AppendLine("-------------------------------");
                    _description.AppendLine("Compléments :");
                    _description.AppendLine(infoEcole.Contact.ComplementsCTC);
                    evnt.Description = _description.ToString();

                    EventDateTime startTime = new EventDateTime()
                    {
                        //DateTime = infoEcole._planifEnCours.StartDate.ToString("yyyy-MM-dd") + "T" + infoEcole._planifEnCours.StartDate.ToString("HH:mm:ss"),
                        DateTime = infoEcole._planifEnCours.StartDate,
                        TimeZone = "Europe/Paris"
                    };
                    EventDateTime endTime = new EventDateTime()
                    {
                        //DateTime = infoEcole._planifEnCours.EndDate.ToString("yyyy-MM-dd") + "T" + infoEcole._planifEnCours.EndDate.ToString("HH:mm:ss"),
                        DateTime = infoEcole._planifEnCours.EndDate,
                        TimeZone = "Europe/Paris"
                    };
                    evnt.Start = startTime;
                    evnt.End = endTime;

                    EventsResource er = new EventsResource(p_myService);
                    Event evntAfte = er.Patch(evnt, IdGoogleCalendar, googleEvent.Id).Execute();
                }
                catch (Exception _exc)
                {
                    Log.Error("Erreur lors de la mise à jour de l'événement Google {" + p_googleAccount + "} - {" + p_privateKey + "}", _exc);
                }
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Affecte la couleur du Flag dans la ListView en fonction de l'état de Planif
        /// </summary>
        /// <param name="_infoEcole"></param>
        /// <param name="itemEcole"></param>
        private void getColorFromScheduleStatus(Ecole _infoEcole, ref ListViewItem itemEcole)
        {
            itemEcole.UseItemStyleForSubItems = false;
            // Ecole planifiée ==> Orange
            // Ecole Confirmée ==> Vert
            // Ecole non planifiée => Rouge
            // Ecole pas encore planifiée pour la saison sélectionnée

            if (_infoEcole.isSchedule)
            {
                if (_infoEcole._planifEnCours.Confirme)
                {
                    itemEcole.SubItems[colFlag.Index].BackColor = Color.FromArgb(255, 175, 255, 170);
                    itemEcole.SubItems[colFlag.Index].ForeColor = Color.FromArgb(255, 175, 255, 170);
                }
                else
                {
                    itemEcole.SubItems[colFlag.Index].BackColor = Color.FromArgb(255, 255, 223, 66);
                    itemEcole.SubItems[colFlag.Index].ForeColor = Color.FromArgb(255, 255, 223, 66);
                }
            }   
            else
            {
                if (_infoEcole.ListPlanification.Count > 0) {
                    itemEcole.SubItems[colFlag.Index].BackColor = Color.FromArgb(255, 87, 45, 255);
                    itemEcole.SubItems[colFlag.Index].ForeColor = Color.FromArgb(255, 87, 45, 255);
                }
                else
                {
                itemEcole.SubItems[colFlag.Index].BackColor = Color.FromArgb(255, 255, 104, 102);
                itemEcole.SubItems[colFlag.Index].ForeColor = Color.FromArgb(255, 255, 104, 102);
            }}
        }
Ejemplo n.º 26
0
 public frmInfo(Ecole infoEcole)
 {
     InitializeComponent();
     _infoEcole = infoEcole;
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="_infoEcole"></param>
 /// <param name="param"></param>
 public docToPrint(Ecole _infoEcole, Parametrage param)
     : base()
 {
     p_infoEcole = _infoEcole;
     p_param = param;
 }