示例#1
0
 public override void ClearTableDataSource()
 {
     base.ClearTableDataSource();
     tableDatasource.Clear();
     idor2OrderDOMap.Clear();
     idor2EmsDTOMap.Clear();
 }
示例#2
0
        public bool Reload(Ent4BannerDTO e)
        {
            mEnt4BannerDTO = e;
            if (mEnt4BannerDTO == null)
            {
                mDataSource.Clear();
                return(false);
            }
            var sql           = string.Format("a0.id_en='{0}'", e.Id_ent);
            var szCidiagAggDO = cidiagCrud.find(sql, "a0.createdtime desc", false);

            if (szCidiagAggDO.Length > 0)
            {
                SetCidiagAggDO(szCidiagAggDO.LastOrDefault());
            }
            else
            {
                SetCidiagAggDO(CreateCidiagAggDO(this.mEnt4BannerDTO));
            }


            mDataSource = (XapDataList <CiDiagItemDO>)GetCidiagAggDO().getCiDiagItemDO().ToArray();

            return(szCidiagAggDO.Length > 0);
        }
示例#3
0
        /// <summary>
        /// 新建医疗单
        /// </summary>
        /// <param name="emsCreatedParameter"></param>
        /// <param name="pos"></param>
        /// <returns></returns>
        public override bool LoadMedSrv(EmsCreatedParameter emsCreatedParameter, int pos) //EmsCreateParameter
        {
            base.LoadMedSrv(emsCreatedParameter, pos);
            MedSrvDO med = emsCreatedParameter.getMedSrvDO();

            this.uiEmsDTO.MedSrvDO = med;
            EmsRstDTO[] rsts = CreateRemote(med.Id_srv);
            EmsRstDTO   rst  = rsts[0];

            if (rst != null)
            {
                uiEmsDTO.Emsapop.deSerializeJson((rst.Document[0] as EmsOpitemDO).serializeJson());
                //String utf8Str = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(rst.DocumentString));
                //uiEmsDTO.Emsapop.deSerializeJson(utf8Str);

                if (rst.Extension != null && rst.Extension.Keys.Contains("MedSrvDO"))
                {
                    this.uiEmsDTO.MedSrvDO = rst.Extension["MedSrvDO"] as MedSrvDO;
                    strSd_srvtp            = this.uiEmsDTO.MedSrvDO.Sd_srvtp;
                }
                tableDatasource.Clear();
                tableDatasource.Add(uiEmsDTO.Emsapop);
                //this.LoadIndicatorData();
                // 动态指标
                if (null != uiEmsDTO.Emsapop.OpCheckIndicatorList)
                {
                    uiEmsDTO.Emsapop.OpCheckIndicatorList.Cast <OrdApSugViewItemDO>().ToList().ForEach(item =>
                    {
                        uiEmsDTO.Emsapop.OpLabItem.Add(item);
                    });
                }
            }
            return(true);
        }
示例#4
0
        /// <summary>
        /// *******************************************获取人员信息*******************************************
        /// </summary>
        /// <param name="id_orcons"></param>
        public void GetConsItem(string id_orcons)
        {
            InviteConsViewModel inviteVM = new InviteConsViewModel();

            consitemList.Clear();
            EmsItemInCons[] invites = inviteVM.GetInviteConsByIdapCons(id_orcons);
            invites.ToList().ForEach(p => { consitemList.Add(p); });
        }
示例#5
0
        /// <summary>
        /// 加载数据
        /// </summary>
        public void Reload()
        {
            if (string.IsNullOrEmpty(Id_ent) || string.IsNullOrEmpty(Code_entp))
            {
                tableDataSource.Clear();
                return;
            }

            OrderOperateDTO operateDTO = new OrderOperateDTO();

            operateDTO.EnContext = new CiEnContextDTO()
            {
                Id_en = this.Id_ent, Code_entp = this.Code_entp
            };
            OrderRstDTO      orderRstDTO   = orderActionLoad.exec(new OrderOperateDTO[] { operateDTO })[0];
            List <CiOrderDO> lstCiOrderDOs = new List <CiOrderDO>();

            if (orderRstDTO.Document != null && orderRstDTO.Document.Count > 0)
            {
                //FArrayList tmpOrderList = new FArrayList();
                //tmpOrderList.deSerializeJson(System.Text.Encoding.UTF8.GetString(Convert.FromBase64String((orderRstDTO.DocumentString))));
                foreach (Object order in orderRstDTO.Document)
                {
                    lstCiOrderDOs.Add(order as CiOrderDO);
                }
            }
            tableDataSource = new XapDataList <CiOrderDO>(orderItemMService, lstCiOrderDOs.ToArray());
            // 获取服务类型显示名称
            if (DicSrvtp.Count <= 0)
            {
                FMap mapSrvtp = new FMap();
                mapSrvtp = orderRstDTO.Extension["SrvTpNameMap"] as FMap;
                if (mapSrvtp != null)
                {
                    foreach (KeyValuePair <string, object> kv in mapSrvtp.ToDictionary())
                    {
                        DicSrvtp.Add(kv.Key, kv.Value.ToString());
                    }
                }
            }
        }
        public void setEmsOrDrugList(XapDataList <EmsOrDrug> list)
        {
            lock (this) {
                IMaterialStockService stoctService = XapServiceMgr.find <IMaterialStockService>();
                List <GetStockReqDTO> reqDtos      = new List <GetStockReqDTO>();
                if (emsOrDrugList == null)
                {
                    emsOrDrugList = new XapDataList <EmsOrDrug>();
                }
                for (int i = 0; i < list.Count; i++)
                {
                    if (list[i].Fg_mm == true)
                    {
                        GetStockReqDTO reqDTO = new GetStockReqDTO();
                        reqDTO.Id_mm       = list[i].Id_mm;
                        reqDTO.Id_dep      = list[i].Id_dep_wh;
                        reqDTO.Req_unit_id = list[i].Id_unit_sale;
                        reqDtos.Add(reqDTO);
                    }
                }
                if (reqDtos.Count > 0)
                {
                    MaterialStockDTO[] stockdto = null;
                    try
                    {
                        stockdto = stoctService.getMaterialStocks(reqDtos.ToArray());
                    }
                    catch (Exception ex)
                    {
                        ex.Publish();
                        //this.ShowInfo(ex.Message);
                    }
                    if (stockdto == null)
                    {
                        return;
                    }
                    for (int i = list.Count - 1; i >= 0; i--)
                    {
                        MaterialStockDTO materialDo = stockdto.FirstOrDefault(p => p.Id_mm == list[i].Id_mm);
                        if (materialDo != null)
                        {
                            FDouble mmcount  = materialDo.Quan_stock;
                            int?    mmStatus = materialDo.Mmstatus;
                            //药房无此药的移除
                            if (mmStatus != null && mmStatus == (int)MaterialStatus.NORELATION)
                            {
                                list.RemoveAt(i);
                            }
                            else
                            {
                                list[i].Fact_count = mmcount;
                                list[i].Price      = materialDo.Price_act;
                                list[i].Mmstatus   = materialDo.Mmstatus;

                                EmsOrDrug ems = emsOrDrugList.FirstOrDefault(p => p.Id_mm == list[i].Id_mm);
                                if (ems != null)
                                {
                                    emsOrDrugList.Remove(ems);
                                }
                                emsOrDrugList.Add(list[i]);
                            }
                        }
                    }
                    List <EmsOrDrug> sortList = null;
                    try
                    {
                        sortList = emsOrDrugList.OrderByDescending(p => p.Fact_count).OrderBy(p => p.Mmstatus).ToList();
                    }
                    catch //(Exception e)
                    {
                        // e.Message;
                    }

                    if (emsOrDrugList == null)
                    {
                        emsOrDrugList = new XapDataList <EmsOrDrug>();
                    }
                    else
                    {
                        emsOrDrugList.Clear();
                    }
                    sortList.ForEach(p => emsOrDrugList.Add(p));
                }
            }
        }