示例#1
0
        public EditSectionForm()
        {
            InitializeComponent();

            ezkoController = GlobalSettings.EzkoController;
            workingType    = WorkingTypeEnum.Creating;
        }
示例#2
0
        public EditInfrastructureForm()
        {
            InitializeComponent();

            ezkoController   = GlobalSettings.EzkoController;
            this.workingType = WorkingTypeEnum.Creating;
        }
示例#3
0
        public NewPatientForm()
        {
            InitializeComponent();

            ezkoController = GlobalSettings.EzkoController;
            InitializeInsuranceCompaniesComboBox();
        }
示例#4
0
        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();
        }
示例#5
0
        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);
            }
        }
示例#6
0
        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();
        }
示例#7
0
        //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;
        }
示例#8
0
文件: EzkoForm.cs 项目: xmatakt/DP
        //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;
        }
示例#10
0
        public EditUserForm()
        {
            InitializeComponent();

            ezkoController   = GlobalSettings.EzkoController;
            this.workingType = WorkingTypeEnum.Creating;
            InitializeForm();
        }
示例#11
0
        public UsersControlPanel()
        {
            InitializeComponent();

            ezkoController = GlobalSettings.EzkoController;
            InitializeDataGridView();
            FillDataGridView();
        }
示例#12
0
        public PatientsUserControl()
        {
            InitializeComponent();

            exportMenuItem.Visible = false;
            importMenuItem.Visible = false;
            ezkoController         = GlobalSettings.EzkoController;
            InitializeDataGridView();
            FillDataGridView(ezkoController.GetPatients());
        }
示例#13
0
        public AdministrationUserControl()
        {
            InitializeComponent();

            ezkoController = GlobalSettings.EzkoController;

            userControlPanel = new UsersControlPanel();
            mainPanel.Controls.Add(userControlPanel);
            userControlPanel.Dock = DockStyle.Fill;
        }
示例#14
0
        public EditFieldForm()
        {
            InitializeComponent();

            ezkoController         = GlobalSettings.EzkoController;
            workingType            = WorkingTypeEnum.Creating;
            recreateButton.Visible = false;

            InitializeForm();
        }
示例#15
0
        public EditUserForm(User user)
        {
            InitializeComponent();
            ezkoController = GlobalSettings.EzkoController;
            this.user      = user;
            workingType    = WorkingTypeEnum.Editing;
            addButton.Text = "Upraviť používateľa";

            InitializeForm();
        }
示例#16
0
        public EditFieldForm(Field field)
        {
            InitializeComponent();

            workingType    = WorkingTypeEnum.Editing;
            ezkoController = GlobalSettings.EzkoController;
            this.field     = field;
            addButton.Text = "Uložiť zmeny v poli";

            InitializeForm();
        }
示例#17
0
        public EditActionForm(DatabaseCommunicator.Model.Action action)
        {
            InitializeComponent();

            workingType    = WorkingTypeEnum.Editing;
            ezkoController = GlobalSettings.EzkoController;
            this.action    = action;
            addButton.Text = "Upraviť výkon";

            InitializeForm();
        }
示例#18
0
        public EditSectionForm(Section section)
        {
            InitializeComponent();

            workingType    = WorkingTypeEnum.Editing;
            ezkoController = GlobalSettings.EzkoController;
            this.section   = section;
            addButton.Text = "Upraviť sekciu EZKO";

            InitializeForm();
        }
示例#19
0
        public EditInfrastructureForm(Infrastructure infrastructure)
        {
            InitializeComponent();

            workingType         = WorkingTypeEnum.Editing;
            ezkoController      = GlobalSettings.EzkoController;
            this.infrastructure = infrastructure;
            addButton.Text      = "Upraviť infraštruktúru";

            InitializeForm();
        }
示例#20
0
        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;
        }
示例#21
0
        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);
        }
示例#22
0
文件: LoginForm.cs 项目: xmatakt/DP
        public LoginForm(EzkoController ezkoController)
        {
            InitializeComponent();
            this.ezkoController = ezkoController;

#if DEBUG
            userNameTextBox.Text = "doktor";
            passwordTextBox.Text = "123";
            passwordTextBox.Focus();
#else
            userNameTextBox.Focus();
#endif
        }
示例#23
0
        /// <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);
        }
示例#24
0
        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();
        }
示例#25
0
        /// <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);
        }
示例#26
0
        /// <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);
        }
示例#27
0
        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);
            }
        }
示例#28
0
        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);
            }
        }
示例#29
0
        //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);
        }
示例#30
0
        /// <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);
        }