예제 #1
0
        private void oTree1_TreeItemSelected(object sender, TreeItemEventArgs e)
        {
            //this.node = e.Node.PrevNode
            OrObsAandLabDTO tree = oTree1.GetUserObject(e.Node) as OrObsAandLabDTO;

            this.FireSelected(tree);
        }
예제 #2
0
        private void otree_TreeItemSelected(object sender, TreeItemEventArgs e)
        {
            var labdto = otree.FocusedUserObject as OrObsAandLabDTO;

            if (labdto == null)
            {
                return;
            }
            FireSelected(labdto);
        }
예제 #3
0
        /// <summary>
        /// 复选框选中事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void oTree1_TreeItemCheckChanged(object sender, TreeItemEventArgs e)
        {
            XAPTreeNodeRender nodeTree = e.Node as XAPTreeNodeRender;

            if (nodeTree.NodeData != null)
            {
                object nodeObj = (nodeTree.NodeData as BizNode).UserObject;
                if (nodeObj is OrTmplDTO)
                {
                    OrTmplDTO ortmplDO = nodeObj as OrTmplDTO;
                    //获得选中服务或模板下所有的模板id
                    FArrayList ids_Ortmpl = this.model.getAllChildOrTmplDTO(ortmplDO, this.modeltype);

                    if (nodeTree.Checked && ids_Ortmpl != null)
                    {
                        if (this.parentFrame.cacheModelItem != null)
                        {
                            for (int i = ids_Ortmpl.Count - 1; i >= 0; i--)
                            {
                                if (this.parentFrame.cacheModelItem.ContainsKey(ids_Ortmpl[i] as string))
                                {
                                    FArrayList list = this.parentFrame.cacheModelItem[ids_Ortmpl[i] as string] as FArrayList;
                                    //获得可以保存的模板明细

                                    getCanSaveItmToSelectList(list);
                                }
                            }
                        }
                    }
                    else
                    {//选中取消,将已选的模板明细移除
                        for (int i = ids_Ortmpl.Count - 1; i >= 0; i--)
                        {
                            for (int j = this.selectList.Count - 1; j >= 0; j--)
                            {
                                if (selectList[j].Id_ortmpl == ids_Ortmpl[i] as string)
                                {
                                    selectList.RemoveAt(j);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                //模板明细的选中事件
                modelItmChecked(sender, e);
            }
        }
예제 #4
0
 /// <summary>
 /// 发送树选中事件给card
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void OTreeItemSelected(object sender, TreeItemEventArgs args)
 {
     this.FireSelected(this.oTree.FocusedUserObject);
     aggDo = this.model.GetAggDo((this.oTree.FocusedUserObject as OrdApConsDO).Id_apcons);
     if (aggDo == null)
     {
         return;
     }
     if (aggDo.getParentDO().Sd_su_cons == "4" || aggDo.getParentDO().Sd_su_cons == "5" ||
         aggDo.getParentDO().Sd_su_cons == "6")
     {
         FireEvent("complete");
     }
 }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void oTree1_TreeItemCheckChanged(object sender, TreeItemEventArgs e)
        {
            XAPTreeNodeRender nodeTree = e.Node as XAPTreeNodeRender;

            loadNodes(nodeTree);
            if (nodeTree.NodeData != null)
            {
                object nodeObj = (nodeTree.NodeData as BizNode).UserObject;
                if ((nodeObj is OrTmplDTO) || (nodeObj is OrTmplCaDO))
                {
                    //获得选中服务或模板下所有的模板id
                    List <String> idortmpls = this.getAllChildIdOrTmpls(nodeTree.NodeData as BizNode);
                    for (int i = idortmpls.Count - 1; i >= 0; i--)
                    {
                        if (nodeTree.Checked)
                        {
                            FArrayList list = new FArrayList();;
                            if (this.viewModel.DicOrTplNItm.ContainsKey(idortmpls[i]))
                            {
                                list = this.viewModel.DicOrTplNItm[idortmpls[i]] as FArrayList;
                            }
                            foreach (NewOrderTemplateDTO templateDTO in list)
                            {
                                FArrayList itmdolist = templateDTO.Itemlist;
                                foreach (OrTplNItmDO itmdo in itmdolist)
                                {
                                    if (!lstOrTplNItmDOs.Contains(itmdo))
                                    {
                                        lstOrTplNItmDOs.Add(itmdo);
                                    }
                                }
                            }
                        }
                        else
                        {
                            for (int j = this.lstOrTplNItmDOs.Count - 1; j >= 0; j--)
                            {
                                if (lstOrTplNItmDOs[j].Id_ortmpl == idortmpls[i])
                                {
                                    lstOrTplNItmDOs.RemoveAt(j);
                                }
                            }
                        }
                    }
                }
            }
            //模板明细的选中事件
            modelItmChecked(sender, e);
        }
예제 #6
0
        private void modelItmChecked(object obj, TreeItemEventArgs e)
        {
            if (e.Node is IExtOrder)
            {
                var sender = e.Node;
                if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("1"))//套
                {
                    LisFirstOrdrRender render = (sender as LisFirstOrdrRender);

                    if (sender is LisFirstOrdrRender)//检查检验一级
                    {
                        bool nowChecked = (sender as LisFirstOrdrRender).Checked;
                        if (nowChecked)
                        {
                            if (!this.selectTreeList.Contains(sender))
                            {
                                this.selectTreeList.Add(sender as XAPTreeNodeRender);
                            }
                        }
                        else
                        {
                            this.selectTreeList.Remove(sender as XAPTreeNodeRender);
                        }
                        if (!isCheckChild)
                        {
                            isCheckChild = true;;
                        }
                        foreach (var temp in (sender as LisFirstOrdrRender).SecondOrderCollections)
                        {
                            if (temp.ItemDo.Fg_active == null || (temp.ItemDo.Fg_active != null && (bool)temp.ItemDo.Fg_active))
                            {
                                temp.IsCanel = true;
                                temp.Checked = nowChecked;
                                temp.IsCanel = false;
                                if (nowChecked)
                                {
                                    if (!selectList.Contains(temp.ItemDo))
                                    {
                                        selectList.Add(temp.ItemDo);
                                        this.selectTreeList.Add(temp as XAPTreeNodeRender);
                                    }
                                }
                                else
                                {
                                    selectList.Remove(temp.ItemDo);
                                    this.selectTreeList.Remove(temp as XAPTreeNodeRender);
                                }
                            }
                            else
                            {
                                temp.IsCanel = true;
                                temp.Checked = nowChecked;
                                temp.IsCanel = false;
                            }
                        }
                    }
                    else if (sender is LisSecondOrder)//检查检查二级
                    {
                        //render.ExtAssist.OrderDto
                        LisSecondOrder secondeOrder = sender as LisSecondOrder;
                        bool           nowChecked   = secondeOrder.Checked;

                        bool flagResult = false;

                        foreach (var temp in secondeOrder.BrotherOrderCollecions)
                        {
                            //temp.Checked
                            if (nowChecked)
                            {
                                if (temp.ItemDo.Fg_active == null || (temp.ItemDo.Fg_active != null && (bool)temp.ItemDo.Fg_active))
                                {
                                    if (secondeOrder.ItemDo == temp.ItemDo || (temp.ItemDo.Fg_edit != null && !(bool)temp.ItemDo.Fg_edit))
                                    {
                                        temp.IsCanel = true;
                                        temp.Checked = nowChecked;
                                        temp.IsCanel = false;
                                        if (!selectList.Contains(temp.ItemDo))
                                        {
                                            selectList.Add(temp.ItemDo);
                                            this.selectTreeList.Add(temp as XAPTreeNodeRender);
                                        }
                                    }
                                }
                            }
                            else
                            {
                                if (temp == secondeOrder)
                                {
                                    if (selectList.Contains(temp.ItemDo))
                                    {
                                        selectList.Remove(temp.ItemDo);
                                        this.selectTreeList.Remove(temp as XAPTreeNodeRender);
                                    }
                                }
                            }

                            if (temp.IsChecked)
                            {
                                flagResult = true;
                            }
                        }

                        if (secondeOrder.ParentRender != null)
                        {
                            secondeOrder.ParentRender.IsCanel = true;
                            secondeOrder.ParentRender.IsCanelCheckedOperation = true;
                            secondeOrder.ParentRender.IsChecked = flagResult;
                            secondeOrder.ParentRender.IsCanelCheckedOperation = false;
                            secondeOrder.ParentRender.IsCanel = false;
                            if (flagResult)
                            {
                                if (!this.selectTreeList.Contains(secondeOrder.ParentRender))
                                {
                                    this.selectTreeList.Add(secondeOrder.ParentRender as XAPTreeNodeRender);
                                }
                            }
                            else
                            {
                                this.selectTreeList.Remove(secondeOrder.ParentRender as XAPTreeNodeRender);
                            }
                        }
                    }
                }
                else if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("2"))//成组药
                {
                    if (sender is OrderSingleRender)
                    {
                        OrderSingleRender ordersinglRender = (sender as OrderSingleRender);
                        bool nowChecked = ordersinglRender.Checked;
                        if (nowChecked)
                        {
                            List <OrderSingleRender> brotherList = ordersinglRender.BrotherOrderCollecions;
                            foreach (OrderSingleRender brother in brotherList)
                            {
                                brother.Checked = true;
                                if (brother.Checked)
                                {
                                    if (!selectList.Contains(brother.ItemDo))
                                    {
                                        selectList.Add(brother.ItemDo);
                                        this.selectTreeList.Add(brother as XAPTreeNodeRender);
                                    }
                                }
                            }
                            if (!selectList.Contains(ordersinglRender.ItemDo))
                            {
                                selectList.Add(ordersinglRender.ItemDo);
                                this.selectTreeList.Add(ordersinglRender as XAPTreeNodeRender);
                            }
                        }
                        else
                        {
                            selectList.Remove(ordersinglRender.ItemDo);
                            this.selectTreeList.Add(ordersinglRender as XAPTreeNodeRender);
                        }
                    }
                    else if (sender is OrderGroupFirstOrder)
                    {
                        if ((sender as OrderGroupFirstOrder).Checked)
                        {
                            if (!this.selectTreeList.Contains(sender))
                            {
                                this.selectTreeList.Add(sender as XAPTreeNodeRender);
                            }
                        }
                        else
                        {
                            this.selectTreeList.Remove(sender as XAPTreeNodeRender);
                        }
                    }
                }
                else if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("3"))//单一药品
                {
                    OrderSingleRender ordersinglRender = (sender as OrderSingleRender);
                    bool nowChecked = ordersinglRender.Checked;
                    if (nowChecked)
                    {
                        if (!selectList.Contains(ordersinglRender.ItemDo))
                        {
                            selectList.Add(ordersinglRender.ItemDo);
                        }
                    }
                    else
                    {
                        selectList.Remove(ordersinglRender.ItemDo);
                    }
                }
                else if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("4"))//其他(检查检验非套)
                {
                    LisFirstOrdrRender render = (sender as LisFirstOrdrRender);
                    bool nowChecked           = render.Checked;
                    if (nowChecked)
                    {
                        if (!selectList.Contains(render.ItemDo))
                        {
                            selectList.Add(render.ItemDo);
                        }
                    }
                    else
                    {
                        selectList.Remove(render.ItemDo);
                    }
                }
                else if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("5"))//草药
                {
                    if (sender is ChineseMedicineOrder)
                    {
                        ChineseMedicineOrder render = (sender as ChineseMedicineOrder);
                        bool nowChecked             = render.Checked;
                        if (nowChecked)
                        {
                            List <ChineseMedicineOrder> brotherList = render.BrotherOrderCollecions;
                            foreach (ChineseMedicineOrder brother in brotherList)
                            {
                                brother.Checked = true;
                                if (brother.Checked)
                                {
                                    if (!selectList.Contains(brother.ItemDo))
                                    {
                                        selectList.Add(brother.ItemDo);
                                    }
                                }
                            }
                            if (!selectList.Contains(render.ItemDo))
                            {
                                selectList.Add(render.ItemDo);
                            }
                        }
                        else
                        {
                            selectList.Remove(render.ItemDo);
                        }
                    }
                    else if (sender is ChineseMedcineFirstOrder)
                    {
                        if ((sender as ChineseMedcineFirstOrder).Checked)
                        {
                            if (!this.selectTreeList.Contains(sender))
                            {
                                this.selectTreeList.Add(sender as XAPTreeNodeRender);
                            }
                        }
                    }
                    else
                    {
                        this.selectTreeList.Remove(sender as XAPTreeNodeRender);
                    }
                }
                else if ((sender as IExtOrder).ExtAssist.OrderDto.Ui_flag.Equals("6"))//诊疗
                {
                    TreatmentOrder render     = (sender as TreatmentOrder);
                    bool           nowChecked = render.Checked;
                    if (nowChecked)
                    {
                        if (!selectList.Contains(render.ItemDo))
                        {
                            selectList.Add(render.ItemDo);
                        }
                    }
                    else
                    {
                        selectList.Remove(render.ItemDo);
                    }
                }
            }
        }
예제 #7
0
        /// <summary>
        /// 选中节点事件,加载模板明细
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void oTree1_TreeItemSelected(object sender, TreeItemEventArgs e)
        {
            XAPTreeNodeRender nodeTree = e.Node as XAPTreeNodeRender;

            loadNodes(nodeTree);
        }
예제 #8
0
 void webMatrixHost_TreeItemRemoved(object sender, TreeItemEventArgs e)
 {
     GetSiteFileSystemItem(e, (item) => siteFiles.Remove(item.Path));
 }
예제 #9
0
 void webMatrixHost_TreeItemCreated(object sender, TreeItemEventArgs e)
 {
     GetSiteFileSystemItem(e, (item) => {
         if (!siteFiles.ContainsKey(item.Path) && !item.Path.Contains("\\.git\\"))
         {
             siteFiles.Add(item.Path, item);
             Action act = () => SetFileStatusIcon(item.Path);
             Dispatcher.CurrentDispatcher.BeginInvoke(act, DispatcherPriority.Background);
         }
     });
 }
예제 #10
0
 private void GetSiteFileSystemItem(TreeItemEventArgs e, Action<ISiteFileSystemItem> action)
 {
     var id = e.HierarchyId;
     var item = this.webMatrixHost.GetSiteItem(id) as ISiteFileSystemItem;
     if (item != null && item is ISiteFile) action(item);
 }