コード例 #1
0
        public DiCertificatePrintDialog(Ent4BannerDTO ent4BannerDTO, EntDiProveDO entDiProveDO)
        {
            InitializeComponent();

            this.ent4BannerDTO = ent4BannerDTO;
            this.entDiProveDO  = entDiProveDO;

            this.Load += new EventHandler(DiCertificatePrintDialog_Load);
        }
コード例 #2
0
        public OPProofOfDiagnosisForm(EntDiProveDO entDiProveDo, OPProofOfDiagnosisViewModel model, Ent4BannerDTO ent4BannerDTO)
            : this()
        {
            this.entDiProveDo  = entDiProveDo;
            this.ent4BannerDTO = ent4BannerDTO;
            this.model         = model;

            this.xapFormControl.Dock = DockStyle.Fill;
            this.Panel.Controls.Add(this.xapFormControl);
        }
コード例 #3
0
        public DiProvePrinTypeView()
        {
            InitializeComponent();

            datasource = new EntDiProveDO();

            this.xapFormControl.Load        += new EventHandler(xapFormControl_Load);
            this.xapFormControl.FormCreated += new EventHandler(xapFormControl_FormCreated);
            this.xapFormControl.DataChanged += new EventHandler <xap.rui.control.forms.model.DataChangedEventArgs>(xapFormControl_DataChanged);
        }
コード例 #4
0
        private void DiCertificateTreeView_Load(object sender, EventArgs e)
        {
            this.viewModel = new DiCertificateTreeViewModel();
            this.currUdi = viewModel.CurrUdidocDO_DiceType;
            this.currDi = new EntDiProveDO();

            this.oTree1.TreeItemSelected += new xap.rui.control.tree.events.TreeItemEventHandler(oTree1_TreeItemSelected);

            this.OnInit();
        }
コード例 #5
0
 public void OnDelete()
 {
     viewModel.Delete(this.currDi);
     this.idtp_del = this.currDi.Id_diprovetp;
     this.currDi = null;
     if (this.parentBaseControl != null)
         this.parentBaseControl.SetStatusMsg("删除成功!");
     else if(this.parentUserControl!=null)
         this.parentUserControl.SetStatusMsg("删除成功!");
 }
コード例 #6
0
 /// <summary>
 /// 执行保存
 /// </summary>
 private void toSave()
 {
     this.currDi.Status = this.currDi.Id_diprove != null ? DOStatus.UPDATED : DOStatus.NEW;
     this.currDi = viewModel.Save(this.currDi);
     onFireEventSent(Utils.SAVESUCESS, this.currDi);
     if (this.parentBaseControl!=null)
         this.parentBaseControl.SetStatusMsg("保存成功!");
     else if (this.parentUserControl != null)
         this.parentUserControl.SetStatusMsg("保存成功!");
 }
コード例 #7
0
        private void OnLoadData()
        {
            if (!isInit)
            {
                model.LoadData(entDiProveDo.Id_ent);
                entDiProveDo = model.SetEntDiProveDO(ent4BannerDTO);
            }

            isInit = false;
            OnFillData();
        }
コード例 #8
0
 public void LoadData(String id_ent)
 {
     EntDiProveDO[] entDiProve = service.find("a0.id_ent = '" + id_ent + "'", "id_ent", FBoolean.False);
     if (entDiProve != null && entDiProve.Length > 0)
     {
         entDiProveDo = entDiProve[0];
     }
     else
     {
         entDiProveDo = new EntDiProveDO();
     }
 }
コード例 #9
0
        /// <summary>
        /// 接收响应事件发送
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventArgs"></param>
        public override void HandleState(object sender, xap.rui.engine.DictionaryEventArgs e)
        {
            string uiEvent = e.Data[UIConst.UI_EVENT] as string;

            switch (uiEvent)
            {
            case Utils.SELECTROOT:
                status     = Utils.SELECTROOT;
                dataSource = sender as EntDiProveDO;
                onSelectRoot();
                break;

            case Utils.SELECTROWONLYNEW:
            case Utils.SELECTROWONLYSAVED:
            case Utils.SELECTROWONLYPRINTED:
            case Utils.SELECTROWNOTONLY:
            case Utils.SELECTROWITEM:
                status = Utils.SELECTROW;
                //bCanSave = true;
                dataSource = sender as EntDiProveDO;
                onSelectRow();
                break;

            case Utils.TOADD:
                status = Utils.TOADD;
                //bCanSave = true;
                dataSource = sender as EntDiProveDO;
                this.LoadData();
                break;

            case UIEvent.SAVE:
                //bCanSave = false;
                OnSave();
                break;

            case Utils.SAVESUCESS:
                //dataSource = sender as EntDiProveDO;
                this.xapFormControl.SetEditPolicy(false);
                break;

            case UIEvent.PRINT:
                OnPrint();
                break;

            default:
                break;
            }
        }
コード例 #10
0
        public DiCertificatePrintView(Ent4BannerDTO ent4BannerDTO, EntDiProveDO entDiProveDO)
        {
            InitializeComponent();

            this.ent4BannerDTO = ent4BannerDTO;
            this.entDiProveDO  = entDiProveDO;

            //加载模板视图
            this.rpt_viewer = new ReportViewer(DockStyle.Top, ReportViewer.Zoom_FitWidth, true);
            Control panel = this.rpt_viewer.GetViewPanel();

            panel.Dock = DockStyle.Fill;
            this.xapFormControl.Controls.Add(panel);

            ToPreview();
        }
コード例 #11
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="diDO"></param>
 public void Delete(EntDiProveDO diDO)
 {
     service.delete(new EntDiProveDO[] { diDO });
 }
コード例 #12
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="diDO"></param>
 public void Update(EntDiProveDO diDO)
 {
     service.update(new EntDiProveDO[] { diDO });
 }
コード例 #13
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="diDO"></param>
 public EntDiProveDO Save(EntDiProveDO diDO)
 {
     EntDiProveDO[] entDiProveDOs = service.save(new EntDiProveDO[] { diDO });
     return(entDiProveDOs[0]);
 }
コード例 #14
0
        private void oTree1_TreeItemSelected(object sender, xap.rui.control.tree.events.TreeItemEventArgs e)
        {
            bSelect = true;

            string strCommond = "";
            if (e.Node.Level != 1)
            {
                //strCommond = Utils.SELECTROW;
                Type tp = oTree1.FocusedUserObject.GetType();
                switch (tp.Name)
                {
                    case "UdidocDO"://选中诊断证明分类
                        this.currUdi = (UdidocDO)oTree1.FocusedUserObject;
                        //选中分类是数据独一模式(仅保存一条数据)
                        if ("0" == this.currUdi.Ctrl1)
                        {
                            if (this.ent4BannerDTO.Status.ToString() != EnDictCodeConst.SD_ENSTATUS_OP_FINISH)
                            {
                                //准备根据患者是否诊毕,判断是否要打印
                            }

                            //获取当前独一分类的诊断证明数据(唯一)
                            EntDiProveDO[] dos = viewModel.GetEntDiProveDOByDiProveType(this.ent4BannerDTO.Id_ent, this.currUdi.Code);
                            if (dos != null && dos.Length > 0)
                            {
                                this.currDi = dos[0];
                                //0904临时添加,数据保存模式和单据打印模式,需要分开判断
                                strCommond = this.currUdi.Ctrl2 == "0" && this.currDi.Num_print != null && this.currDi.Num_print > 0 ? Utils.SELECTROWONLYPRINTED : Utils.SELECTROWONLYSAVED;
                            }
                            else
                            {
                                this.createEntDiProveDO();//如果还没有保存数据,则新增数据(仅一次)
                                strCommond = Utils.SELECTROWONLYNEW;
                            }
                        }
                        else
                        {
                            //选中分类不是独一模式,
                            strCommond = Utils.SELECTROWNOTONLY;
                            this.currDi = new EntDiProveDO();
                            this.currDi.Id_diprovetp = this.currUdi.Id_udidoc;
                            this.currDi.Sd_diprovetp = this.currUdi.Code;
                        }
                        break;
                    case "EntDiProveDO"://选中诊断证明
                        strCommond = Utils.SELECTROWITEM;
                        this.currUdi = null;
                        this.currDi = (EntDiProveDO)oTree1.FocusedUserObject;
                        break;
                    default:
                        break;
                }
            }
            else
            {
                strCommond = Utils.SELECTROOT;
                this.currDi = null;
            }

            onFireEventSent(strCommond, this.currDi);
        }