コード例 #1
0
ファイル: PrintForm.cs プロジェクト: xuanximoming/key
        private void LoadPrint()
        {
            try
            {
                SaveFileDialog file = new SaveFileDialog();
                file.InitialDirectory = "D:\\";
                file.Filter           = "Pdf Files(*.pdf)|*.pdf";
                file.FileName         = "病案首页";
                if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    WaitDialogForm m_WaitDialog = new WaitDialogForm("正在导出PDF文件...", "请稍后");
                    Document       doc          = new Document();
                    PdfWriter.GetInstance(doc, new FileStream(file.FileName, FileMode.OpenOrCreate));
                    doc.Open();

                    List <Bitmap> bitmapList = util.GetPrintImage();
                    foreach (var item in bitmapList)
                    {
                        iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(item, BaseColor.WHITE);
                        image.Alignment = iTextSharp.text.Image.MIDDLE_ALIGN;
                        image.ScalePercent(70);
                        doc.Add(image);
                    }
                    doc.Close();
                    m_WaitDialog.Close();
                    m_WaitDialog.Dispose();
                    YiDanMessageBox.Show("导出成功!");
                }
            }
            catch (Exception ex)
            {
                YiDanMessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
ファイル: frmDetail.cs プロジェクト: xuanximoming/key
 private void gridView2_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
     try
     {
         YD_Common.AutoIndex(e);
     }
     catch (Exception ex)
     {
         YiDanMessageBox.Show(1, ex);
     }
 }
コード例 #3
0
ファイル: frmDetail.cs プロジェクト: xuanximoming/key
 private void xtraTabControl1_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
 {
     try
     {
         xtraTabControl1.SelectedTabPage = xtraTabPage1;
     }
     catch (Exception ex)
     {
         YiDanMessageBox.Show(1, ex);
     }
 }
コード例 #4
0
ファイル: frmDetail.cs プロジェクト: xuanximoming/key
 private void frmDetail_Load(object sender, EventArgs e)
 {
     try
     {
         GetDepartmentDetail(m_deptcode);
         label2.Text = GetDeptName(m_deptcode);
     }
     catch (Exception ex)
     {
         YiDanMessageBox.Show(1, ex);
     }
 }
コード例 #5
0
ファイル: frmDetail.cs プロジェクト: xuanximoming/key
 private void gridControldepartment_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         DataRow dataRow   = gridView2.GetDataRow(gridView2.FocusedRowHandle);
         string  noofinpat = dataRow["noofinpat"].ToString();
         string  patstatus = dataRow["status"].ToString();
         GetPatientDetailList(noofinpat, patstatus);
     }
     catch (Exception ex)
     {
         YiDanMessageBox.Show(1, ex);
     }
 }
コード例 #6
0
ファイル: frmDetail.cs プロジェクト: xuanximoming/key
        public void GetDepartmentDetail(string deptcode)
        {
            try
            {
                SqlParameter[] sqlParams = new SqlParameter[] {
                    new SqlParameter("@deptid", SqlDbType.VarChar),
                };
                sqlParams[0].Value = deptcode;
                DataSet ds = sql_helper.ExecuteDataSet("EMRQCMANAGER.usp_QcmanagerDepartmentDetail", sqlParams, CommandType.StoredProcedure);
                m_pageSouce = ds.Tables[0];

                gridControldepartment.DataSource = m_pageSouce;

                if (m_pageSouce.Rows.Count == 0)
                {
                    YiDanMessageBox.Show("无数据");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }