• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Appointment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Run

        public static void Run()
        {
            // The path to the File directory.
            string dataDir = RunExamples.GetDataDir_SMTP();
            string dstEmail = dataDir + "outputAttachments.msg";

            // Create an instance of the MailMessage class
            MailMessage msg = new MailMessage();

            // Set the sender, recipient, who will receive the meeting request. Basically, the recipient is the same as the meeting attendees
            msg.From = "[email protected]";
            msg.To = "[email protected], [email protected], [email protected], [email protected]";

            // Create Appointment instance
            Appointment app = new Appointment("Room 112", new DateTime(2015, 7, 17, 13, 0, 0), new DateTime(2015, 7, 17, 14, 0, 0), msg.From, msg.To);
            app.Summary = "Release Meetting";
            app.Description = "Discuss for the next release";

            // Add appointment to the message and Create an instance of SmtpClient class
            msg.AddAlternateView(app.RequestApointment());
            SmtpClient client = GetSmtpClient();

            try
            {
                // Client.Send will send this message
                client.Send(msg);
                Console.WriteLine("Message sent");
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.ToString());
            }
            Console.WriteLine(Environment.NewLine + "Meeting request send successfully.");
        }
开发者ID:aspose-email,项目名称:Aspose.Email-for-.NET,代码行数:34,代码来源:MeetingRequests.cs


示例17: Add

 public async void Add(object sender, DatePicker startDate, TimePicker startTime,
     TextBox subject, TextBox location, TextBox details, ComboBox duration, CheckBox allDay)
 {
     FrameworkElement element = (FrameworkElement)sender;
     GeneralTransform transform = element.TransformToVisual(null);
     Point point = transform.TransformPoint(new Point());
     Rect rect = new Rect(point, new Size(element.ActualWidth, element.ActualHeight));
     DateTimeOffset date = startDate.Date;
     TimeSpan time = startTime.Time;
     int minutes = int.Parse((string)((ComboBoxItem)duration.SelectedItem).Tag);
     Appointment appointment = new Appointment()
     {
         StartTime = new DateTimeOffset(date.Year, date.Month, date.Day,
         time.Hours, time.Minutes, 0, TimeZoneInfo.Local.GetUtcOffset(DateTime.Now)),
         Subject = subject.Text,
         Location = location.Text,
         Details = details.Text,
         Duration = TimeSpan.FromMinutes(minutes),
         AllDay = (bool)allDay.IsChecked
     };
     string id = await AppointmentManager.ShowAddAppointmentAsync(appointment, rect, Placement.Default);
     if (string.IsNullOrEmpty(id))
     {
         Show("Appointment not Added", "Appointment App");
     }
     else
     {
         Show(string.Format("Appointment {0} Added", id), "Appointment App");
     }
 }
开发者ID:RoguePlanetoid,项目名称:Windows-10-Universal-Windows-Platform,代码行数:30,代码来源:Library.cs


示例18: Appointments_ItemDataBound

    protected void Appointments_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        currentAppointment = (Appointment)e.Item.DataItem;
        if (currentAppointment == null)
            return;

        ImageButton btnDel = (ImageButton)e.Item.FindControl("ButtonDelete");
        btnDel.CommandArgument = currentAppointment.Id.ToString();
        btnDel.Attributes["OwnerId"] = LoginState.IsAdmin() ? "admin" : currentAppointment.UserId;

        Repeater inner = (Repeater)e.Item.FindControl("Posts");
        List<Post> posts = new List<Post>();
        foreach (Post p in currentAppointment.AppointmentPosts)
            posts.Add(p);
        posts.Sort((a, b) => a.PostingDate.CompareTo(b.PostingDate));
        inner.DataSource = posts;
        inner.ItemDataBound += new RepeaterItemEventHandler(inner_ItemDataBound);
        inner.DataBind();
        TextBox txt = (TextBox)e.Item.FindControl("Name");
        Button btn = (Button)e.Item.FindControl("ButtonSend");
        btn.CommandArgument = currentAppointment.Id.ToString();
        btn.OnClientClick = string.Format("onSendPost('{0}');", txt.ClientID);
        HtmlImage img = (HtmlImage)e.Item.FindControl("Meteo");
        int idx = currentAppointment.AppointmentDate.DayOfYear - DateTime.Now.DayOfYear;
        if (idx < 0 || idx > 6)
            img.Visible = false;
        else
            img.Src = string.Format("http://www.ilmeteo.it/cartine2/{0}.LIG.png", idx);
    }
开发者ID:Maasik,项目名称:mtbscout,代码行数:29,代码来源:Appointments.aspx.cs


示例19: AppDefaultConstructorDesc

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


示例20: ViewModel

        public ViewModel()
        {
            this.appointments = new ObservableCollection<Appointment>();

            var app = new Appointment { Start = DateTime.Today.AddHours(8), End = DateTime.Today.AddHours(9), Subject = "Scrum meeting" };
            this.appointments.Add(app);
        }
开发者ID:Ramlanka7,项目名称:xaml-sdk,代码行数:7,代码来源:ViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Arc类代码示例发布时间:2022-05-24
下一篇:
C# ApplyTween类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap