private void lvTPNItems_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if ((null == lbOrders.SelectedItem) || (null == lvTPNItems.SelectedItem)) { return; } recipemonitorlist.TPNItemModel item = (recipemonitorlist.TPNItemModel)lvTPNItems.SelectedItem; if ("_EXPAND_".Equals(item.Code)) { this.tpnView.showTPN(true); } else if ("_COLLAPSED_".Equals(item.Code)) { this.tpnView.showTPN(false); } else if (!string.IsNullOrWhiteSpace(item.Code) && (0 < item.ID)) { OrdersModel ord = (OrdersModel)lbOrders.SelectedItem; tpnmonitor.frmCalDetail frmDetail = new tpnmonitor.frmCalDetail(); frmDetail.init(AppConst.db, ord.RecipeID, item.Code); frmDetail.ShowDialog(); } }
private void lvTPNItems_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (null == lvTPNItems.SelectedItem) { return; } TPNItemModel item = (TPNItemModel)lvTPNItems.SelectedItem; if ("_EXPAND_".Equals(item.Code)) { this.tpnView.showTPN(true); } else if ("_COLLAPSED_".Equals(item.Code)) { this.tpnView.showTPN(false); } else if (!string.IsNullOrWhiteSpace(item.Code) && (0 < item.ID)) { if (null == grdOrders.SelectedItem) { return; } DataRowView drv = (DataRowView)grdOrders.SelectedItem; string rcpID = drv.Row["RecipeID"].ToString(); tpnmonitor.frmCalDetail frmDetail = new tpnmonitor.frmCalDetail(); frmDetail.init(this.db, rcpID, item.Code); frmDetail.ShowDialog(); } }
private void btnMock_Click(object sender, RoutedEventArgs e) { if (null == lbOrders.SelectedItem) { BLPublic.Dialogs.Alert("请选择医嘱."); lbOrders.Focus(); return; } OrdersModel ord = (OrdersModel)lbOrders.SelectedItem; tpnmonitor.frmCalDetail frmDetail = new tpnmonitor.frmCalDetail(); frmDetail.initMockRecipe(AppConst.db, ord.RecipeID); frmDetail.ShowDialog(); }