Exemple #1
0
        public void saveFun()
        {
            string[] idCardsStrings = CardID.Split(';');

            count = 0;
            IGetReport igp;

            foreach (string idCardNo in idCardsStrings)
            {
                switch (PrintType)
                {
                case "btnHousePhysical":
                    igp = new HousePhysical();
                    saveInvoke(igp, idCardNo);
                    break;

                case "btnTypeBUI":
                    igp        = new TypeBchao();
                    igp.CardID = idCardNo;
                    saveInvoke(igp, idCardNo);
                    break;

                case "btnECG":
                    string ecgType = DrawItems.GetECGConfig();

                    if (ecgType == "2")
                    {
                        igp        = new ElectroCardioGramcs();
                        igp.CardID = idCardNo;
                        saveInvoke(igp, idCardNo);
                    }
                    else
                    {
                        igp = null;
                    }
                    break;

                default:
                    igp = null;
                    break;
                }
            }

            Thread.Sleep(1000);
            setMsg("开始生成合并文档");
            MergeInvoke();
            CloseWin("test");
        }
Exemple #2
0
        public void saveFun()
        {
            frmShowSave.count = 0;
            IGetReport igp;
            int        no = 1;

            string[] idCardsStrings = CardID.Split(';');

            foreach (string idCardNo in idCardsStrings)
            {
                igp = new HousePhysical();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new TypeBchao();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new HouseBone();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new HealthVascular();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new HealthLung();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new HealthAssess();
                this.saveInvoke(igp, idCardNo, no.ToString());
                igp = new HealthGuide();
                this.saveInvoke(igp, idCardNo, no.ToString());
                string ecgType = DrawItems.GetECGConfig();
                if (ecgType == "2")
                {
                    igp = new ElectroCardioGramcs();
                    this.saveInvoke(igp, idCardNo, no.ToString());
                }
                no++;
            }

            Thread.Sleep(1000);
            this.setMsg("开始生成合并文档");
            this.MergeInvoke();
            this.CloseWin("test");
        }
Exemple #3
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Button     btnShow = (Button)sender;
            string     btnName = btnShow.Name;
            IGetReport igp;
            string     path = "printtemp\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + "\\";

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            string[] idCardStrings = IDCard.Split(';');

            if (idCardStrings.Length > 1)
            {
                try
                {
                    frmShowBatch frm = new frmShowBatch();
                    frm.CardID    = IDCard;
                    frm.PrintType = btnName;
                    frm.Path      = path;
                    frm.ShowDialog();

                    frmPrint frmShow = new frmPrint();
                    frmShow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    frmShow.WindowState           = WindowState.Maximized;
                    frmShow.DocName = path + "xpsShow.xps";
                    frmShow.ShowDialog();
                }
                catch (Exception d)
                {
                    MessageBox.Show(d.ToString());
                }
            }
            else
            {
                switch (btnName)
                {
                case "btnHousePhysical":
                    igp = new HousePhysical();
                    break;

                case "btnTypeBUI":
                    igp        = new TypeBchao();
                    igp.CardID = IDCard;
                    break;

                case "btnECG":
                    string ecgType = DrawItems.GetECGConfig();

                    if (ecgType == "2")
                    {
                        igp        = new ElectroCardioGramcs();
                        igp.CardID = IDCard;
                    }
                    else
                    {
                        igp = null;
                    }
                    break;

                case "btnTypeBone":
                    igp = new HouseBone();
                    break;

                case "btnVascular":
                    igp = new HealthVascular();
                    break;

                case "btnLung":
                    igp = new HealthLung();
                    break;

                case "btnAssess":
                    igp = new HealthAssess();
                    break;

                case "btnGuide":
                    igp = new HealthGuide();
                    break;

                default:
                    igp = null;
                    break;
                }
                if (igp == null)
                {
                    return;
                }

                igp.CardID    = IDCard;
                igp.BaseModel = new RecordsBaseInfoBLL().GetModel(IDCard);

                if (igp.BaseModel == null)
                {
                    MessageBox.Show("无此人个人档案,身份证号:" + IDCard);
                    return;
                }

                try
                {
                    frmPrint frm = new frmPrint();
                    FixedDocumentSequence fsq = igp.getReport();

                    if (!DrawItems.SaveReport(path + igp.PrintName, fsq))
                    {
                        MessageBox.Show("打印文件正在被占用,请稍后重试");
                    }
                    else
                    {
                        frm.DocName = path + igp.PrintName;
                        frm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                        frm.WindowState           = WindowState.Maximized;
                        frm.ShowDialog();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }