コード例 #1
0
        public CashRegisterWindow(Model.User userLoggedIn, Model.Statement statement, Model.Patient patient)
		{
			this.InitializeComponent();

            FillPatients();

            _userLoggedIn = userLoggedIn;
            _statement = statement;
            _selectedPatient = patient;
            _isStatement = _statement != null;

            if (_statement != null)
            {
                this.Title = "Abonar/Liquidar estado de cuenta";
                lblAccountStatusNumber.ToolTip = lblAccountStatusNumber.Content = _statement.StatementId.ToString();
                gbAccountStatusNumber.Visibility = System.Windows.Visibility.Visible;
                btnClearForm.Visibility = System.Windows.Visibility.Hidden;
                cbPatients.IsEnabled = false;
                FillTreatments();
                FillPayments();

                SelectPatient();
            }
            else
            {
                gbAccountStatusNumber.Header = "Estado de cuenta activo";
            }

            UpdateTotals();
        }
コード例 #2
0
        public AddInstrumentTreatmentsModal(Model.Instrument instrument)
        {
            this.InitializeComponent();

            _instrument = instrument;
            FillTreatments();
        }
コード例 #3
0
ファイル: Tests.cs プロジェクト: cubeme/safety-sharp
		public void Initialize()
		{
			var lightBarrier1 = new LightBarrier(position: 200);
			var lightBarrier2 = new LightBarrier(position: 400);

			var detectorLeft = new OverheadDetector(Lane.Left, position: 400);
			var detectorRight = new OverheadDetector(Lane.Right, position: 400);
			var detectorFinal = new OverheadDetector(Lane.Left, position: 600);

			var trafficLights = new TrafficLights();

			var preControl = new OriginalPreControl(lightBarrier1);
			var mainControl = new OriginalMainControl(lightBarrier2, detectorLeft, detectorRight, timeout: 30);
			var endControl = new OriginalEndControl(detectorFinal, timeout: 10);

			var vehicle1 = new Vehicle(VehicleKind.OverheightTruck);
			var vehicle2 = new Vehicle(VehicleKind.Truck);
			var vehicle3 = new Vehicle(VehicleKind.OverheightTruck);

			var heightControl = new HeightControl(preControl, mainControl, endControl, trafficLights);
			var vehicles = new VehicleCollection(vehicle1, vehicle2, vehicle3);

			_model = new Model();
			_model.AddRootComponents(heightControl, vehicles);

			Bind(vehicles, lightBarrier1);
			Bind(vehicles, lightBarrier2);
			Bind(vehicles, detectorLeft);
			Bind(vehicles, detectorRight);
			Bind(vehicles, detectorFinal);

			_model.Bind(vehicles.RequiredPorts.IsTunnelClosed = trafficLights.ProvidedPorts.IsRed);
		}
コード例 #4
0
        public ChangeCleanedActionModal(Model.CleanedMaterial cleanedMaterialToUpdate, CleaningType cleaningTypeToUpdate, Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _userLoggedIn = userLoggedIn;
            _cleanedMaterialToUpdate = cleanedMaterialToUpdate;
            txtDate.ToolTip = txtDate.Text = DateTime.Now.ToString("dd/MMMM/yyyy");

            _cleaningTypeToUpdate = cleaningTypeToUpdate;

            switch (_cleaningTypeToUpdate)
            {
                case CleaningType.CLEANED:
                    this.Title += "Lavado";
                    break;
                case CleaningType.PACKAGED:
                    this.Title += "Empaquetado";
                    break;
                case CleaningType.STERILIZED:
                    this.Title += "Esterilizado";
                    txtGroup.ToolTip = txtGroup.Text = GetNextGroupLetter();
                    break;
                default:
                    break;
            }
		}
コード例 #5
0
        public MainWindow(Model.User userLoggedIn)
        {
            CheckGlobalConfigurations();

            this.InitializeComponent();

            _userLoggedIn = userLoggedIn;
            HideButtonsForNonAdminUsers();
            lblLoggedIn.ToolTip = lblLoggedIn.Content = _userLoggedIn.FirstName + " " + _userLoggedIn.LastName;
            lblLoggedIn.FontWeight = _userLoggedIn.IsAdmin ? FontWeights.Bold : lblLoggedIn.FontWeight;

            RefreshMedicinesStackPanel();
            RefreshDotationsStackPanel();

            _checkExpiredStatementsThread = new Thread(CheckExpiredStatements);
            _checkExpiredStatementsThread.SetApartmentState(ApartmentState.STA);
            _checkExpiredStatementsThread.IsBackground = true;
            _checkExpiredStatementsThread.Start();

            _checkFinishedEventsThread = new Thread(CheckFinishedEvents);
            _checkFinishedEventsThread.SetApartmentState(ApartmentState.STA);
            _checkFinishedEventsThread.IsBackground = true;
            _checkFinishedEventsThread.Start();

            _checkRemindersThread = new Thread(RefreshReminders);
            _checkRemindersThread.SetApartmentState(ApartmentState.STA);
            _checkRemindersThread.IsBackground = true;
            _checkRemindersThread.Start();
        }
コード例 #6
0
        public ManageTreatmentPricesWindow(Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _userLoggedIn = userLoggedIn;
            dtudSelectedYear.Value = DateTime.Now;
            UpdateAllGrid();
        }
コード例 #7
0
        public DrawerControl(Model.Drawer selectedDrawer, Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _selectedDrawer = selectedDrawer;
            _userLoggedIn = userLoggedIn;

            FillDrawerInformation();
		}
コード例 #8
0
        public FinishedEventsControl(Model.Event eventToRender, Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _userLoggedIn = userLoggedIn;
            _eventToRender = eventToRender;
            _schedulerEvent = new WpfScheduler.Event() { EventInfo = _eventToRender };

            LoadEventInfo();
		}
コード例 #9
0
        public ViewPaymentFolioDetailWindow(Model.PaymentFolio folio, Model.User userLoggedIn)
        {
            this.InitializeComponent();

            _folio = folio;
            _userLoggedIn = userLoggedIn;

            lblPatientName.ToolTip = lblPatientName.Content = string.Format("(Exp. No. {0}) {1} {2}", _folio.Patient.AssignedId, _folio.Patient.FirstName, _folio.Patient.LastName);
            lblFolioNumber.ToolTip = lblFolioNumber.Content = _folio.FolioNumber.ToString();

            UpdateFolioInfo();
        }
コード例 #10
0
        public AddEditBudgetDetailsModal(Model.BudgetDetail budgetDetailToUpdate)
		{
			this.InitializeComponent();

            _budgetDetailToUpdate = budgetDetailToUpdate;
            _isUpdateBudgetDetial = _budgetDetailToUpdate.BudgetDetailId != -1;
            FillTreatments();

            if (_isUpdateBudgetDetial)
            {
                PrepareWindowForUpdates();
            }
		}
        public AddEditInitialDentalNoteWindow(Model.Patient patientToUpdate)
		{
			this.InitializeComponent();

            FillTreatments();
            AddEmptyItemToComboBoxes();

            _patientToUpdate = patientToUpdate;
            _isUpdateDentalInitialNote = patientToUpdate != null;

            if (_isUpdateDentalInitialNote)
                PrepareWindowForUpdates();
		}
コード例 #12
0
        public ViewStatementWindow(Model.Statement statement, Model.User userLoggedIn)
        {
            this.InitializeComponent();

            _statement = statement;
            _userLoggedIn = userLoggedIn;

            lblPatientName.ToolTip = lblPatientName.Content = string.Format("(Exp. No. {0}) {1} {2}", _statement.Patient.AssignedId, _statement.Patient.FirstName, _statement.Patient.LastName);
            lblAccountStatusNumber.ToolTip = lblAccountStatusNumber.Content = _statement.StatementId.ToString();

            UpdateStatementInfo();
            LoadPatientPicture();
        }
コード例 #13
0
        public AddEventModal(WpfScheduler.Scheduler scheduler, DateTime eventStart, Model.User userLoggedIn)
		{
			this.InitializeComponent();

            _scheduler = scheduler;
            _eventStart = eventStart;
            _userLoggedIn = userLoggedIn;

            this.Title = "Agendar cita (" + eventStart.ToString("D") + ")";
            lblEventStartTime.ToolTip = lblEventStartTime.Text = eventStart.ToString("HH:mm") + " hrs";

            FillPatients();
            FillTreatments();
		}
コード例 #14
0
        public AddEditOutgoingInvoicesModal(Model.OutgoingInvoice invoiceToUpdate)
		{
			this.InitializeComponent();

            _invoiceToUpdate = invoiceToUpdate;
            _isUpdateInvoice = invoiceToUpdate != null;
            dtpPaidDate.SelectedDate = dtpInvoiceDate.SelectedDate = DateTime.Now;
            FillPatients();

            if (_isUpdateInvoice)
            {
                PrepareWindowForUpdates();
            }
        }
コード例 #15
0
        public AddEditReceivedInvoicesModal(Model.ReceivedInvoice invoiceToUpdate)
		{
			this.InitializeComponent();

            _invoiceToUpdate = invoiceToUpdate;
            _isUpdateInvoice = invoiceToUpdate != null;
            dtpPurchaseDate.SelectedDate = dtpInvoiceDate.SelectedDate = DateTime.Now;
            dtpInvoiceDate.SelectedDate = null;
            FillProviderComboBox();

            if (_isUpdateInvoice)
            {
                PrepareWindowForUpdates();
            }
        }
コード例 #16
0
        public AgendaWindow(Model.User userLoggedIn)
        {
            InitializeComponent();

            InitializeEventStatusFilters();

            _userLoggedIn = userLoggedIn;
            scheduler.UserLoggedIn = _userLoggedIn;
            lblLoggedIn.ToolTip = lblLoggedIn.Content = _userLoggedIn.FirstName + " " + _userLoggedIn.LastName;
            lblLoggedIn.FontWeight = _userLoggedIn.IsAdmin ? FontWeights.Bold : lblLoggedIn.FontWeight;

            calendar.SelectedDate = DateTime.Now;

            SetSchedulerColors();
        }
コード例 #17
0
        public AddEditTreatmentPaymentModal(Model.TreatmentPayment treatment, TreatmentPriceControl treatmentControl)
		{
			this.InitializeComponent();

            cbDiscount.SelectedIndex = 0;
            _treatmentControl = treatmentControl;
            _treatment = treatment;
            _isUpdateTreatment = _treatment != null;
            
            if (_isUpdateTreatment)
            {
                PrepareWindowForUpdates();
                UpdateTotalFieldChanged();
            }
		}
コード例 #18
0
        public AddEditLaboratoryWorksModal(Model.LaboratoryWork laboratoryWorkToUpdate)
		{
			this.InitializeComponent();

            _laboratoryWorkToUpdate = laboratoryWorkToUpdate;
            _isUpdateLaboratoryWork = laboratoryWorkToUpdate != null;
            dtpDeliveryDate.SelectedDate = DateTime.Now;
            FillPatients();
            FillTechnicals();

            if (_isUpdateLaboratoryWork)
            {
                PrepareWindowForUpdates();
            }
		}
コード例 #19
0
        public CanceledEventsSendEmailModal(List<Model.Event> canceledEventsInARow, List<Model.Event> canceledEventsOfSameTreatment, Model.Patient patient, Model.Treatment treatment)
        {
            this.InitializeComponent();

            _canceledEventsInARow = canceledEventsInARow;
            _canceledEventsOfSameTreatment = canceledEventsOfSameTreatment;
            _patient = patient;
            _treatment = treatment;

            lblEmailLogMessage.Content = string.Format("Enviando correo(s) al paciente {1} {2} (Exp. No. {0})\npor los siguientes motivos:\n", _patient.AssignedId, _patient.FirstName, _patient.LastName);
            lblEmailLogMessage.Content += _canceledEventsInARow == null 
                                                ? string.Empty 
                                                : "\n- 3 citas canceladas consecutivas.";
            lblEmailLogMessage.Content += _canceledEventsOfSameTreatment == null 
                                                ? string.Empty
                                                : string.Format("\n- 3 citas canceladas para el tratamiento de '{0}'.", _treatment.Name);
        }
コード例 #20
0
        public AddEditPaymentModal(Model.Payment paymentToUpdate, PaymentType paymentType, PaymentControl paymentControl, Model.Bank bank)
		{
			this.InitializeComponent();

            _bank = bank;
            _paymentControl = paymentControl;
            _paymentType = paymentType;
            _paymentToUpdate = paymentToUpdate;
            _isUpdatePayment = _paymentToUpdate != null;

            FillBanks();
            AdjustWindowForPaymentType();

            if (_isUpdatePayment)
            {
                PrepareWindowForUpdates();
            }

            this.Title += " (" + paymentType.ToString() + ")";
        }
コード例 #21
0
ファイル: HomeController.cs プロジェクト: renatomatos/prova
        public ActionResult MeusDados(Model.UsuarioModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    using (Web.UsuarioProxy.UsuarioServiceClient proxy = new Web.UsuarioProxy.UsuarioServiceClient())
                    {
                        proxy.Update(model);
                    }

                    return RedirectToAction("Index");
                }
            }
            catch (Exception ex)
            {
                Utils.HelperLog.WriteText(ex, "HomeController.MeusDados[POST]");
            }
            return View(model);
        }
コード例 #22
0
 private void FillRectangleColor(Xceed.Wpf.Toolkit.ColorPicker cpEvents, Model.Configuration eventColor)
 {
     if (eventColor != null)
     {
         cpEvents.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(eventColor.Value));
     }
 }
コード例 #23
0
 private void AddInvoice(Model.OutgoingInvoice invoiceToAdd)
 {
     if (Controllers.BusinessController.Instance.Add<Model.OutgoingInvoice>(invoiceToAdd))
     {
         this.Close();
     }
     else
     {
         MessageBox.Show("No se pudo agregar la factura", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #24
0
 private void UpdateInvoice(Model.OutgoingInvoice invoiceToUpdate)
 {
     if (Controllers.BusinessController.Instance.Update<Model.OutgoingInvoice>(invoiceToUpdate))
     {
         this.Close();
     }
     else
     {
         MessageBox.Show("No se pudo actualizar la factura", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #25
0
        private bool AreValidFields(string amountText, Model.Bank bank, string voucherCheckNumber, out decimal amount)
        {
            amount = 0;

            if (decimal.TryParse(amountText, out amount) == false)
	        {
		        MessageBox.Show("Cantidad inválida", "Información", MessageBoxButton.OK, MessageBoxImage.Information);
                return false;
	        }
            else if (amount <= 0m)
            {
                MessageBox.Show("La cantidad debe ser mayor a 0", "Información", MessageBoxButton.OK, MessageBoxImage.Information);
                return false;
            }

            if (_paymentType != PaymentType.Efectivo)
            {
                if (bank == null)
                {
                    MessageBox.Show("Seleccione un banco", "Información", MessageBoxButton.OK, MessageBoxImage.Information);
                    return false;
                }

                if (string.IsNullOrEmpty(voucherCheckNumber))
                {
                    MessageBox.Show("Ingrese un " + lblVoucherCheckNumber.Content.ToString().Replace(":", ""), "Información", MessageBoxButton.OK, MessageBoxImage.Information);
                    return false;
                }
            }

            return true;
        }
コード例 #26
0
        private IElement GetPatinetInfo(Model.Patient selectedPatient, out string gender)
        {
            var paragraph = new iTextSharp.text.Paragraph(new Chunk("NOMBRE DEL PACIENTE: ", _boldFont));
            paragraph.Add(new Chunk(selectedPatient.FullName, _font));
            gender = GetNote("Genero");

            string patientInfo = string.Format("\nPaciente {0} de {1} años de edad, acude a consulta por {2}",
                                                gender,
                                                GetNote("Edad"),
                                                GetNote("Motivo de la consulta")
                                                );

            paragraph.Add(new Chunk(patientInfo, _font));
            return paragraph;
        }
コード例 #27
0
        private iTextSharp.text.Paragraph GetNotaInicialDentalPdfContent(Model.Patient selectedPatient)
        {
            string gender = string.Empty;
            var paragraph = new iTextSharp.text.Paragraph("");

            paragraph.Add(GetTitle());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetPatinetInfo(selectedPatient, out gender));
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetAntecedentesHeredofamiliares());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetAntecedentesPersonalesNoPatologicos());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetAntecedentesGinecoObstetricos(gender));
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetAntecedentesPersonalesPatologicos());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetAntecedentesPadecimientoActual());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetExploracionFisica());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetMusculosPalpacion());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetExploracionFisica2());
            paragraph.Add(GetFluorosis());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetMaloclusiones());
            paragraph.Add(GetRetencionesDentarias());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetTratamientos());
            paragraph.Add(new iTextSharp.text.Paragraph(" "));
            paragraph.Add(GetFirma());

            return paragraph;
        }
コード例 #28
0
        private void ExportToPdf(string path, Model.Patient selectedPatient)
        {
            _initialDentalNote = BusinessController.Instance.FindBy<Model.InitialDentalNote>(p => p.PatientId == selectedPatient.PatientId).ToList();

            iTextSharp.text.Paragraph pdfContent = GetNotaInicialDentalPdfContent(selectedPatient); 

            //Create the PDF Document
            using (Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 10f))
            {
                using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None))
                {
                    using (var writer = PdfWriter.GetInstance(pdfDoc, fs))
                    {
                        pdfDoc.Open();

                        //byte[] pngByteArrayImage = MainWindow.ImageToByteArray("pack://application:,,,/MyDentApplication;component/Images/Budget_image_1.PNG");
                        //iTextSharp.text.Image pngImage = iTextSharp.text.Image.GetInstance(pngByteArrayImage);
                        //pngImage.ScalePercent(80f);
                        //pngImage.SetAbsolutePosition(10f, pdfDoc.PageSize.Height - 90f);
                        //pdfDoc.Add(pngImage);

                        pdfDoc.Add(pdfContent);

                        pdfDoc.Close();
                    }
                }
            }
        }
コード例 #29
0
        public static Model.Event OverlappedWithExistingEvent(Model.Event eventToAdd, List<WpfScheduler.Event> events)
        {
            events = events.Where(e => e.EventInfo.IsCanceled == false && e.EventInfo.PatientSkips == false)
                            .OrderBy(e => e.EventInfo.StartEvent)
                            .ToList();

            foreach (WpfScheduler.Event e in events)
            {
                if (Utils.IsOverlappedTime(eventToAdd.StartEvent, eventToAdd.EndEvent, e.EventInfo.StartEvent, e.EventInfo.EndEvent))
                {
                    return e.EventInfo;
                }
            }

            return null;
        }
コード例 #30
0
 private void UpdateLaboratoryWork(Model.LaboratoryWork laboratoryWorkToUpdate)
 {
     if (Controllers.BusinessController.Instance.Update<Model.LaboratoryWork>(laboratoryWorkToUpdate))
     {
         this.Close();
     }
     else
     {
         MessageBox.Show("No se pudo actualizar el trabajo de laboratorio", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }