Beispiel #1
0
        protected void HandleEditLogic(CiEmsDTO ems)
        {
            string unitname = "";

            var srvCommon = (CiEmsSrvDTO)ems.Emssrvs[0];

            var service = XapServiceMgr.find <IMedsrvMDOCrudService>();

            ////查询用血对应的服务
            //MedSrvDO medSrcDO = service.findById(Apbu_Srv_ID);
            uiEmsDTO.MedSrvDO = service.findById(ems.Id_srv);

            if (uiEmsDTO.Emsapbt.BtLabItem.Count == 0)
            {
                LoadIndicatorData();
            }
            orCiEmsToUiEms.EditApbt(uiEmsDTO, ems, ref unitname);
            this.uiEmsDTO.Status = DOStatus.NEW;

            uiEmsDTO.Emsapbt.Dt_create = ems.Dt_begin;

            this.uiEmsDTO.Emsapbt.Id_mp_dep   = srvCommon.Id_dep;
            this.uiEmsDTO.Emsapbt.Name_mp_dep = srvCommon.Name_dep;
            tableDatasource = new XapDataList <EmsBtItemDO>();
            tableDatasource.Add(uiEmsDTO.Emsapbt);

            if (ems.Id_or != null)
            {
                CiorderAggDO ciagg = orService.findById(ems.Id_or);
                this.ciOrder = ciagg.getParentDO();
                OrdApBtDO[] btdos = btService.find("id_or='" + ciOrder.Id_or + "'", null, FBoolean.False);
                OrdApBtDO   btdo  = btdos[0];
                uiEmsDTO.CiordubDTO               = new CiordubDTO();
                uiEmsDTO.CiordubDTO.Id_or_rel     = ciOrder.Id_or;
                uiEmsDTO.CiordubDTO.Applyform     = btdo.No_applyform;
                uiEmsDTO.CiordubDTO.Orsrvname     = ciagg.getOrdSrvDO()[0].Name;
                uiEmsDTO.CiordubDTO.Id_srv        = ciOrder.Id_srv;
                uiEmsDTO.CiordubDTO.Quan_medu     = ciagg.getOrdSrvDO()[0].Quan_medu;
                uiEmsDTO.CiordubDTO.Id_unit       = ciagg.getOrdSrvDO()[0].Id_medu;
                uiEmsDTO.CiordubDTO.Dt_bt_pl      = Convert.ToDateTime(btdo.Dt_bt_pl);
                uiEmsDTO.CiordubDTO.Num_margin_bu = btdo.Num_margin_bu;
                uiEmsDTO.CiordubDTO.Id_emp_sign   = ciOrder.Id_emp_sign;
                uiEmsDTO.CiordubDTO.Name_emp_sign = ciOrder.Emp_sign_name;
                //uiEmsDTO.CiordubDTO.Id_route = medSrcDO.Id_route;
                //uiEmsDTO.CiordubDTO.Name_route = medSrcDO.Route_name;
                uiEmsDTO.CiordubDTO.Quan_medu_ub = uiEmsDTO.CiordubDTO.Quan_medu;
                uiEmsDTO.CiordubDTO.Name_unit    = uiEmsDTO.MedSrvDO.Med_name;
                uiEmsDTO.CiordubDTO.Id_unit      = uiEmsDTO.MedSrvDO.Id_unit_med;
            }
            CiorappbtAggDO agg = ems.Orapplysheet[((int)EmsType.BT).ToString()] as CiorappbtAggDO;

            agg.Status = DOStatus.UPDATED;
            agg.getParentDO().Status = DOStatus.UPDATED;
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="order_id"></param>
 /// <returns></returns>
 public CiorderAggDO GetAgg(string order_id)
 {
     agg = service.findById(order_id);
     return(agg);
 }