public MessageModel SaveOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient) { MessageModel aMessageModel = new MessageModel(); aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable data = new DataTable(); data = aOutdoorPatientGatway.IsExist(aOutdoorPatient); if (data.Rows.Count > 0) { aMessageModel.MessageTitle = "Warning"; aMessageModel.MessageBody = "This patient already exist. Press the refresh button. \n Thank You."; return(aMessageModel); } string message = Ischecked(aOutdoorPatient); if (message != "Checked") { aMessageModel.MessageTitle = "Warning"; aMessageModel.MessageBody = message; return(aMessageModel); } if (aOutdoorPatientGatway.SaveOutdoorPatient(aOutdoorPatient) > 0) { //int saveCount = new IpdGateway().SavePatientServiceIPD(aOutdoorPatient.AService); aMessageModel.MessageTitle = "Successful"; aMessageModel.MessageBody = "Outdoor patient information saved successfully."; } return(aMessageModel); }
public MessageModel UpdateOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient) { MessageModel aMessageModel = new MessageModel(); aOutdoorPatientGatway = new OutdoorPatientGatway(); //DataTable data = new DataTable(); //data = aOutdoorPatientGatway.IsExist(aOutdoorPatient); //if (data.Rows.Count > 0) //{ // aMessageModel.MessageTitle = "Warning"; // aMessageModel.MessageBody = "This patient already exist. Press the refresh button. \n Thank You."; // return aMessageModel; //} string message = Ischecked(aOutdoorPatient); if (message != "Checked") { aMessageModel.MessageTitle = "Warning"; aMessageModel.MessageBody = message; return(aMessageModel); } if (aOutdoorPatientGatway.UpdateOutdoorPatient(aOutdoorPatient) > 0) { aMessageModel.MessageTitle = "Successful"; aMessageModel.MessageBody = "Outdoor patient information updated successfully."; } return(aMessageModel); }
//public DataTable GetDoctorById(DAL.Model.OutdoorPatient aOutdoorPatient) //{ // aOutdoorPatientGatway = new OutdoorPatientGatway(); // DataTable dataTable = aOutdoorPatientGatway.GetDoctorById(aOutdoorPatient); // return dataTable; //} public DataTable GeneratePatientId() { aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable data = aOutdoorPatientGatway.GeneratePatientId(); return(data); }
public DataTable PopulateGridView(DateTime fromDate, DateTime ToDate) { aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable dataTable = aOutdoorPatientGatway.PopulateGridView(fromDate, ToDate); return(dataTable); }
public DataTable GetAllDoctorsById(string DoctorId) { aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable dataTable = aOutdoorPatientGatway.GetAllDoctorsById(DoctorId); return(dataTable); }
public DataTable GetAllDoctors() { aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable dataTable = aOutdoorPatientGatway.GetAllDoctors(); return(dataTable); }
public MessageModel UpdateAdmissionPatient(Patient patient, DAL.Model.OutdoorPatient aOutdoorPatient) { aIpdGateway = new IpdGateway(); MessageModel aMessageModel = new MessageModel(); int saveCount = 0; OutdoorPatientGatway aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable data = new DataTable(); data = aOutdoorPatientGatway.IsExist(aOutdoorPatient); if (data.Rows.Count > 0) { saveCount = aIpdGateway.UpdateAdmissionPatient(patient); aMessageModel.MessageTitle = "Successfull"; aMessageModel.MessageBody = "Indoor patient information updated successfully!"; return(aMessageModel); } else { saveCount = aIpdGateway.UpdateAdmissionPatient(patient); saveCount = new OutdoorPatientGatway().UpdateOutdoorPatient(aOutdoorPatient); aMessageModel.MessageTitle = "Successfull"; aMessageModel.MessageBody = "Indoor patient information updated successfully!"; } return(aMessageModel); }
public MessageModel DeleteOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient) { aOutdoorPatientGatway = new OutdoorPatientGatway(); MessageModel aMessageModel = new MessageModel(); if (aOutdoorPatientGatway.DeleteOutdoorPatient(aOutdoorPatient) > 0) { aMessageModel.MessageTitle = "Successfull"; aMessageModel.MessageBody = "Birth info deleted successfully."; } return(aMessageModel); }
public MessageModel SaveIpdPatient(Patient patient, Service service, DAL.Model.OutdoorPatient aOutdoorPatient) { int saveCount = 0; MessageModel aMessageModel = new MessageModel(); string message = Ischecked(patient); if (message != "Checked") { aMessageModel.MessageTitle = "Warning"; aMessageModel.MessageBody = message; return(aMessageModel); } OutdoorPatientGatway aOutdoorPatientGatway = new OutdoorPatientGatway(); DataTable data = new DataTable(); data = aOutdoorPatientGatway.IsExist(aOutdoorPatient); if (data.Rows.Count > 0) { saveCount = new IpdGateway().SaveAdmissionPatient(patient); saveCount = new IpdGateway().SavePatientServiceIPD(service); if (saveCount > 0) { aMessageModel.MessageTitle = "Successful"; aMessageModel.MessageBody = "Indoor patient information saved successfully!"; } return(aMessageModel); } else { saveCount = new IpdGateway().SaveAdmissionPatient(patient); saveCount = new IpdGateway().SavePatientServiceIPD(service); saveCount = new OutdoorPatientGatway().SaveOutdoorPatient(aOutdoorPatient); if (saveCount > 0) { aMessageModel.MessageTitle = "Successful"; aMessageModel.MessageBody = "Indoor patient information saved successfully!"; } return(aMessageModel); } }