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(); }
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()); } }