Example #1
0
        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();
            }
        }
Example #2
0
        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();
            }
        }