Exemple #1
0
        void tabControl_DataDisplay(Object sender, XDataDisplayEventArgs e)
        {
            XDataRow row = sender as XDataRow;

            if (row != null)
            {
                foreach (UserRender render in row.UserRenderList)
                {
                    if (render is DoctorOrderCard)
                    {
                        DoctorOrderCard card = render as DoctorOrderCard;

                        card.ConfigPath = "\\modules\\iihci\\ui\\commoncontent\\OrderContent.xml";
                    }
                }
            }
        }
Exemple #2
0
        private void getOrderList()
        {
            if (ordercard == null)
            {
                ordercard              = new OverViewTableCard();
                ordercard.DataDisplay += new EventHandler <XDataDisplayEventArgs>(tabControl_DataDisplay);
                ThirdCols.AddRender(ordercard);
            }

            //managecontrol.SecCols.ListItems.Add(ordercard);
            ordercard.Text = "医嘱";
            //大屏下的医嘱列表
            if (RelativeUIParam.ScreenSize == ScreenSize.Large)
            {
                ordercard.Size = new Size(ordercard.Size.Width, 859);
            }
            else
            {
                ordercard.Size = new Size(ordercard.Size.Width, 430);
            }

            List <string> fieldNameList = new List <string>();

            fieldNameList.Add("Content_or");
            List <XCellRender> columnEditList = new List <XCellRender>();
            DoctorOrderCard    card           = new DoctorOrderCard();

            columnEditList.Add(card);
            BindingList <object> valueList = new BindingList <object>();

            if (ent4BannerDto != null && ent4BannerDto.Id_ent != null)
            {
                XapDataList <CiOrderDO> listorder = this.model.GetCiOrderDataList(ent4BannerDto.Id_ent);


                foreach (CiOrderDO item in listorder)
                {
                    valueList.Add(item);
                }
            }
            //ordercard.DataView.DataTable.DataDisplay += new EventHandler<XDataDisplayEventArgs>(tabControl_DataDisplay);

            ordercard.SetData(fieldNameList, valueList, columnEditList.ToArray());
            ordercard.MouseDoubleClick += new MouseEventHandler(tableView_MouseDoubleClick);
        }
        /// <summary>
        /// 医嘱表格数据显示时的处理事件,这里主要用于处理医嘱显示内容
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tabControl_DataDisplay(Object sender, XDataDisplayEventArgs e)
        {
            CiOrderDO ciorder = e.Object as CiOrderDO;
            string    id_or   = ciorder.Id_or;

            var row = sender as XDataRow;

            if (row != null)
            {
                foreach (UserRender render in row.UserRenderList)
                {
                    if (render is DoctorOrderCard)
                    {
                        var card = render as DoctorOrderCard;
                        card.DoctorOrderConfig = this.doctorOrderConfig;
                    }
                }
            }

            // 设置最后一列显示价格
            XCellRender priceCell = (row.ColumnCellDict["customercolumn_price"] as XCellRender);

            if (priceCell.Visible == true) // 住院不可见
            {
                FDouble pri = ciOrdViewModel.PriMap[id_or] as FDouble;
                priceCell.Value = pri;
            }

            XCellRender cell = row.ColumnCellDict["customercolumn_报告查看"] as XCellRender;


            if (ciOrdViewModel.OrdStatusMap.Keys.Contains(id_or))
            {
                DoctorOrderCard contentOrCell = row.ColumnCellDict["Content_or"] as DoctorOrderCard;
                row.Enabled             = false;
                row.TooltipText         = ciOrdViewModel.OrdStatusMap[id_or] as string;
                contentOrCell.ForeColor = Color.Red;
                row.UserForeColor       = Color.Red;
            }


            this.setCellContent(cell, ciorder);
        }
Exemple #4
0
        private void getOrderList()
        {
            if (ordercard == null)
            {
                ordercard              = new OverViewTableCard();
                ordercard.DataDisplay += new EventHandler <XDataDisplayEventArgs>(tabControl_DataDisplay);
                ThirdCols.AddRender(ordercard);
            }

            ordercard.Size = new Size(355, 400);
            ordercard.Text = "医嘱";
            List <XCellRender> columnEditList = new List <XCellRender>();
            DoctorOrderCard    card           = new DoctorOrderCard();

            columnEditList.Add(card);
            ordercard.Size = new Size(450, 400);
            List <string> fieldNameList = new List <string>();

            fieldNameList.Add("Content_or");

            BindingList <object> valueList = new BindingList <object>();

            if (ent4BannerDto != null && ent4BannerDto.Id_ent != null)
            {
                XapDataList <CiOrderDO> listorder = this.model.GetCiOrderDataList(ent4BannerDto.Id_ent);

                if (listorder != null && listorder.Count > 0)
                {
                }
                foreach (CiOrderDO item in listorder)
                {
                    valueList.Add(item);
                }
            }
            //ordercard.DataView.DataTable.DataDisplay+= new EventHandler<XDataDisplayEventArgs>(tabControl_DataDisplay);

            ordercard.SetData(fieldNameList, valueList, columnEditList.ToArray());



            //if (border_or == null)
            //{
            //    border_or = new BorderControl();
            //}

            //border_or.TitleText = "处置";
            //border_or.Location = new Point(570, 10);
            //border_or.Size = new Size(650, 350);
            //XDataView tableView_order =  new XDataView();

            //tableView_order.ShowRowNumbers = true;
            //tableView_order.HeadVisible = true;
            //tableView_order.DataTable.Columns.Visible = false;
            //XDataColumn conent_or = new XDataColumn();
            //conent_or.Caption = "处置";
            //conent_or.FieldName = "Content_or";
            //conent_or.ColumnEdit = new DoctorOrderCard();
            //conent_or.DefalutWidth = 603;
            //tableView_order.DataTable.Columns.Add(conent_or);
            //tableView_order.DataTable.DataDisplay += new EventHandler<XDataDisplayEventArgs>(tabControl_DataDisplay);
            //tableView_order.Size = new Size(650, 350);
            //tableView_order.Location = new Point(570, 10);
            //tableView_order.DataTable.Columns.ResumeLayout();
            //if (patDo != null)
            //{
            //    tableView_order.DataTable.DataSource = this.model.GetCiOrderDataList(patDo.Id_ent);
            //}
            //tableView_order.DataTable.MouseDoubleClick += new MouseEventHandler(tableView_MouseDoubleClick);
            //border_or.ContentControl = tableView_order;

            //this.xapFormControl1.Controls.Remove(border_or);
            //this.xapFormControl1.AddRender(border_or);
        }