private void Btn_new_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            ClinicPanel clinicPanel = ClinicPanel.getThis();

            switch (clinicPanel.actualPosition)
            {
            case PanelPosition.Appointment:
                newAppointment(false);
                break;

            case PanelPosition.Doctor:
                newDoctor(false);
                break;

            case PanelPosition.Pacient:
                newPacient(false);
                break;

            case PanelPosition.HealthPlan:
                newHealthPlan(false);
                break;

            case PanelPosition.Prescription:
                newPrescription(false);
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void Btn_save_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            Appointment appointment = new Appointment();

            using (var dE = new Model.DataModel.databaseEntities())
            {
                dE.Appointments.Add(appointment);
                dE.SaveChanges();
            }
            ClinicPanel clinicPanel = ClinicPanel.getThis();

            clinicPanel.switchLateralPanel(new ListViewPanel(1), SlidePanel.Slide.Right);
        }
        private void newPrescription(bool edit)
        {
            PrecriptionPanel prescription = new PrecriptionPanel();

            if (edit)
            {
                //TODO
            }
            else
            {
                ClinicPanel clinicPanel = ClinicPanel.getThis();
                clinicPanel.switchLateralPanel(prescription, SlidePanel.Slide.Left);
            }
        }
        private void newHealthPlan(bool edit)
        {
            HealthPanel healthPlan = new HealthPanel();

            if (edit)
            {
                //TODO
            }
            else
            {
                ClinicPanel clinicPanel = ClinicPanel.getThis();
                clinicPanel.switchLateralPanel(healthPlan, SlidePanel.Slide.Left);
            }
        }
        private void newPacient(bool edit)
        {
            PacientPanel pacientPanel = new PacientPanel();

            if (edit)
            {
                //TODO
            }
            else
            {
                ClinicPanel clinicPanel = ClinicPanel.getThis();
                clinicPanel.switchLateralPanel(pacientPanel, SlidePanel.Slide.Left);
            }
        }
        private void newDoctor(bool edit)
        {
            DoctorPanel doctorPanel = new DoctorPanel();

            if (edit)
            {
                //TODO
            }
            else
            {
                ClinicPanel clinicPanel = ClinicPanel.getThis();
                clinicPanel.switchLateralPanel(doctorPanel, SlidePanel.Slide.Left);
            }
        }
        private void newAppointment(bool edit)
        {
            AppointmentPanel appointmentPanel = new AppointmentPanel();

            if (edit)
            {
                //TODO
            }
            else
            {
                ClinicPanel clinicPanel = ClinicPanel.getThis();
                clinicPanel.switchLateralPanel(appointmentPanel, SlidePanel.Slide.Left);
            }
        }
Пример #8
0
        private void Btn_cancel_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            ClinicPanel clinicPanel = ClinicPanel.getThis();

            clinicPanel.switchLateralPanel(new ListViewPanel(1), SlidePanel.Slide.Right);
        }
Пример #9
0
 public ClinicPanel()
 {
     initializeComponent();
     clinicPanel = this;
 }