예제 #1
0
        public bool AddEvent(string strDate, string strCategory, string strEventDetail)
        {
            Event e = new Event(strDate, strCategory, strEventDetail);

               /* if (e.IsValid() == false)
            {
                return false;
            }*/

            arrEvents[nEventsCount++] = e;
            return true;
        }
예제 #2
0
        public void LoadPresetEvents()
        {
            FileReader r = new FileReader(strFileName);

            string[,] strRows = r.LoadFile(ref nEventsCount);

            for (int i = 0; i < strRows.Length/2; i++) // very dangerous! Need a global getMax function!
            {
                Event e = new Event(strRows[i, 0], strRows[i, 1], "");

                if( e.GetEventCategory() ==null)
                {
                    return;
                }

                arrEvents[i] = e;
            }
        }
        private void SetEventTime(string strED)
        {
            if (currentEvent == null)
            {
                currentEvent = new Event();
            }

            currentEvent.SetEventTime(strED);
        }
        private void SetEventDetails( string strC, string strD)
        {
            if (currentEvent == null)
            {
                currentEvent = new Event();
            }

            currentEvent.SetEventCategory(strC);
            currentEvent.SetEventDetail(strD);
        }
        private void btnParents_Click(object sender, EventArgs e)
        {
            Emailer eM = new Emailer( strStaffEmail,strStaffPassword);

            // update spreadsheet for mail merge..

            // for each pupil..

            for (int i = 0; i < lstPupils.SelectedItems.Count; i++)
            {
                string strSelectedPupil = lstPupils.SelectedItems[i].ToString();

                Pupil p = FindPupil(strSelectedPupil);

                if (p != null)
                {
                    // 1. create email message.. ( store in array earlier?)

                    // 2. send email..

                    eM.SendMessage(p.GetParentEmail(),"","The BritishSchool of Rio de Janeiro: " + p.GetName(),txtMessage.Text,false);

                    if (bUpdateBLog)
                    {
                        Event Ev = new Event( txtMessage.Text,"CAT","TIME");
                        Ev.UpdateBehaviourLog(strStaffEmail, p);
                    }
                }
            }
        }