public bool AddAppointment(IAppointment appointment) { if (AppointmentsDictionary.ContainsValue(appointment)) return false; AppointmentsDictionary.Add(appointment.AppointmaDate, appointment); return true; }
public override void CopyFrom(IAppointment other) { MantenimientoSessionApp appointment = other as MantenimientoSessionApp; if (appointment != null) { base.CopyFrom(other); } }
internal AppointmentEntity(IAppointment source, DateTime date, TimeSpan length, uint repeating, bool isRepeated) : base(date, length) { Repeating = repeating; IsRepeated = isRepeated; Source = source; }
public static bool AreOverlapping(IAppointment appointment, Slot slot, Occurrence draggedOccurrence) { //check whether the dragged appointment goes over an appointment or an occurrence if (appointment.RecurrenceRule == null) return (appointment.IntersectsWith(slot) && AreIntersected(appointment.Resources.OfType<IResource>(), slot.Resources.OfType<IResource>())); else return CheckOccurrences(appointment, slot, draggedOccurrence); }
public override void CopyFrom(IAppointment other) { var eventAppointment = other as EventAppointment; if (eventAppointment != null) { this.Event = eventAppointment.Event; } base.CopyFrom(other); }
public override void CopyFrom(IAppointment other) { CustomAppointment appointment = other as CustomAppointment; if (appointment != null) { this.SelectedReminder = appointment.SelectedReminder; } base.CopyFrom(other); }
public void CopyFrom(IExceptionOccurrence other) { if (this.GetType().FullName != other.GetType().FullName) throw new ArgumentException("Invalid type"); this.ExceptionDate = other.ExceptionDate; if (other.Appointment != null) this.Appointment = other.Appointment.Copy(); }
public override void CopyFrom(IAppointment other) { var appointment = other as OrderAppointment; if (appointment == null) return; base.CopyFrom(other); appointment.OrderId = Guid.NewGuid(); appointment.ClientId = ClientId; }
public override void CopyFrom(IAppointment other) { var paymentAppointment = other as PaymentAppointment; if (paymentAppointment != null) { Amount = paymentAppointment._amount; EditRecurrenceDialog = paymentAppointment._editRecurrenceDialog; } base.CopyFrom(other); }
public static bool CheckOccurrences(IAppointment app, Slot slot, Occurrence draggedOccurrence) { var occurrences = app.GetOccurrences(slot.Start, slot.End).Where(p => !p.Equals(draggedOccurrence)); var realOccurrences = new List<Occurrence>(); foreach (var occ in occurrences) { if (occurrences != null) { if (occ.IntersectsWith(slot) && AreIntersected(occ.Appointment.Resources.OfType<IResource>(), slot.Resources.OfType<IResource>())) { realOccurrences.Add(occ); } } } return realOccurrences.Count() > 0; }
private void onClickAddAppointment(object sender, RoutedEventArgs e) { appointment = AppointmentFacade.CreateAppointment(); try { appointment.Name = txtboxNavn.Text; appointment.Description = txtboxBeskrivelse.Text; TimeSpan tidspunkt; TimeSpan.TryParse(txtboxTidspunkt.Text, out tidspunkt); if (dpStartDate.SelectedDate != null) { appointment.StartDate = dpStartDate.SelectedDate.Value.Add(tidspunkt); } else { appointment.StartDate = DateTime.Now; } int freq; int.TryParse(txtboHyppighed.Text, out freq); appointment.Frequency = freq; double price; double.TryParse(txtboxPris.Text, out price); appointment.Price = price; appointment.City = txtboxBy.Text; appointment.ZipCode = txtboxPostnr.Text; appointment.Address = txtboxAddresse.Text; //appointments.Add(appointment); } catch (Exception exception) { Console.WriteLine(exception); MessageBox.Show("Fejl! " + e.ToString()); } Close(); }
private void panelDailyView_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { // See if we are on an appointment. If // so, display the context menu. IAppointment appointment = CheckForAppointment(e); if (appointment != null) { _SelectedAppointment = appointment; contextMenuStrip.Show(panelDailyView, new Point(e.X, e.Y)); } } else { // Calculate the new selected row and force // a repaint of the panel int y = e.Y / PanelRowHeight; _SelectedRow = y + vScrollBar.Value; panelDailyView.Invalidate(); } }
public void CopyFrom(IAppointment other) { this.IsAllDayEvent = other.IsAllDayEvent; this.Start = other.Start; this.End = other.End; this.Subject = other.Subject; var otherAppointment = other as SqlAppointment; if (otherAppointment == null) { return; } this.CategoryID = otherAppointment.CategoryID; this.TimeMarker = otherAppointment.TimeMarker; this.Resources.Clear(); this.Resources.AddRange(otherAppointment.Resources); this.Body = otherAppointment.Body; }
private void SaveAppointmentToDataBase(IAppointment appointment, ICustomer customer, IMyServices service) { IDate date = kernel.Get <IDate>(); appointmentController.SaveToDatabaseEvent += emailConfirmation.OnSavedToDatabaseEventLog; appointmentController.SaveToDatabaseEvent += smsConfirmation.OnSavedToDatabaseEventLog; var date_id = dateController.GetDate(appointment.AppointmentDay, appointment.AppointmentTime).Date_Id; var customer_id = customerController.GetCustomer(customer).Customer_Id; var service_id = myServicesController.GetService(service).Service_Id; if (CheckObjectIsItNotNull(appointment, customer, service)) { if (string.IsNullOrEmpty(customer_id)) { customerController.SaveCustomer(customer); customer_id = customerController.GetCustomer(customer).Customer_Id; } if (string.IsNullOrEmpty(date_id)) { date.Day = appointment.AppointmentDay; date.Time = appointment.AppointmentTime; date.Length = appointment.AppointmentLength; date.Duration = appointment.AppointmentDuration; dateController.SaveDate(date); date_id = dateController.GetDate(date.Day, date.Time).Date_Id; appointmentController.SaveAppointment(date_id, customer_id, service_id); } else { MessageBox.Show("Termin zajęty!"); } } }
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { if (_SelectedAppointment.GetType() == typeof(RecurringAppointment)) { DialogResult dialogResult = MessageBox.Show("Delete all recurring appointments?", "Delete Recurring", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.No) { RecurringAppointment comparison = (RecurringAppointment)_SelectedAppointment; comparison.OccuringDates.Remove(monthCalendar.SelectionRange.Start.Date); } else if (dialogResult == DialogResult.Yes) { _Appointments.Remove(_SelectedAppointment); } } else { _Appointments.Remove(_SelectedAppointment); } _SelectedAppointment = null; GetAppointmentsOnSelectedDate(monthCalendar.SelectionRange.Start); panelDailyView.Invalidate(); }
// public HomeController(IEvent events, UserManager<IdentityUser> userManager, IHolidayEntitlement _HolidayEntitlement) public HomeController(IDepartment department, UserManager <HolidayUser> userManager, IHolidayEntitlement _HolidayEntitlement, IState state, IRuntime _Runtime, IAppointment AppointmentRepository, IHolidayCalc holidayCalc) { // _events = events; _userManager = userManager; _holidayEntitlement = _HolidayEntitlement; _DepartmentList = department; _StateList = state; _runtime = _Runtime; if (_runtime.CurrentDepartmentId == 0) { _runtime.CurrentDepartmentId = 1; } _appointmentRepository = AppointmentRepository; _MainViewModel = new MainViewModel(); _MainViewModel.DepartmentList = _DepartmentList.GetAllDepartment(); _MainViewModel.StateList = _StateList.GetAllState(); _MainViewModel.DepartmentUserList = _userManager.Users.ToList(); _MainViewModel.UserList = _userManager.Users.ToList(); _MainViewModel.AppointmentList = _appointmentRepository.GetAllAppointment(); holidayCalc.HolidayRemaining(_MainViewModel.DepartmentUserList, System.DateTime.Now); }
//A lot of this would have been copied, so I thought it prudent to put it in it's own method. private bool AddEdit(IAppointment apt) { //We have to ensure that it's a new appointment before changing the start time. if (apt.Start < DateTime.Now && !_Appointments.Contains(apt)) { //Set the Datetime as Now (This will be fixed in the class to be a 30min interval). ((Appointment)apt).Start = DateTime.Now; //Alert User that you can't add an appointment before the selected date //Alternately } AppointmentForm editForm; if (apt.GetType() == typeof(RecurringAppointment)) { editForm = new RecurringForm(); } else { editForm = new AppointmentForm(); } //Necessary to determine the appropriate times that aren't overlapped. //Used to edit the Datasource of Length and StartTime //editForm.Apts = _Appointments; editForm.Apt = apt; if (editForm.ShowDialog() == DialogResult.OK) { editForm.Close(); return(true); } else { editForm.Close(); return(false); } }
internal TimeSlot GetDestinationTimeSlot(IAppointment app, TimeSlot slot) { DateTime st = app.Start; DateTime end = app.End; if (app.IsAllDay() || slot.End == slot.Start.AddDays(1)) { var duration = app.End - app.Start; if (app.IsAllDay() && slot.End == slot.Start.AddDays(1)) { st = slot.Start; end = st + duration; } else { st = slot.Start; end = slot.End; } } else { TimeSpan offset = slot.Start - app.Start - this.Scheduler.DroppedAppointmentDuration; if (offset.IsNegative()) { st = app.Start + offset; end = app.End + offset; } else { end = app.End + offset; st = app.Start + offset; } } return(new TimeSlot(st, end)); }
void ICopyable <IAppointment> .CopyFrom(IAppointment other) { this.IsAllDayEvent = other.IsAllDayEvent; this.Start = other.Start; this.End = other.End; this.Subject = other.Subject; var otherAppointment = other as SqlAppointment; if (otherAppointment == null) { return; } this.CategoryID = otherAppointment.CategoryID; this.TimeMarker = otherAppointment.TimeMarker; this.RecurrenceRule = other.RecurrenceRule == null ? null : other.RecurrenceRule.Copy() as SqlRecurrenceRule; this.RecurrencePattern = otherAppointment.RecurrencePattern; this.Resources.Clear(); this.Resources.AddRange(otherAppointment.Resources); this.Body = otherAppointment.Body; }
/// <summary> /// Populates the providers. /// </summary> /// <param name="selectedItem">The selected item.</param> private void PopulateProviders(ListItem selectedItem = null) { if (ddAppProvider.Items.Count == 0) { IAppointment objMgr = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); DataSet dsEmployee = objMgr.GetEmployees(0); ddAppProvider.Items.Clear(); ddAppProvider.Items.Add(new ListItem("Select..", "")); foreach (DataRow dr in dsEmployee.Tables[0].Rows) { ddAppProvider.Items.Add(new ListItem(dr["EmployeeName"].ToString(), dr["EmployeeId"].ToString())); } } ddAppProvider.ClearSelection(); if (selectedItem != null) { ListItem _item = ddAppProvider.Items.FindByValue(selectedItem.Value); if (_item == null) { ddAppProvider.Items.Add(selectedItem); ddAppProvider.SelectedIndex = (ddAppProvider.Items.Count - 1); } else { _item.Selected = true; } } else if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0 && OpenMode == "NEW") { ListItem item = ddAppProvider.Items.FindByValue(Session["AppUserEmployeeId"].ToString()); if (item != null) { item.Selected = true; } } }
//This was slightly modified, instead of returning what appointment was on the row, it instead see which appointment the e.x and e.y intersects with (It's rectangle.) private IAppointment CheckForAppointment(MouseEventArgs e) { bool matchFound = false; IAppointment appointment = null; if (e.X < ApptOffset || e.X > panelDailyView.ClientRectangle.Size.Width - vScrollBar.Width - ApptOffset) { return(null); } IEnumerator <IAppointment> enumerator = _TodaysAppointments.GetEnumerator(); while (enumerator.MoveNext() && !matchFound) { if (_UiRect.Count() > 0 && _UiRect.ContainsKey(enumerator.Current) && _UiRect[enumerator.Current].Contains(e.Location)) { matchFound = true; appointment = enumerator.Current; } } return(appointment); }
private void panelDailyView_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { // See if we are on an appointment. If // so, display the context menu. IAppointment appointment = CheckForAppointment(e); //Disable the ability to Edit past Appointments. if ((appointment != null && appointment.Start > DateTime.Now) || (appointment is RecurringAppointment && monthCalendar.SelectionRange.Start > DateTime.Now.Date)) { _SelectedAppointment = appointment; contextMenuStrip.Show(panelDailyView, new Point(e.X, e.Y)); } } else { // Calculate the new selected row and force // a repaint of the panel int y = e.Y / PanelRowHeight; _SelectedRow = y + vScrollBar.Value; panelDailyView.Invalidate(); } }
//All appointments need to have end time and date and a location. public static void GetEndDateAndLocation(IAppointment appointment) { var endDate = new DateTime(); var isSet = false; while (!isSet) { Console.WriteLine("Enter an ending time and date. (Ex. 12:00AM 11/03/2017"); var input = Console.ReadLine(); if (DateTime.TryParse(input, out endDate)) { appointment.EndTime = endDate; Console.WriteLine(appointment.EndTime); Console.WriteLine("Enter a location."); appointment.Location = Console.ReadLine(); isSet = true; } else { Console.WriteLine("Please enter a valid time and date."); continue; } } }
public AppointmentEventArgs(DateTime start, DateTime end, IAppointment appointment) { m_DateTimeEnd = end; m_DateTimeStart = start; m_Appointment = appointment; }
public IAppointment CreateExceptionAppointment(IAppointment master) { return (master as SqlAppointment).ShallowCopy(); }
public override void CopyFrom(IAppointment other) { var appointment = other as SupportMeetingAppointment; if (appointment != null) { this.ImageSource = appointment.ImageSource; this.IsDraggedFromListBox = appointment.IsDraggedFromListBox; this.SourceResource = appointment.SourceResource; this.Attendees = appointment.Attendees; } base.CopyFrom(other); }
public abstract bool AddAppointment(IAppointment appointment);
public bool Equals(IAppointment other) { var otherAppointment = other as IAppointment; return otherAppointment != null && other.Start == this.Start && other.End == this.End && other.Subject == this.Subject && this.TimeZone == otherAppointment.TimeZone && this.IsAllDayEvent == other.IsAllDayEvent && this.RecurrenceRule == other.RecurrenceRule && this.Resources == other.Resources; }
private void DeleteOrder(IAppointment appointment) { if (IsUserBlocked()) { UpdateOrders(); return; } var orderAppointment = (OrderAppointment) appointment; if( _orderService.Delete(orderAppointment.OrderId)) { UpdateOrders(); return; } RadWindow.Alert(new DialogParameters { Header = "Ошибка при работе с БД.", Content = "При удалении заказа произошла ошибка." }); }
public override void CopyFrom(IAppointment other) { ProgrammeAppointment appointment = other as ProgrammeAppointment; if (appointment != null) { this.Duration = appointment.Duration; if (appointment.Resources.Any()) { var resourcesCollection = (ResourceCollection)appointment.Resources; this.Programme = resourcesCollection.First(r => r.ResourceType == "TV").DisplayName; this.ProgrammeLabel = resourcesCollection.Count > 1 ? resourcesCollection.First(r => r.ResourceType == "Programme").DisplayName.ToUpperInvariant() : "NEWS"; if (resourcesCollection.Count == 1) { appointment.Resources.Add(new Resource() { ResourceType = "Programme", ResourceName = "News" }); } } this.LabelBrush = this.GetProgrammeBrush(this.ProgrammeLabel); this.ProgrammeImageSource = appointment.ProgrammeImageSource; this.IsLive = appointment.IsLive; } base.CopyFrom(other); }
private void panelDailyView_MouseDoubleClick(object sender, MouseEventArgs e) { IAppointment appointment = CheckForAppointment(e); if (appointment != null) { _SelectedAppointment = appointment; if (_SelectedAppointment is RecurringAppointment) { RecurringAppointment app = _SelectedAppointment as RecurringAppointment; RecurringAppointmentForm form = new RecurringAppointmentForm(monthCalendar.SelectionRange.Start, app); form.ShowDialog(); _Appointments.Remove(_SelectedAppointment); _TodaysAppointments.Remove(_SelectedAppointment); if (form.ReccuringApp == null) { return; } if (_Appointments.Count > 0) { foreach (IAppointment otherappointment in _Appointments) { if (form.ReccuringApp.OccursOnTime(otherappointment.Start, otherappointment.Length)) { MessageBox.Show("Date and Time already used at " + app.Start.ToLongDateString(), "Cannot add current recurring appointment", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } } ; _Appointments.Add(form.ReccuringApp); _TodaysAppointments.Add(form.ReccuringApp); panelDailyView.Invalidate(); return; } if (_SelectedAppointment is Appointment) { Appointment app = _SelectedAppointment as Appointment; AppointmentForm form = new AppointmentForm(monthCalendar.SelectionRange.Start, app); form.ShowDialog(); if (form.App == null) { return; } if (_Appointments.Count > 0) { foreach (IAppointment otherappointment in _Appointments) { if (form.App.OccursOnTime(otherappointment.Start, otherappointment.Length)) { MessageBox.Show("Date and Time already used", "Cannot add current appointment", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } } _Appointments.Remove(app); _TodaysAppointments.Remove(app); _Appointments.Add(form.App); _TodaysAppointments.Add(form.App); panelDailyView.Invalidate(); return; } } }
private bool Filter(IAppointment appointment) { AppAppointment a = appointment as AppAppointment; return a != null && this.FilterByCalendar(a); }
public override void CopyFrom(IAppointment other) { CustomAppointment appointment = other as CustomAppointment; if (appointment != null) { this.EpisodeNumber = appointment.EpisodeNumber; this.IsLive = appointment.IsLive; } base.CopyFrom(other); }
public void AddAppointmentToCustomer(IAppointment iappointment, ICustomer icustomer) { }
public override void CopyFrom(IAppointment other) { var appAppointment = other as AppAppointment; if (appAppointment != null) { // All custom props set here this.IsReadOnly = appAppointment.IsReadOnly; //this.CustomString = appAppointment.CustomString; this.OriginalMasterId = appAppointment.UniqueId; this.IsDirty = appAppointment.IsDirty; this.IsNew = appAppointment.IsNew; this.RecordId = appAppointment.RecordId; this.RecordSource = appAppointment.RecordSource; this.TypeId = appAppointment.TypeId; this.UserId = appAppointment.UserId; } base.CopyFrom(other); }
internal AppointmentEntity(IAppointment source, DateTime date, TimeSpan length) : this(source, date, length, 0, false) { }
public EditAppointmentForm(IAppointment appt) { InitializeComponent(); Appointment = appt; AppointmentBinding.DataSource = appt; }
public override void CopyFrom(IAppointment other) { base.CopyFrom(other); CustomAppointment appointment = other as CustomAppointment; if (appointment != null) { this.Opportunity = appointment.Opportunity; this.Activity.UpdateAllProperties(appointment.Activity); } }
/// <summary> /// Creates the appointment slots from appointment. /// </summary> /// <param name="appointment">The appointment.</param> /// <returns></returns> protected virtual IList <AppointmentSlot> CreateAppointmentSlotsFromAppointment(IAppointment appointment) { if (this.TimeSlots != null) { return(appointment.GetAppointmentSlots(this.TimeSlots)); } return(null); }
/// <summary> /// Copies from. /// </summary> /// <param name="other">The other.</param> public void CopyFrom( IAppointment other ) { if ( other is LocationWorkHourDto ) { var otherDto = other as LocationWorkHourDto; Key = otherDto.Key; DayOfWeek = otherDto.DayOfWeek; StartTime = otherDto.StartTime; EndTime = otherDto.EndTime; } }
public AppointmentsController(IAppointment iappoint) { this.iappoint = iappoint; }
public void CopyFrom(IAppointment other) { var original = other as CommonModel; if (original != null) { this.children = new ObservableCollection<CommonModel>(original.children); this.Deadline = original.Deadline; this.dependencies = new ObservableCollection<IDependency>(original.dependencies); this.Description = original.Description; this.Duration = original.Duration; this.Parent = original.Parent; this.End = original.End; this.IsAllDayEvent = original.IsAllDayEvent; this.IsMilestone = original.IsMilestone; this.Progress = original.Progress; this.RecurrenceRule = original.RecurrenceRule; this.Resources = original.Resources; this.Start = original.Start; this.Subject = original.Subject; this.TimeZone = original.TimeZone; } }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns>true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.</returns> public bool Equals( IAppointment other ) { if ( other is LocationWorkHourDto ) { return Equals ( other as KeyedDataTransferObject ); } return false; }
public override void CopyFrom(IAppointment other) { var appClosedDay = other as AppClosedDay; if (appClosedDay != null) { // All custom props set here this.IsReadOnly = appClosedDay.IsReadOnly; this.OriginalMasterId = appClosedDay.UniqueId; this.IsDirty = appClosedDay.IsDirty; this.IsNew = appClosedDay.IsNew; this.TypeId = appClosedDay.TypeId; } base.CopyFrom(other); }
/// <summary> /// Initializes a new instance of the <see cref="AppointmentCreatedEventArgs"/> class. /// </summary> /// <param name="routedEvent">The routed event.</param> /// <param name="createdAppointment">The created appointment.</param> public AppointmentCreatedEventArgs(RoutedEvent routedEvent, IAppointment createdAppointment) : base(routedEvent) { this.createdAppointment = createdAppointment; }
/// <summary> /// Initializes a new instance of the <see cref="DragVisualCue"/> class. /// </summary> /// <param name="app">The app.</param> /// <param name="isDragging">If set to <c>true</c> [is dragging].</param> public DragVisualCue(IAppointment app, bool isDragging) { this.app = app; this.isDragging = isDragging; }
/// <summary> /// Initializes a new instance of the <see cref="AppointmentCreatedEventArgs"/> class. /// </summary> /// <param name="routedEvent">The routed event.</param> /// <param name="source">The source.</param> /// <param name="createdAppointment">The created appointment.</param> public AppointmentCreatedEventArgs(RoutedEvent routedEvent, object source, IAppointment createdAppointment) : base(routedEvent, source) { this.createdAppointment = createdAppointment; }
public CellAppointment(IAppointment appointment) : base(appointment.Title) { m_Appointment = appointment; }
public AppointmentRequestedEvent(IAppointment appointment) { Appointment = appointment; }
private void UpdateOrder(IAppointment appointment) { if (IsUserBlocked()) { UpdateOrders(); return; } var orderAppointment = (OrderAppointment)appointment; var order = _orderService.Get(orderAppointment.OrderId); order.Start = appointment.Start; order.End = appointment.End; _orderService.Save(order); UpdateClientDiscount(); }
public AppointmentController(IAppointment appointmentRepository) { _appointmentRepository = appointmentRepository; }
private void EditOrder(IAppointment appointment) { if(IsUserBlocked()) { UpdateOrders(); return; } var orderAppointment = (OrderAppointment)appointment; var order = _orderService.Get(orderAppointment.OrderId); var dialog = new OrderAppoinmentView(ClientItemSelected, order, SelectedHall, order.Start, order.End); dialog.Show(); dialog.Closed += (dialogObj, dialogArgs) => UpdateOrders(); }
protected void btnExcel_Click(object sender, EventArgs e) { FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); IQCareUtils theUtil = new IQCareUtils(); int theAppStatus = 0; if (ddAppointmentStatus.SelectedValue == "12") { theAppStatus = 1; } else if (ddAppointmentStatus.SelectedValue == "13") { theAppStatus = 2; } else if (ddAppointmentStatus.SelectedValue == "15") { theAppStatus = 3; } if (txtFrom.Text == "") { txtFrom.Text = "1-1-1900"; } if (txtTo.Text == "") { txtTo.Text = "1-1-1900"; } DataTable dtAppointment = (DataTable)FormManager.GetAppointmentGrid(theAppStatus, Convert.ToDateTime(theUtil.MakeDate(txtFrom.Text)), Convert.ToDateTime(theUtil.MakeDate(txtTo.Text)), Convert.ToInt32(Session["AppLocationId"])).Tables[0]; DataTable theDT = dtAppointment.Copy(); theDT.Columns.Remove("ptn_pk"); theDT.Columns.Remove("LocationId"); theDT.Columns.Remove("Visit_Pk"); theDT.Columns.Remove("appdate"); IQWebUtils theUtils = new IQWebUtils(); theUtils.ExporttoExcel(theDT, Response); /* Begin 25-03-2010 * DataTable theDT = new DataTable(); * theDT.Columns.Add("FirstName", System.Type.GetType("System.String")); * if (Convert.ToInt32(Session["SystemId"]) == 2) * { * theDT.Columns.Add("MiddleName", System.Type.GetType("System.String")); * } * theDT.Columns.Add("LastName", System.Type.GetType("System.String")); * theDT.Columns.Add("Appointment Status", System.Type.GetType("System.String")); * theDT.Columns.Add("Purpose", System.Type.GetType("System.String")); * theDT.Columns.Add("Enrollment No", System.Type.GetType("System.String")); * theDT.Columns.Add("Appointment Date", System.Type.GetType("System.String")); * * theDT.Columns.Add(((DataTable)ViewState["grdDataSource"]).Rows[1][0].ToString().Trim(), System.Type.GetType("System.String")); * theDT.Columns.Add("Program", System.Type.GetType("System.String")); * * for (int i = 0; i < dtAppointment.Rows.Count; i++) * { * DataRow theDR = theDT.NewRow(); * * if (Convert.ToInt32(Session["SystemId"]) == 1) * { * theDR[0] = dtAppointment.Rows[i]["FirstName"].ToString(); * theDR[1] = dtAppointment.Rows[i]["LastName"].ToString(); * theDR[2] = dtAppointment.Rows[i]["AppointmentStatus"]; * theDR[3] = dtAppointment.Rows[i]["Purpose"]; * theDR[4] = dtAppointment.Rows[i]["patientenrollmentid"]; * theDR[5] = dtAppointment.Rows[i]["App_Date"]; * theDR[6] = dtAppointment.Rows[i]["PatientClinicID"]; * theDR[7] = dtAppointment.Rows[i]["Program"]; * theDT.Rows.InsertAt(theDR, i); * * } * * else * { * theDR[0] = dtAppointment.Rows[i]["FirstName"].ToString(); * theDR[1] = dtAppointment.Rows[i]["MiddleName"].ToString(); * theDR[2] = dtAppointment.Rows[i]["LastName"].ToString(); * theDR[3] = dtAppointment.Rows[i]["AppointmentStatus"]; * theDR[4] = dtAppointment.Rows[i]["Purpose"]; * theDR[5] = dtAppointment.Rows[i]["patientenrollmentid"]; * theDR[6] = dtAppointment.Rows[i]["App_Date"]; * theDR[7] = dtAppointment.Rows[i]["PatientClinicID"]; * theDR[8] = dtAppointment.Rows[i]["Program"]; * theDT.Rows.InsertAt(theDR, i); * * } * * } * Session["Appointment"] = theDT; * string FName = "AppointmentList"; * * string thePath = Server.MapPath("..\\ExcelFiles\\" + FName + ".xls"); * string theTemplatePath = Server.MapPath("..\\ExcelFiles\\IQCareTemplate.xls"); * theUtil.ExportToExcel((DataTable)Session["Appointment"], thePath, theTemplatePath); * * Response.Redirect("..\\ExcelFiles\\" + FName + ".xls"); */ }
public void Delete(IAppointment appointment) { throw new NotImplementedException(); }
private static bool AreOverlapping( IAppointment appointment, Slot slot ) { return appointment.IntersectsWith ( slot ); }
public AppointmentController(IAppointment sourceAppointment, UserController userController) { this.sourceAppointment = sourceAppointment; this.userController = userController; }
public void Delete(IAppointment appointment) { Delete(appointment.Owner, appointment.BeginDate, appointment.BeginTime, appointment.EndDate, appointment.EndTime); }
public SchedulerDataController(IHttpContextAccessor httpContextAccessor, IMemoryCache memoryCache, IAppointment appointment, UserManager <HolidayUser> userManager, IRuntime _Runtime) { _data = new InMemoryAppointmentsDataContext(httpContextAccessor, appointment); _appointment = appointment; _userManager = userManager; _runtime = _Runtime; }
// Implementierungsdetails string GetKey(IAppointment appointment) { return(GetKey(appointment.Owner, ToDateTime(appointment.BeginDate, appointment.BeginTime), ToDateTime(appointment.EndDate, appointment.EndTime))); }