示例#1
0
 private void changeEndDate()
 {
     Model.InstructionsForHospitalTreatment instruction = (Model.InstructionsForHospitalTreatment)HospitalTreatment.lvDataBinding.SelectedItem;
     instruction.setEndDate(DateTime.Parse(dpEndDate.Text));
     Controller.InstructionsForHospitalTreatmentController InstructionsController = new Controller.InstructionsForHospitalTreatmentController();
     InstructionsController.UpdateInstructionsForHospitalTreatment(instruction);
 }
 private void AddInstructionForHospitalTreatment()
 {
     Controller.InstructionsForHospitalTreatmentController instructionsController = new Controller.InstructionsForHospitalTreatmentController();
     instructionsController.GetAllInstructionsForHospitalTreatment();
     Model.InstructionsForHospitalTreatment instructionsTreatment = new Model.InstructionsForHospitalTreatment(instructionsController.getNextId(),
                                                                                                               lbPatient.Content.ToString(), int.Parse(cbRoom.SelectedItem.ToString()),
                                                                                                               int.Parse(cbBed.SelectedItem.ToString()), DateTime.Parse(dtStart.Text), DateTime.Parse(dtEnd.Text));
     instructionsController.CreateInstructionsForHospitalTreatment(instructionsTreatment);
     ReserveBed();
 }
示例#3
0
        public void LoadInstructionsForHospitalTreatment()
        {
            lvDataBinding.Items.Clear();
            Controller.InstructionsForHospitalTreatmentController instructionsController = new Controller.InstructionsForHospitalTreatmentController();
            Console.WriteLine("vamo");
            List <Model.InstructionsForHospitalTreatment> instructions = instructionsController.GetAllInstructionsForHospitalTreatment();

            Console.WriteLine("ovde");
            foreach (Model.InstructionsForHospitalTreatment instruction in instructions)
            {
                lvDataBinding.Items.Add(instruction);
                Console.WriteLine(instruction.getBed());
            }
        }