Esempio n. 1
0
        private Termin AddBesuchstermin(User forUser, object kundeOderInteressent)
        {
            this.SetUserCalendarChecked(forUser);
            string archive = forUser.GetDavidArchivePath(Global.DavidArchiveTypes.Kalender);

            David.CreateMsgItm2Params parms = David.DavidManager.DavidService.CreateCalendarItem(dayView.SelectionStart, dayView.SelectionEnd, archive);
            Termin termin = new Termin(parms.MessageItem2Object);

            if (kundeOderInteressent is Kunde)
            {
                if (this.myOpenArgs.Mitarbeiter != null && this.myOpenArgs.Kunde != null)
                {
                    if (this.myOpenArgs.Mitarbeiter.LinkBesuchstermin(termin, this.myOpenArgs.Kunde))
                    {
                        termin.Title = string.Format("{0}: Besuchstermin ({1})", this.myOpenArgs.Kunde.CompanyName1, forUser.SageLoginName.ToLower());
                        termin.HTML  = string.Format("{0}/n{1}", this.myOpenArgs.Kunde.GetHtmlHead(), this.myOpenArgs.Kunde.GetHtmlNotizen());
                        string msg = string.Format("Firma {0} hat jetzt einen Besuchstermin mit {1}.", this.myOpenArgs.Kunde.CompanyName1, this.myOpenArgs.Mitarbeiter.NameFull);
                        MessageBox.Show(msg);
                    }
                }
            }
            else if (kundeOderInteressent is Interessent)
            {
            }
            this.myTerminliste.Add(termin);
            return(termin);
        }
Esempio n. 2
0
        private Termin AddTermin(User forUser)
        {
            string archive = forUser.GetDavidArchivePath(Global.DavidArchiveTypes.Kalender);

            David.CreateMsgItm2Params createParams = David.DavidManager.DavidService.CreateCalendarItem(dayView.SelectionStart, dayView.SelectionEnd, archive);
            Model.Entities.Termin     termin       = new Model.Entities.Termin(createParams.MessageItem2Object);
            myTerminliste.Add(termin);
            return(termin);
        }