/// <summary> /// 二次手術呼叫表單 /// </summary> /// <param name="inCaseuuid">病例識別碼</param> /// <param name="inParentPostUuid">父項術後識別碼</param> public PreOperativeMainForm(string inCaseuuid, string inParentPostUuid) { //從 PreOperativeMainForm(string inCaseuuid) 複製 InitializeComponent(); firstLaunch = false; DBPostOperativeData parentPost = new DBPostOperativeData(inParentPostUuid); theOperativeCase = new DBOperativeCase(inCaseuuid); tmpopCase = new DBOperativeCase(inCaseuuid); if (theOperativeCase.caseuuid != "") { formDataType = FormDataType.FormDataTypeIsEdit; selectedPatientuuid = theOperativeCase.patuuid; selectedBookedsurgeonuuid = theOperativeCase.bookedsurgeonuuid; } else { //從父項術後找出原病人術後 formDataType = FormDataType.FormDataTypeIsAdd; DBOperativeCase parentCase = new DBOperativeCase(parentPost.caseuuid); selectedPatientuuid = parentCase.patuuid; doSelectedPatient(selectedPatientuuid); theOperativeCase.parentpostopuuid = inParentPostUuid; tmpopCase.parentpostopuuid = inParentPostUuid; } theODPreOperativeData = new DBPreOperativeData(inCaseuuid, "OD"); theOSPreOperativeData = new DBPreOperativeData(inCaseuuid, "OS"); tmpODInfo = new DBPreOperativeData(inCaseuuid, "OD"); tmpOSInfo = new DBPreOperativeData(inCaseuuid, "OS"); //從父項綁定 bindPreOperativeInfoFromParentPostUuid(inParentPostUuid); }
private void bindPreOperativeInfoFromParentPostUuid(string inParentpostopuuid) { if (formDataType != FormDataType.FormDataTypeIsAdd) { return; } DBPostOperativeData parentInfo = new DBPostOperativeData(inParentpostopuuid); tb_PreOPDate.Text = parentInfo.postdate; string anotherPart = (parentInfo.part == "OD") ? "OS" : "OD"; DBPostOperativeData anotherPostOpInfo = new DBPostOperativeData(parentInfo.caseuuid, anotherPart, parentInfo.postdate); bindPreOperativeInfoFromParentPostObj(parentInfo); bindPreOperativeInfoFromParentPostObj(anotherPostOpInfo); }
private void bindPreOperativeInfoFromParentPostObj(DBPostOperativeData obj) { if (obj.part == "OD") { tbOD_Spherical.Text = obj.sphere.EMDoubleToString(); tbOD_Cylinder.Text = obj.cylinder.EMDoubleToString(); tbOD_PreAxis.Text = obj.axis.EMDoubleToString(); tbOD_UCVA.Text = obj.ucva.EMDoubleToString(); tbOD_BSCVA.Text = obj.bscva.EMDoubleToString(); tbOD_QValue.Text = obj.qvalue.EMDoubleToString(); } else if (obj.part == "OS") { tbOS_Spherical.Text = obj.sphere.EMDoubleToString(); tbOS_Cylinder.Text = obj.cylinder.EMDoubleToString(); tbOS_PreAxis.Text = obj.axis.EMDoubleToString(); tbOS_UCVA.Text = obj.ucva.EMDoubleToString(); tbOS_BSCVA.Text = obj.bscva.EMDoubleToString(); tbOS_QValue.Text = obj.qvalue.EMDoubleToString(); } }