public DeleteModalWindow(MedicalRecordViewModel model) { this.medicalRecordViewModel = model; InitializeComponent(); ChangeTheme(); SwitchLanguage(); }
private EditModalWindow(MedicalRecordViewModel medicalRecordViewModel) { this.medicalRecordViewModel = medicalRecordViewModel; InitializeComponent(); SwitchLanguage(); ChangeTheme(); }
public EditModal(MedicalRecordViewModel medicalRecord) { medicalRecordViewModel = medicalRecord; InitializeComponent(); WindowHelper.SetBorder(this, this.Container); InitializeComponents(); InitializeData(); }
public static async Task <EditModalWindow> Create(MedicalRecordViewModel model) { EditModalWindow modal = new EditModalWindow(model); await modal.InitializeComboBox(); await modal.InitializeData(); return(modal); }
public override void Edit(object selectedItem, double height = 0, double width = 0) { DataRowView item = (DataRowView)selectedItem; MedicalRecordViewModel model = Mapping.Mapper.Map <MedicalRecordViewModel>(item); Window editModal = new EditModal(model); WindowHelper.SetModal(editModal, height, width); editModal.ShowDialog();; }
public override void Delete(object selectedItem, double height = 0, double width = 0) { DataRowView item = (DataRowView)selectedItem; MedicalRecordViewModel model = Mapping.Mapper.Map <MedicalRecordViewModel>(item); Window deleteModal = new DeleteModal(model); WindowHelper.CenterWindow(deleteModal, height, width); deleteModal.ShowDialog(); }
public IActionResult AddRecord(MedicalRecordViewModel model) { if (ModelState.IsValid) { recordManagment.AddRecord(model); return(RedirectToAction("Index", "Appointment")); } return(View(model)); }
public override async void Edit(object selectedItem) { DataRowView item = (DataRowView)selectedItem; MedicalRecordViewModel model = Mapping.Mapper.Map <MedicalRecordViewModel>(item); EditModalWindow modalWindow = await EditModalWindow.Create(model); _ = modalWindow.ShowDialog(); DataGridControl.InformAboutStatus(modalWindow.OperationStatus); }
public IActionResult AddRecord(int appointmentID) { var appointment = appointmentManagment.GetAppointmentByID(appointmentID); var model = new MedicalRecordViewModel() { Appointment = appointment }; return(View(model)); }
public override void Delete(object selectedItem) { DataRowView item = (DataRowView)selectedItem; MedicalRecordViewModel model = Mapping.Mapper.Map <MedicalRecordViewModel>(item); DeleteModalWindow modalWindow = new DeleteModalWindow(model); _ = modalWindow.ShowDialog(); DataGridControl.InformAboutStatus(modalWindow.OperationStatus); }
public ActionResult AddRecord(string patientId, string physicianId, int?appNo) { var newrecord = new MedicalRecordViewModel() { PatientId = patientId, PhyId = physicianId, ApppointmentNo = appNo > 0 ? (int)appNo : 0 }; return(PartialView("_AddPatientRecordPartialView", newrecord)); }
public void AddRecord(MedicalRecordViewModel model) { var appo = db.Appointments.SingleOrDefault(c => c.Id == model.AppointmentID); var record = new MedicalRecord { Description = model.Description, CreatedAt = DateTime.Now, AppointmentID = appo.Id }; db.Records.Add(record); db.SaveChanges(); }
public ActionResult New_MedicalRecord(string id) { //var userid = System.Web.HttpContext.Current.User.Identity.GetUserId(); var newrecord = new MedicalRecordViewModel() { PatientId = id, //PhyId = }; return(PartialView("_AddPatientRecordPartialView", newrecord)); }
public async Task <ActionResult> ModifyPatientRecord(int recordNo) { var medicalRecord = await _patientrecordservices.GetMedicalRecord(recordNo); var medicalRecordViewModel = new MedicalRecordViewModel() { RecordNo = recordNo, PatientId = medicalRecord.Pat_Id, RecordedDate = (DateTime)medicalRecord.RecordDate, PhyId = medicalRecord.Phys_id, Desciption = medicalRecord.RecordDetails, Subject = medicalRecord.ActivityName, ApppointmentNo = medicalRecord.AppointmentNo == null?0: (int)medicalRecord.AppointmentNo }; return(PartialView("_ModifyPatientRecord", medicalRecordViewModel)); }
public ActionResult AddRecordAsync(MedicalRecordViewModel medicalrecord) { if (!ModelState.IsValid) { return(PartialView("_AddPatientRecordPartialView", medicalrecord)); } var newmedicalrecord = new MedicalRecord() { Pat_Id = medicalrecord.PatientId.Trim(), Phys_id = medicalrecord.PhyId, RecordDate = DateTime.Now, ActivityName = medicalrecord.Subject, RecordDetails = medicalrecord.Desciption, AppointmentNo = medicalrecord.ApppointmentNo }; _patientrecordservices.AddMedicalRecord(newmedicalrecord); _unitofwork.Commit(); return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); }
public ActionResult UpdateMedicalRecord(MedicalRecordViewModel medrecord) { if (!ModelState.IsValid) { return(PartialView("_ModifyPatientRecord", medrecord)); } var medicalrecord = new MedicalRecord() { RecordNo = medrecord.RecordNo, ActivityName = medrecord.Subject, Pat_Id = medrecord.PatientId, RecordDate = DateTime.Now, Phys_id = medrecord.PhyId, RecordDetails = medrecord.Desciption, AppointmentNo = medrecord.ApppointmentNo }; _patientrecordservices.UpdateMedicalRecord(medicalrecord); _unitOfWork.Commit(); return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); }
public DeleteModal(MedicalRecordViewModel medicalRecord) { medicalRecordViewModel = medicalRecord; InitializeComponent(); InitializeComponents(); }