public void WhenISetTransferPatientDataInTransferPatientPage(Table table) { PatientTransferData data = table.CreateInstance <PatientTransferData>(); if (!BP_TransferPatientUtilities.SetDataToTransaferPatient(data)) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public static bool SetDataToTransaferPatient(PatientTransferData data) { try { if (!String.IsNullOrEmpty(data.ToSite)) { Control_ActionUtilities.Dropdown_SelectItem(DL_TransferPatientPage.ToSiteDropdown, data.ToSite, String.Empty); } if (!String.IsNullOrEmpty(data.Reason)) { Control_ActionUtilities.Dropdown_SelectItem(DL_TransferPatientPage.ReasonDropdown, data.Reason, String.Empty); } if (!String.IsNullOrEmpty(data.AdditionalNotes)) { Control_ActionUtilities.Textbox_SetText(DL_TransferPatientPage.AdditionalNotesTextArea, data.AdditionalNotes, String.Empty); } return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }