private void tsrbtnPrint_Click(object sender, EventArgs e)
        {
            string startPath = Application.StartupPath + "\\report\\药品调价单据.grf";

            PrintFactory.GetPrinter(ConfigManager.OP_YK_ADJPRICE).PrintBill(_currentMaster, _orderDt,
                                                                            startPath, (int)_currentUserId);
        }
Beispiel #2
0
 private void tsrbtnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         YP_CheckMaster master      = new YP_CheckMaster();
         int            auditNum    = 0;
         string         strAuditNum = GWMHIS.BussinessLogicLayer.Forms.DlgInputBoxStatic.InputBox("", "请输入要打印的审核单号", "");
         if (strAuditNum != "" && Int32.TryParse(strAuditNum, out auditNum))
         {
             if (_belongSystem == ConfigManager.YF_SYSTEM)
             {
                 master.OpType = ConfigManager.OP_YF_CHECK;
             }
             else
             {
                 master.OpType = ConfigManager.OP_YK_CHECK;
             }
             master.AuditNum = auditNum;
             master.DeptID   = (int)_currentDeptId;
             string startPath = Application.StartupPath + "\\report\\药品盘点单据.grf";
             PrintFactory.GetPrinter(ConfigManager.OP_YK_CHECK).PrintBill(master, null, startPath,
                                                                          (int)_currentUserId);
         }
         else
         {
             throw new Exception("盘点单号格式不正确,请重新输入");
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Beispiel #3
0
        private void PrintBy()
        {
            DataTable dtt = (DataTable)dgrdRecipeInfo.DataSource;

            try
            {
                this.Cursor = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.WaitCursor();
                string startPath = Application.StartupPath + "\\report\\住院摆药单(经管).grf";
                for (int i = 0; i < selectPat.Count; i++)
                {
                    DataRow[] rows = dtt.Select("cureno=" + "'" + selectPat[i].CureNo.ToString() + "'");
                    if (rows == null || rows.Length == 0)
                    {
                        continue;
                    }
                    DataTable dt = dtt.Clone();
                    dt.Clear();
                    for (int j = 0; j < rows.Length; j++)
                    {
                        dt.Rows.Add(rows[j].ItemArray);
                    }
                    PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_BY").PrintBill(null, dt,
                                                                                              startPath, (int)_currentUserId);
                }
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = DefaultCursor;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 打印统领单据
        /// </summary>
        /// <param name="uniformMaster">统领单头表</param>
        private void PrintDispTL(YP_DispDeptHis uniformMaster)
        {
            try
            {
                this.Cursor = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.WaitCursor();
                string startPath = Application.StartupPath + "\\report\\统领发药单据.grf";
                uniformMaster.PatientNames = CombineTotalMsg(cobSumWay.SelectedIndex, this.chkPrintNoPO.Checked);
                switch (cobSumWay.SelectedIndex)
                {
                case 0:
                    uniformMaster.BillType = "长期医嘱";
                    break;

                case 1:
                    uniformMaster.BillType = "临时医嘱";
                    break;

                default:
                    uniformMaster.BillType = "全部医嘱";
                    break;
                }
                uniformMaster.BillType += chkPrintNoPO.Checked ? "针剂药品" : "全部药品";
                PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_TL").PrintBill(uniformMaster, _totalOrder,
                                                                                          startPath, (int)_currentUserId);
            }
            catch (Exception error)
            {
                throw error;
            }
            finally
            {
                this.Cursor = DefaultCursor;
            }
        }
        public void PrintBill(int printer)
        {
            string startPath = System.Windows.Forms.Application.StartupPath + "\\report\\药品采购计划单.grf";

            if (_currentMaster != null)
            {
                YP_Printer billPrinter = PrintFactory.GetPrinter(ConfigManager.OP_YK_STOCKPLAN);
                billPrinter.PrintBill(_currentMaster, null, startPath, printer);
            }
        }
Beispiel #6
0
 private void tsrbtnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         string startPath = Application.StartupPath + "\\report\\药品入库单据.grf";
         PrintFactory.GetPrinter(ConfigManager.OP_YK_INOPTYPE).PrintBill(_currentMaster, _orderDt, startPath, (int)_currentUserId);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         string     startPath = Application.StartupPath;
         YP_Printer printer;
         if (tabDispQuery.SelectedTab == tabPgSingle)
         {
             //如果是门诊发药,发票号为0
             if (_currentMaster.InvoiceNum != 0)
             {
                 //如果是发药
                 if (_currentMaster.DrugOC_Flag == 1)
                 {
                     printer    = PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "MZ");
                     startPath += "\\report\\门诊发药单据.grf";
                 }
                 //如果是退药
                 else
                 {
                     printer    = PrintFactory.GetPrinter(ConfigManager.OP_YF_REFUND + "MZ");
                     startPath += "\\report\\门诊退药单据.grf";
                 }
             }
             //如果是住院发药
             else
             {
                 if (_currentMaster.DrugOC_Flag == 1)
                 {
                     printer    = PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_BY");
                     startPath += "\\report\\住院摆药单(经管).grf";
                 }
                 else
                 {
                     printer    = PrintFactory.GetPrinter(ConfigManager.OP_YF_REFUND + "ZY");
                     startPath += "\\report\\住院退药单据.grf";
                 }
             }
             printer.PrintBill(_currentMaster, null, startPath, (int)_currentUserId);
         }
         else
         {
             printer    = PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_TL");
             startPath += "\\report\\统领发药单据(经管).grf";
             printer.PrintBill(_currentDeptDisp, (DataTable)(dgrdDispOrder.DataSource), startPath, (int)_currentUserId);
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Beispiel #8
0
 private void PrintRefundBill(YP_DRMaster refMaster)
 {
     try
     {
         string startPath = Application.StartupPath + "\\report\\门诊退药单据.grf";
         PrintFactory.GetPrinter(ConfigManager.OP_YF_REFUND + "MZ").PrintBill(refMaster, null, startPath,
                                                                              (int)_currentUserId);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Beispiel #9
0
        private void btnPutDrug_Click(object sender, EventArgs e)
        {
            if (tabMsgMaster.SelectedIndex == 0)
            {
                PrintBy();
            }
            else if (tabMsgMaster.SelectedIndex == 1)
            {
                string startPath = Application.StartupPath + "\\report\\住院已发药摆药单(经管).grf";

                PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_BY").PrintBill(_currentMaster, null,
                                                                                          startPath, (int)_currentUserId);
            }
        }
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         string            startPath = Application.StartupPath + "\\report\\药品供应商统计单据.grf";
         YP_PrintCondition condition = new YP_PrintCondition();
         condition.actYear  = cobBeginDate.Value.ToString();
         condition.actMonth = cobEndDate.Value.ToString();
         condition.userId   = Convert.ToInt32(user.EmployeeID);
         PrintFactory.GetPrinter("Support_Report").PrintReport(condition, (DataTable)dgvDetail.DataSource, startPath);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
        private void PrintDispTL(List <BillMaster> printList, YP_DispDeptHis uniformMaster)
        {
            string startPath = Application.StartupPath + "\\report\\统领发药单据(经管).grf";

            PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_TL").PrintBill(uniformMaster, _recipeOrder,
                                                                                      startPath, (int)_currentUserId);
            if (MessageBox.Show("发药成功,是否需要打印摆药单?", "发药成功",
                                MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                startPath = Application.StartupPath + "\\report\\住院摆药单(经管).grf";
                foreach (YP_DRMaster printMaster in printList)
                {
                    PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_BY").PrintBill(printMaster, null,
                                                                                              startPath, (int)_currentUserId);
                }
            }
        }
Beispiel #12
0
        //摆药按钮
        private void btnPutDrug_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.WaitCursor();
                if (_recipeOrder != null)
                {
                    YP_PrintCondition printCondition = new YP_PrintCondition();
                    printCondition.userId   = (int)_currentUserId;
                    printCondition.drugType = chkIsOnlyPutPO.Checked ? "口服药" : "全部药品";
                    printCondition.queyType = cobSumWay.SelectedIndex;
                    DataRow[] dRows;
                    switch (cobSumWay.SelectedIndex)
                    {
                    case 0:
                        dRows = _recipeOrder.Select("DOCORDERTYPE=0");
                        break;

                    case 1:
                        dRows = _recipeOrder.Select("DOCORDERTYPE=1");
                        break;

                    default:
                        dRows = _recipeOrder.Select("");
                        break;
                    }
                    if (dRows.Count() > 0)
                    {
                        string startPath = Application.StartupPath + "\\report\\住院摆药单.grf";
                        PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_BY").PrintReport(printCondition,
                                                                                                    dRows.CopyToDataTable(),
                                                                                                    startPath);
                    }
                }
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = DefaultCursor;
            }
        }
Beispiel #13
0
 private void tsrPrintEmpty_Click(object sender, EventArgs e)
 {
     try
     {
         if (_checkOrderDt.Rows.Count > 0)
         {
             string startPath = Application.StartupPath + "\\report\\药品空盘点表单.grf";
             PrintFactory.GetPrinter(ConfigManager.OP_YK_CHECK + "EMPTY").PrintBill(_currentMaster, _checkOrderDt,
                                                                                    startPath, (int)_currentUserId);
         }
         else
         {
             MessageBox.Show("请先提取数据");
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Beispiel #14
0
        private void PrintDispTL(List <BillMaster> printList, YP_DispDeptHis uniformMaster)
        {
            string startPath = Application.StartupPath + "\\report\\统领发药单据(经管).grf";

            for (int i = 0; i < selectPat.Count; i++)
            {
                DataRow[] rows = _recipeOrder.Select("cureno=" + "'" + selectPat[i].CureNo.ToString() + "'");
                if (rows == null || rows.Length == 0)
                {
                    continue;
                }
                DataTable dt = _recipeOrder.Clone();
                dt.Clear();
                for (int j = 0; j < rows.Length; j++)
                {
                    dt.Rows.Add(rows[j].ItemArray);
                }
                PrintFactory.GetPrinter(ConfigManager.OP_YF_DISPENSE + "ZY_TL").PrintBill(uniformMaster, dt,
                                                                                          startPath, (int)_currentUserId);
            }
        }
Beispiel #15
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgrdDrugIOS.DataSource != null)
         {
             DataTable         printDt   = (DataTable)(dgrdDrugIOS.DataSource);
             string            startPath = Application.StartupPath + "\\report\\药品进销存报表.grf";
             YP_PrintCondition condition = new YP_PrintCondition();
             condition.actYear  = cobQueryYear.Text;
             condition.actMonth = cobQueryMonth.Text;
             condition.drugType = cobQueryType.Text;
             condition.userId   = (int)_currentUser;
             condition.deptId   = (int)_currentDept;
             PrintFactory.GetPrinter("IOS_Report").PrintReport(condition, printDt, startPath);
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable           dt        = (DataTable)dgrdOrderAccount.DataSource;
         YP_AccountCondition condition = new YP_AccountCondition();
         condition.actMonth    = cobAccountMonth.Text;
         condition.actYear     = cobAccountYear.Text;
         condition.drugName    = txtDgName.Text;
         condition.drugType    = "";
         condition.productName = txtProduct.Text;
         condition.beginNum    = lblBeginNum.Text;
         condition.begingFee   = lblBeginFee.Text;
         condition.endNum      = lblEndNum.Text;
         condition.endFee      = lblEndFee.Text;
         string startPath = Application.StartupPath + "\\report\\药品明细帐报表.grf";
         PrintFactory.GetPrinter("Account_Report").PrintReport(condition, dt, startPath);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }