private void listRep_Tapped(object sender, TappedRoutedEventArgs e) { if (listRep.SelectedItem == null) { return; } Data.iCode ic = listRep.SelectedItem as Data.iCode; string url = String.Format(ic.Value, iCommon.Patient.IllcaseNo); this.repViewer.Navigate(new Uri(url)); }
void AddAdvice() { Data.PadAdvice padAdvice = new Data.PadAdvice(); padAdvice.PAID = Guid.NewGuid().ToString(); padAdvice.DeviceID = CJia.iSmartMedical.iCommon.DeviceID; padAdvice.InhosID = iCommon.Patient.InhosID; padAdvice.PatientName = iCommon.Patient.PatientName; padAdvice.DoctorID = CJia.iSmartMedical.iCommon.DoctorID; padAdvice.DoctorName = CJia.iSmartMedical.iCommon.DoctorName; Data.iCode AdviceType = txtAdviceType.Tag as Data.iCode; padAdvice.AdviceTypeCode = AdviceType.Code; padAdvice.AdviceTypeName = AdviceType.Name; Data.iCode StandingFlag = this.txtStandingFlag.Tag as Data.iCode; padAdvice.StandingTypeCode = StandingFlag.Code; padAdvice.StandingTypeName = StandingFlag.Name; Data.iAdvice Advice = this.txtAdviceName.Tag as Data.iAdvice; padAdvice.AdviceID = Advice.AID; padAdvice.HiSAdviceID = Advice.AdviceID; padAdvice.AdviceName = Advice.AdviceName; padAdvice.CommonName = Advice.CommonName; padAdvice.Spec = Advice.Spec; padAdvice.GroupIndex = GroupIndex; padAdvice.Dosage = txtDosage.Text.Trim(); padAdvice.DosageUnit = Advice.Unit; padAdvice.Amount = "1"; padAdvice.AmountUnit = Advice.Unit; Data.iUsage iu = txtUsage.Tag as Data.iUsage; if (iu != null) { padAdvice.UsageID = iu.UsageID; padAdvice.UsageName = iu.UsageName; } Data.iFrequency iq = txtFrequence.Tag as Data.iFrequency; if (iq != null) { padAdvice.FrequenceID = iq.FrequencyID; padAdvice.FrequenceName = iq.FrequencyName; } padAdvice.PreStartDate = ""; padAdvice.PreStopDate = ""; padAdvice.Notes = txtNotes.Text.Trim(); padAdvice.AdviceShowName = padAdvice.AdviceName + " (" + padAdvice.Spec + ") " + padAdvice.Dosage + padAdvice.DosageUnit; padAdvice.CreateDate = CJia.iSmartMedical.iCommon.DateNow; padAdvice.Status = "有效"; padAdvice.SyncStatus = "未同步"; padAdvice.SyncDate = ""; AdviceList.Add(padAdvice); listNewAdvice.ItemsSource = AdviceList; ClearAdvice(); txtAdviceName.Focus(FocusState.Programmatic); }
bool IsInputRight() { if (txtStandingFlag.Tag == null) { this.SetCurrentInput(0); return(false); } if (this.txtAdviceType.Tag == null) { this.SetCurrentInput(1); return(false); } if (this.txtAdviceName.Tag == null) { this.SetCurrentInput(2); return(false); } Data.iCode AdvictType = txtAdviceType.Tag as Data.iCode; if (AdvictType.Code == "901001" || AdvictType.Code == "901003") { if (txtDosage.Text.Trim().Length == 0) { this.SetCurrentInput(3); return(false); } else if (txtUsage.Tag == null) { this.SetCurrentInput(4); return(false); } else if (this.txtFrequence.Tag == null) { this.SetCurrentInput(5); return(false); } } return(true); }