当前位置: 首页>>代码示例>>C#>>正文


C# Appointment类代码示例

本文整理汇总了C#中Appointment的典型用法代码示例。如果您正苦于以下问题:C# Appointment类的具体用法?C# Appointment怎么用?C# Appointment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Appointment类属于命名空间,在下文中一共展示了Appointment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CustomAppointmentForm

        public CustomAppointmentForm(SchedulerControl control, Appointment apt, Event ev)
        {
            Event = ev;
            InitializeComponent();

            Controller = new EventAppointmentFormController(control, apt);
        }
开发者ID:gitter-badger,项目名称:administrator,代码行数:7,代码来源:CustomAppointmentForm.cs

示例2: Insert

 ///<summary>Inserts one Appointment into the database.  Returns the new priKey.</summary>
 internal static long Insert(Appointment appointment)
 {
     if(DataConnection.DBtype==DatabaseType.Oracle) {
         appointment.AptNum=DbHelper.GetNextOracleKey("appointment","AptNum");
         int loopcount=0;
         while(loopcount<100){
             try {
                 return Insert(appointment,true);
             }
             catch(Oracle.DataAccess.Client.OracleException ex){
                 if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
                     appointment.AptNum++;
                     loopcount++;
                 }
                 else{
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else {
         return Insert(appointment,false);
     }
 }
开发者ID:nampn,项目名称:ODental,代码行数:26,代码来源:AppointmentCrud.cs

示例3: Add

        public async static Task<string> Add(Appointment appt, Rect selection)
        {
            var id = await AppointmentManager.ShowAddAppointmentAsync(appt, selection, Placement.Default);
            AddAppointmentId(id);

            return id;
        }
开发者ID:XamlBrewer,项目名称:UWP-Calendar-Sample,代码行数:7,代码来源:Calendar.cs

示例4: Main

        static void Main(string[] args)
        {
            // Create attendees of the meeting
            MailAddressCollection attendees = new MailAddressCollection();
            attendees.Add("[email protected]");
            attendees.Add("[email protected]");

            // Set up appointment
            Appointment app = new Appointment(
                "Location", // location of meeting
                DateTime.Now, // start date
                DateTime.Now.AddHours(1), // end date
                new MailAddress("[email protected]"), // organizer
                attendees); // attendees

            // Set up message that needs to be sent
            MailMessage msg = new MailMessage();
            msg.From = "[email protected]";
            msg.To = "[email protected]";
            msg.Subject = "appointment request";
            msg.Body = "you are invited";

            // Add meeting request to the message
            msg.AddAlternateView(app.RequestApointment());

            // Set up the SMTP client to send email with meeting request
            SmtpClient client = new SmtpClient("host", 25, "user", "password");
            client.Send(msg);
        }
开发者ID:ruanzx,项目名称:Aspose_Email_NET,代码行数:29,代码来源:Program.cs

示例5: Data

 public Data(ContactInformation contactInformation, string patientDoctor, Appointment appointment, Insurance insure)
 {
     this.contactInformation = contactInformation;
     this.doctor = patientDoctor;
     this.appointment = appointment;
     this.insurance = insure;
 }
开发者ID:Amorask,项目名称:Doctors-Office-Scheduler,代码行数:7,代码来源:Data.cs

示例6: AppDefaultConstructorLength

 public void AppDefaultConstructorLength()
 {
     // Arrange and Act
     Appointment testApp = new Appointment();
     // Assert
     Assert.AreEqual(30, testApp.Length, "The appointment does not give a default length of 30! It should!");
 }
开发者ID:JamieSharpe,项目名称:CalendarApplication,代码行数:7,代码来源:UnitTestAppointment.cs

示例7: btnCreate_Click

        private void btnCreate_Click(object sender, RoutedEventArgs e)
        {
            using (var db = new MSPAccountingContext())
            {
                var appointment = new Appointment();

                appointment.Date = Convert.ToDateTime(dtpDate.Value);
                appointment.Location = txtbxLocation.Text;

                var errors = appointment.GetModelErrors();
                if (errors.Count > 0)
                {
                    new ErrorDisplay(errors).Show();
                }
                else
                {
                    db.Appointment.Add(appointment);
                    db.SaveChanges();

                    MessageBox.Show("Appointment Successfully Created!", "Success", MessageBoxButton.OK);

                    this.Close();
                }
            }
        }
开发者ID:NJBogdan,项目名称:MSPAccounting,代码行数:25,代码来源:CreateAppointment.xaml.cs

示例8: Run

        public static void Run()
        {
            // The path to the File directory.
            string dataDir = RunExamples.GetDataDir_Outlook();

            string[] files = new string[3];
            files[0] = dataDir + "attachment_1.doc";
            files[1] = dataDir + "download.png";
            files[2] = dataDir + "Desert.jpg";

            Appointment app1 = new Appointment("Home", DateTime.Now.AddHours(1), DateTime.Now.AddHours(1), "[email protected]", "[email protected]");
            foreach (string file in files)
            {
                using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(file)))
                {
                    app1.Attachments.Add(new Attachment(ms, Path.GetFileName(file)));
                }
            }

            app1.Save(dataDir + "appWithAttachments_out.ics", AppointmentSaveFormat.Ics);

            Appointment app2 = Appointment.Load(dataDir + "appWithAttachments_out.ics");
            Console.WriteLine(app2.Attachments.Count);
            foreach (Attachment att in app2.Attachments)
                Console.WriteLine(att.Name);
            
        }
开发者ID:aspose-email,项目名称:Aspose.Email-for-.NET,代码行数:27,代码来源:ManageAttachmentsFromCalendarFiles.cs

示例9: Update

 public virtual void Update(RadScheduler owner, Appointment appointmentToUpdate)
 {
     if (!PersistChanges)
     {
         return;
     }
 }
开发者ID:CISC181,项目名称:VolTeerNET,代码行数:7,代码来源:sp_Availablity_BLL.cs

示例10: InsertVolunteerAvailability

        public void InsertVolunteerAvailability(ISchedulerInfo shedulerInfo, Appointment appointmentToInsert, sp_Availablity_DM cAvail)
        {
            using (VolTeerEntities context = new VolTeerEntities())
            {
                try
                {
                    var cVolAvail = new tblAvailability
                    {
                        VolID = cAvail.VolID,
                        AddrID = cAvail.AddrID,
                        AvailStart = appointmentToInsert.Start,
                        AvailEnd = appointmentToInsert.End,
                        Description = appointmentToInsert.Description,
                        RecurrenceParentID = (int?)(appointmentToInsert.RecurrenceParentID),
                        RecurrenceRule = appointmentToInsert.RecurrenceRule,
                        Subject = appointmentToInsert.Subject
                    };
                    context.tblAvailabilities.Add(cVolAvail);
                    context.SaveChanges();
                }
                catch (Exception ex)
                {
                }

            }
        }
开发者ID:CISC181,项目名称:VolTeerNET,代码行数:26,代码来源:sp_Availability_DAL.cs

示例11: ShowDetails

 public void ShowDetails(Appointment currentAppointment)
 {
     var eventEditor = container.Resolve<EventEditorViewModel>();
     eventEditor.Edit(currentAppointment);
     container.Resolve<IWindowManager>().ShowModal(eventEditor);
     BuildupTimeLine();
 }
开发者ID:schultyy,项目名称:octocal,代码行数:7,代码来源:DayViewModel.cs

示例12: GetAppointmentData

        private Appointment GetAppointmentData()
        {
            Appointment patientAppointment = new Appointment
                                                 {ScheduledTimeStamp = DateTime.Now.AddDays(3), IsRecurrence = false};

            return patientAppointment;
        }
开发者ID:ELS-STLCM,项目名称:test,代码行数:7,代码来源:RegistrationServiceTest.cs

示例13: ViewModel

		public ViewModel()
		{
			DateTime today = DateTime.Now;

			this.CustomersSource = new ObservableCollection<Customer> 
			{
				new Customer { ID = 1, Name = "Customer 1" },
				new Customer { ID = 2, Name = "Customer 2" },
				new Customer { ID = 3, Name = "Customer 3" },
				new Customer { ID = 4, Name = "Customer 4" },
				new Customer { ID = 5, Name = "Customer 5" } 
			};
			Appointment app1 = new Appointment { Start = today, End = today.AddHours(1), Subject = "Appointment 1" };
			app1.Resources.Add(new Resource("Mary Baird", "Person"));
			Appointment app2 = new Appointment { Start = today.AddHours(1.5), End = today.AddHours(2.5), Subject = "Appointment 2" };
			app2.Resources.Add(new Resource("Diego Roel", "Person"));
			Appointment app3 = new Appointment { Start = today.AddHours(1.5), End = today.AddHours(2.5), Subject = "Appointment 3" };
			app3.Resources.Add(new Resource("Mary Baird", "Person"));
			this.AppointmentsSource = new ObservableCollection<Appointment> 
			{ 
				app1,
				app2,
				app3
			};
		}
开发者ID:JoelWeber,项目名称:xaml-sdk,代码行数:25,代码来源:ViewModel.cs

示例14: Run

        public static void Run()
        {
            try
            {

                // ExStart:CreateMeetingRequestWithRecurrence
                String szUniqueId;

                // Create a mail message
                MailMessage msg1 = new MailMessage();
                msg1.To.Add("[email protected]");
                msg1.From = new MailAddress("[email protected]");

                // Create appointment object
                Appointment agendaAppointment = default(Appointment);
             
                // Fill appointment object
                System.DateTime StartDate = new DateTime(2013, 12, 1, 17, 0, 0);
                System.DateTime EndDate = new DateTime(2013, 12, 31, 17, 30, 0);
                agendaAppointment = new Appointment("same place", StartDate, EndDate, msg1.From, msg1.To);

                // Create unique id as it will help to access this appointment later
                szUniqueId = Guid.NewGuid().ToString();
                agendaAppointment.UniqueId = szUniqueId;
                agendaAppointment.Description = "----------------";

                // Create a weekly reccurence pattern object
                Aspose.Email.Recurrences.WeeklyRecurrencePattern pattern1 = new WeeklyRecurrencePattern(14);

                // Set weekly pattern properties like days: Mon, Tue and Thu
                pattern1.StartDays = new CalendarDay[3];
                pattern1.StartDays[0] = CalendarDay.Monday;
                pattern1.StartDays[1] = CalendarDay.Tuesday;
                pattern1.StartDays[2] =CalendarDay.Thursday;
                pattern1.Interval = 1;

                // Set recurrence pattern for the appointment
                agendaAppointment.Recurrence = pattern1;

                //Attach this appointment with mail
                msg1.AlternateViews.Add(agendaAppointment.RequestApointment());

                // Create SmtpCleint
                SmtpClient client = new SmtpClient("smtp.gmail.com", 587, "[email protected]", "your.password");
                client.SecurityOptions = SecurityOptions.Auto;

                // Send mail with appointment request
                client.Send(msg1);

                // Return unique id for later usage
                // return szUniqueId;
                // ExEnd:SendMailUsingDNS
            }
            catch (Exception exception)
            {
                Console.Write(exception.Message);
                throw;
            }

        }
开发者ID:aspose-email,项目名称:Aspose.Email-for-.NET,代码行数:60,代码来源:CreateMeetingRequestWithRecurrence.cs

示例15: ViewModel

		public ViewModel()
		{
            var date = CalendarHelper.GetFirstDayOfWeek(DateTime.Today, DayOfWeek.Monday);

            var meetingApp = new Appointment()
            {
                Subject = "Meeting with John",
                Start = date.AddHours(7),
                End = date.AddHours(8)
            };
            meetingApp.Resources.Add(new Resource("Room 1", "Room"));

            var scrumApp = new Appointment()
            {
                Subject = "Morning Scrum",
                Start = date.AddHours(9),
                End = date.AddHours(9).AddMinutes(30)
            };
            scrumApp.Resources.Add(new Resource("Room 1", "Room"));
            scrumApp.RecurrenceRule = new RecurrenceRule(
                         new RecurrencePattern()
                {
                    Frequency = RecurrenceFrequency.Daily,
                    MaxOccurrences=5
                }
            );             
			Appointments = new ObservableCollection<Appointment>() { scrumApp, meetingApp };
            this.SelectedAppointment = meetingApp;
		}
开发者ID:Motaz-Al-Zoubi,项目名称:xaml-sdk,代码行数:29,代码来源:ViewModel.cs


注:本文中的Appointment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。