private void hyperLink_Click(object sender, RoutedEventArgs e) { var rowData = (RowData)dgMain.SelectedItem; var link = e.OriginalSource as Hyperlink; if (rowData != null && link != null) { string originalString = link.NavigateUri.OriginalString; if (originalString == "详情") { WndDetail.MyShow(rowData.NoteEntity.BuyerMainNick, rowData.NoteEntity.Recorder); } else { if (!(originalString == "删除")) { throw new Exception(); } if (MsgBox.ShowDialog("确定要删除?", "操作确认", "CtlBuyerNoteViewer.Delete", WndMgr)) { BuyerNoteHelper.Delete(rowData.NoteEntity); _searchedNotes.Remove(rowData.NoteEntity); var newPageNo = (_pageData.Count > 1) ? pager.PageNo : (pager.PageNo - 1); ShowPage(newPageNo); } } } }
public static void MyShow(string buyerMain, string seller) { new WndDetail { tboxContent = { Text = WndDetail.GetBuyerNotes(buyerMain, seller) } }.FirstShow(null, null, null, false); }
public static string GetBuyerNotes(string buyerMain, string seller) { var ets = BuyerNoteHelper.GetBuyerNotesOnlyBuyer(buyerMain, seller); return(WndDetail.GetDesc(ets)); }