public EditSectionForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; workingType = WorkingTypeEnum.Creating; }
public EditInfrastructureForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; this.workingType = WorkingTypeEnum.Creating; }
public NewPatientForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; InitializeInsuranceCompaniesComboBox(); }
public EditBudgetForm(Budget budget) { InitializeComponent(); workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.budget = budget; patientTextBox.ReadOnly = true; patientTextBox.Values = ezkoController.GetPatients().ToArray(); addButton.Text = "Upraviť rozpočet"; dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.GridColor = Color.White; dataGridView.AllowUserToResizeRows = false; dataGridView.AllowUserToResizeColumns = true; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; dataGridView.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(238, 239, 249); dataGridView.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal; dataGridView.DefaultCellStyle.SelectionBackColor = Color.DarkTurquoise; dataGridView.DefaultCellStyle.SelectionForeColor = Color.WhiteSmoke; dataGridView.BackgroundColor = Color.White; dataGridView.EnableHeadersVisualStyles = false; dataGridView.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; dataGridView.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(20, 25, 72); dataGridView.ColumnHeadersDefaultCellStyle.ForeColor = Color.White; dataGridView.RowHeadersVisible = false; InitializeDataGridView(); InitializeForm(); }
public EventOverviewForm(CalendarEvent calendarEvent) { InitializeComponent(); try { ezkoController = GlobalSettings.EzkoController; this.calendarEvent = calendarEvent; patientName = calendarEvent.Patient.FullName; eventDate = calendarEvent.StartDate.ToString("dd.MM.yyyy HH:mm"); state = calendarEvent.EventState.ToString().ToLower(); if (calendarEvent.PaymentDate.HasValue) { paymentDateLabel.Font = new Font(paymentDateLabel.Font, FontStyle.Regular); paymentDate = calendarEvent.PaymentDate.Value.ToString("dd.MM.yyyy HH:mm"); payEventButton.Visible = false; } else if (calendarEvent.StateID != (int)EventStateEnum.Done) { payEventButton.Visible = false; } doneText = calendarEvent.ExecutedActionText; InitializeDoneActionsGrid(); InitializeBillingGrid(); } catch (Exception ex) { BasicMessagesHandler.ShowErrorMessage("Pri načítaní podrobností o návšteve sa vyskytla chyba", ex); } }
public BudgetsControlPanel() { InitializeComponent(); dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.GridColor = Color.White; dataGridView.AllowUserToResizeRows = false; dataGridView.AllowUserToResizeColumns = true; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; dataGridView.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(238, 239, 249); dataGridView.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal; dataGridView.DefaultCellStyle.SelectionBackColor = Color.DarkTurquoise; dataGridView.DefaultCellStyle.SelectionForeColor = Color.WhiteSmoke; dataGridView.BackgroundColor = Color.White; dataGridView.EnableHeadersVisualStyles = false; dataGridView.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; dataGridView.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(20, 25, 72); dataGridView.ColumnHeadersDefaultCellStyle.ForeColor = Color.White; dataGridView.RowHeadersVisible = false; ezkoController = GlobalSettings.EzkoController; patientTextBox.Values = ezkoController.GetPatients().ToArray(); InitializeDataGridView(); FillDataGridView(); }
//Just for testing purpose //public EditInsuranceCompanyForm(WorkingTypeEnum workingType) //{ // InitializeComponent(); // ezkoController = new EzkoController(GlobalSettings.ConnectionString); // this.workingType = workingType; //} public EditInsuranceCompanyForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; this.workingType = WorkingTypeEnum.Creating; }
//Just for testing purpose //public EzkoForm(WorkingTypeEnum workingType) //{ // InitializeComponent(); // ezkoController = new EzkoController(GlobalSettings.ConnectionString); // this.workingType = workingType; //} public EzkoForm(WorkingTypeEnum workingType) { InitializeComponent(); this.ezkoController = GlobalSettings.EzkoController; this.workingType = workingType; }
public GoogleIntegratedCalendarControl(ref GoogleCalendarSynchronizer.GoogleCalendarSynchronizer calendarSynchronizer) { InitializeComponent(); CultureInfo culture = new CultureInfo(GlobalSettings.LanguagePrefix); Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; //Monthview colors monthView.MonthTitleColor = monthView.MonthTitleColorInactive = CalendarColorTable.FromHex("#C2DAFC"); monthView.ArrowsColor = CalendarColorTable.FromHex("#77A1D3"); monthView.DaySelectedBackgroundColor = CalendarColorTable.FromHex("#F4CC52"); monthView.DaySelectedTextColor = monthView.ForeColor; DateTime now = DateTime.Now; calendar.ViewStart = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0); calendar.ViewEnd = new DateTime(now.Year, now.Month, now.Day, 23, 59, 59); findEventUserControl.SetPickedDateLabel(calendar.ViewStart, calendar.ViewEnd); ezkoController = GlobalSettings.EzkoController; visitUserControl.SetCalendarControl(this); visitUserControl.SetEzkoController(ezkoController); //findEventUserControl.SetEzkoController(ezkoController); findEventUserControl.SetVisitUserControl(visitUserControl); findEventUserControl.SetCalendarControl(this); findEventUserControl.UpdateControl(); InitializeControl(); calendarSynchronizer = this.calendarSynchronizer; }
public EditUserForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; this.workingType = WorkingTypeEnum.Creating; InitializeForm(); }
public UsersControlPanel() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; InitializeDataGridView(); FillDataGridView(); }
public PatientsUserControl() { InitializeComponent(); exportMenuItem.Visible = false; importMenuItem.Visible = false; ezkoController = GlobalSettings.EzkoController; InitializeDataGridView(); FillDataGridView(ezkoController.GetPatients()); }
public AdministrationUserControl() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; userControlPanel = new UsersControlPanel(); mainPanel.Controls.Add(userControlPanel); userControlPanel.Dock = DockStyle.Fill; }
public EditFieldForm() { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; workingType = WorkingTypeEnum.Creating; recreateButton.Visible = false; InitializeForm(); }
public EditUserForm(User user) { InitializeComponent(); ezkoController = GlobalSettings.EzkoController; this.user = user; workingType = WorkingTypeEnum.Editing; addButton.Text = "Upraviť používateľa"; InitializeForm(); }
public EditFieldForm(Field field) { InitializeComponent(); workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.field = field; addButton.Text = "Uložiť zmeny v poli"; InitializeForm(); }
public EditActionForm(DatabaseCommunicator.Model.Action action) { InitializeComponent(); workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.action = action; addButton.Text = "Upraviť výkon"; InitializeForm(); }
public EditSectionForm(Section section) { InitializeComponent(); workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.section = section; addButton.Text = "Upraviť sekciu EZKO"; InitializeForm(); }
public EditInfrastructureForm(Infrastructure infrastructure) { InitializeComponent(); workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.infrastructure = infrastructure; addButton.Text = "Upraviť infraštruktúru"; InitializeForm(); }
public EditInsuranceCompanyForm(InsuranceCompany insuranceCompany) { InitializeComponent(); this.insuranceCompany = insuranceCompany; ezkoController = GlobalSettings.EzkoController; workingType = WorkingTypeEnum.Editing; addButton.Text = "Upraviť poisťovňu"; insuranceCompanyName = insuranceCompany.Name; insuranceCompanyCode = insuranceCompany.Code; }
public FillQuestionnaireForm(DatabaseCommunicator.Model.Form form) { InitializeComponent(); this.form = form; ezkoController = GlobalSettings.EzkoController; autoCompleteTextBox.Values = ezkoController.GetPatients().ToArray(); formTitleLabel.Text = form.Name; FormGenerator.GenerateForm(flowLayoutPanel, form); }
public LoginForm(EzkoController ezkoController) { InitializeComponent(); this.ezkoController = ezkoController; #if DEBUG userNameTextBox.Text = "doktor"; passwordTextBox.Text = "123"; passwordTextBox.Focus(); #else userNameTextBox.Focus(); #endif }
/// <summary> /// Transfers the unsynchronized changes made on CalendarEvent entities (for example changes which were made during no internet connection) /// </summary> /// <returns>Value indicating whether the synchronization was successfull</returns> private bool SynchronizeUnsynchronizedEvents(EzkoController ezkoController) { bool result = true; try { List <CalendarEvent> unsynchronizedEvents = ezkoController.GetEvents().Where(x => !x.IsSynchronized).ToList(); if (unsynchronizedEvents.Count <= 0) { return(result); } EventsResource.ListRequest request = service.Events.List(calendarID); request.TimeMin = DateTime.Now.AddMonths(-6); request.TimeMax = DateTime.Now.AddMonths(12); request.ShowDeleted = false; request.SingleEvents = false; request.OrderBy = EventsResource.ListRequest.OrderByEnum.Updated; Events googleEvents = request.Execute(); foreach (var unsynchronizedEvent in unsynchronizedEvents) { if (unsynchronizedEvent.GoogleEventID != null) { if (googleEvents.Items.FirstOrDefault(x => x.Id == unsynchronizedEvent.GoogleEventID) == null) { UploadEvent(unsynchronizedEvent.ID, unsynchronizedEvent.GoogleEventID, unsynchronizedEvent.Summary, unsynchronizedEvent.Description, unsynchronizedEvent.StartDate, unsynchronizedEvent.EndDate, ezkoController); } else { UpdateEvent(unsynchronizedEvent.ID, unsynchronizedEvent.GoogleEventID, unsynchronizedEvent.Summary, unsynchronizedEvent.Description, unsynchronizedEvent.StartDate, unsynchronizedEvent.EndDate, unsynchronizedEvent.IsDeleted, ezkoController); } } else { } } } catch (Exception ex) { BasicMessagesHandler.LogException(ex); result = false; } return(result); }
public EventBillingForm(CalendarEvent calendarEvent, ICollection <DatabaseCommunicator.Model.Action> executedActions) { InitializeComponent(); countUpDown.Minimum = 1; countUpDown.Maximum = int.MaxValue; priceUpDown.Maximum = decimal.MaxValue; discountUpDown.Maximum = decimal.MaxValue; this.executedActions = executedActions; this.calendarEvent = calendarEvent; ezkoController = GlobalSettings.EzkoController; InitializeGrid(); FillGrid(); }
/// <summary> /// Creates provided calendar event in Google calendar /// </summary> /// <returns>Value indicating whether the creation of google calendar event was successfull</returns> public bool UploadEvent(CalendarItem newEvent, EzkoController ezkoController) { if (!CheckForInternetConnection()) { return(false); } bool result = true; try { if (!newEvent.IsDeleted) { Event calendarEvent = new Event(); calendarEvent.Id = newEvent.GoogleEventID; calendarEvent.Summary = newEvent.Text; //calendarEvent.Location = "Mytna 36, Bratislava, Slovensko"; calendarEvent.Description = newEvent.Description; DateTime startDateTime = newEvent.StartDate; EventDateTime start = new EventDateTime(); start.DateTime = startDateTime; //start.TimeZone = "Europe/Prague"; calendarEvent.Start = start; DateTime endDateTime = newEvent.EndDate; EventDateTime end = new EventDateTime(); end.DateTime = endDateTime; //end.TimeZone = "Europe/Prague"; calendarEvent.End = end; service.Events.Insert(calendarEvent, calendarID).Execute(); } } catch (Exception e) { result = false; BasicMessagesHandler.ShowErrorMessage("Nepodarilo sa vytvoriť Google event", e); } if (result) { result = ezkoController.SetIsSynchronizedStatus(newEvent.DatabaseEntityID, true); } return(result); }
/// <summary> /// Updates/deletes existing Google Calendar event /// </summary> /// <returns>Returs value indicating wheter the update/delete was successfull</returns> public bool UpdateEvent(CalendarItem updatedItem, EzkoController ezkoController) { if (!CheckForInternetConnection()) { return(false); } bool result = true; if (updatedItem == null) { return(result); } try { Event googleEvent = service.Events.Get(calendarID, updatedItem.GoogleEventID).Execute(); if (updatedItem.IsDeleted) { service.Events.Delete(calendarID, googleEvent.Id).Execute(); } else { googleEvent.Summary = updatedItem.Text; googleEvent.Description = updatedItem.Description; googleEvent.Start.DateTime = updatedItem.StartDate; googleEvent.End.DateTime = updatedItem.EndDate; service.Events.Update(googleEvent, calendarID, googleEvent.Id).Execute(); } } catch (Exception e) { result = false; BasicMessagesHandler.LogException(e); } if (result) { result = ezkoController.SetIsSynchronizedStatus(updatedItem.DatabaseEntityID, true); } return(result); }
public EditFormularForm() { InitializeComponent(); try { toolTip.InitialDelay = 100; fieldsLabelText = "Všetky sekcie"; ezkoController = GlobalSettings.EzkoController; workingType = WorkingTypeEnum.Creating; InitializeSectionsTextBox(); InitializeDataGridViews(); formEditor.SetEditFormularForm(this); } catch (Exception ex) { BasicMessagesHandler.ShowErrorMessage("Počas inicializácie okna pre editáciu formulárov sa vyskytla chyba", ex); } }
public EditFormularForm(DatabaseCommunicator.Model.Form formular) { InitializeComponent(); try { workingType = WorkingTypeEnum.Editing; ezkoController = GlobalSettings.EzkoController; this.formular = formular; addButton.Text = "Upraviť formulár"; fieldsLabelText = "Všetky sekcie"; InitializeSectionsTextBox(); InitializeFormular(); InitializeDataGridViews(); } catch (Exception ex) { BasicMessagesHandler.ShowErrorMessage("Počas inicializácie okna pre editáciu formulárov sa vyskytla chyba", ex); } }
//private GoogleCalendarSynchronizer.GoogleCalendarSynchronizer calendarSynchronizer; public AmbulantionUserControl(GoogleCalendarSynchronizer.GoogleCalendarSynchronizer calendarSynchronizer) { InitializeComponent(); monthView.MonthTitleColor = monthView.MonthTitleColorInactive = CalendarColorTable.FromHex("#C2DAFC"); monthView.ArrowsColor = CalendarColorTable.FromHex("#77A1D3"); monthView.DaySelectedBackgroundColor = CalendarColorTable.FromHex("#F4CC52"); monthView.DaySelectedTextColor = monthView.ForeColor; DateTime now = DateTime.Now; monthView.EventsDurationByDate = new Dictionary <DateTime, int>(); ezkoController = GlobalSettings.EzkoController; visitUserControl.SetEzkoController(ezkoController); visitUserControl.SetAmbulantionControl(this); visitUserControl.SetCalendarSynchronizer(calendarSynchronizer); filterEventUserControl.SetEzkoController(ezkoController); filterEventUserControl.SetAmbulantionContorlPanel(this); filterEventUserControl.SetTitleLabel(monthView.SelectionStart, monthView.SelectionEnd); }
/// <summary> /// Gets the calendar events from database between provided dates in form of Calendar items /// </summary> /// <returns>List of calendar items</returns> public List <CalendarItem> GetDbCalendarItems(EzkoController ezkoController, DateTime startDate, DateTime endDate) { List <CalendarItem> result = new List <CalendarItem>(); try { foreach (var eventItem in ezkoController.GetEvents().Where(x => x.StartDate >= startDate && x.EndDate <= endDate && x.IsSynchronized)) { var resultItem = new CalendarItem(calendar, eventItem.StartDate, eventItem.EndDate, eventItem.Summary, eventItem.Description, eventItem.IsDeleted); resultItem.GoogleEventID = eventItem.GoogleEventID; resultItem.DatabaseEntityID = eventItem.ID; result.Add(resultItem); } } catch (Exception e) { BasicMessagesHandler.ShowErrorMessage("Nepodarilo sa načítať udalosti z Google kalendára", e); result = new List <CalendarItem>(); } return(result); }