Ejemplo n.º 1
0
        public int PrintPreview()
        {
            Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();

            print.PrintPreview(0, 0, this);
            return(1);
        }
Ejemplo n.º 2
0
 public void Print()
 {
     Neusoft.NFC.Interface.Classes.Print p  = new Neusoft.NFC.Interface.Classes.Print();
     Neusoft.HISFC.Object.Base.PageSize  pz = new Neusoft.HISFC.Object.Base.PageSize("JZDDY", 460, 380);
     p.SetPageSize(pz);
     p.PrintPage(26, 0, this.neuPanel3);
 }
Ejemplo n.º 3
0
 public int Print()
 {
     Neusoft.NFC.Interface.Classes.Print p  = new Neusoft.NFC.Interface.Classes.Print();
     Neusoft.HISFC.Object.Base.PageSize  pz = new Neusoft.HISFC.Object.Base.PageSize("JZDDY", 460, 380);
     p.SetPageSize(pz);
     p.PrintPage(0, 0, this);
     return(0);
 }
Ejemplo n.º 4
0
 public void PrintRecipe()
 {
     Neusoft.NFC.Interface.Classes.Print p = new Neusoft.NFC.Interface.Classes.Print();
     p.IsDataAutoExtend = true;
     p.ControlBorder    = Neusoft.NFC.Interface.Classes.enuControlBorder.None;
     p.PrintPreview(this);
     this.GetArgument();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 对调用该控件的父控件进行打印
 /// </summary>
 /// <param name="parentControl">父控件</param>
 public void PrintPreview(System.Windows.Forms.Control parentControl)
 {
     Neusoft.NFC.Interface.Classes.Print pr = new Neusoft.NFC.Interface.Classes.Print();
     pr.IsDataAutoExtend = false;
     this.IsShowArrow    = false;
     pr.PrintPreview(parentControl);
     this.IsShowArrow = true;
 }
Ejemplo n.º 6
0
        public int Print()
        {
            Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();

            //设置纸张大小
            //neusoft.Common.Class.Function.GetPageSize("bill", ref Print);

            print.PrintPage(0, 0, this);

            return(1);
        }
Ejemplo n.º 7
0
        public int Print()
        {
            Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();


            this.Size = new System.Drawing.Size(500, 364);

            print.PrintPage(0, 0, this);

            return(1);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 打印日报表


        /// </summary>
        protected override int OnPrint(object sender, object neuObject)
        {
            //if (Neusoft.NFC.Function.NConvert.ToDecimal(this.lblLBalanceCost.Text) == 0 && Neusoft.NFC.Function.NConvert.ToDecimal(this.lblPrepayCost.Text) == 0)
            //{
            //    Neusoft.NFC.Interface.Classes.Function.Msg("时间范围内没有发生预交金和结算费用!", 111);

            //}
            Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();

            print.PrintPage(0, 0, this);
            return(1);
        }
Ejemplo n.º 9
0
        public void PrintRecipe()
        {
            try
            {
                Neusoft.NFC.Interface.Classes.Print print = null;
                try
                {
                    print = new Neusoft.NFC.Interface.Classes.Print();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("初始化打印机失败!" + ex.Message);
                    return;
                }
                string paperName = string.Empty;
                //if (this.InvoiceType == "MZ02")
                //{
                paperName = "MZBLB";

                //}
                //else if (this.InvoiceType == "MZ01")
                //{
                //    paperName = "MZYB";
                //}

                Neusoft.HISFC.Object.Base.PageSize ps = new Neusoft.HISFC.Object.Base.PageSize(paperName, 0, 0);
                ////纸张宽度
                //ps.Width = this.Width;
                ////纸张高度
                //ps.Height = this.Height;
                ps.Printer = "MZBLB";
                //上边距
                ps.Top = 0;
                //左边距
                ps.Left = 0;
                print.SetPageSize(ps);
                print.PrintPage(0, 0, this);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
Ejemplo n.º 10
0
        public int Print()
        {
            Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();
            Neusoft.HISFC.Object.Base.PageSize  ps    = new Neusoft.HISFC.Object.Base.PageSize("ZYYJ", 0, 0);
            //Neusoft.HISFC.Object.Base.PageSize ps = new Neusoft.HISFC.Object.Base.PageSize();
            ////纸张宽度
            //ps.Width = this.Width;
            ////纸张高度
            //ps.Height = this.Height;
            ////上边距


            ps.Top = 0;
            //左边距


            ps.Left = 0;
            print.SetPageSize(ps);
            print.PrintPage(0, 0, this);
            return(1);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 打印
        /// </summary>
        /// <returns></returns>
        public int Print()
        {
            try
            {
                Neusoft.NFC.Interface.Classes.Print print = null;
                Neusoft.HISFC.Object.Base.PageSize  ps    = null;
                try
                {
                    print = new Neusoft.NFC.Interface.Classes.Print();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("初始化打印机失败!" + ex.Message);

                    return(-1);
                }
                string paperName = string.Empty;
                //if (this.InvoiceType == "ZY02")
                //{
                paperName = "ZYFP";

                //}
                //else if (this.InvoiceType == "ZY01")
                //{
                //    paperName = "ZYYB";
                //}
                ps      = new Neusoft.HISFC.Object.Base.PageSize(paperName, 0, 0);
                ps.Top  = 0;
                ps.Left = 0;
                print.SetPageSize(ps);
                print.PrintPage(0, 0, this);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(1);
            }

            return(1);
        }
Ejemplo n.º 12
0
        public int Print()
        {
            try
            {
                Neusoft.NFC.Interface.Classes.Print print = null;
                try
                {
                    print = new Neusoft.NFC.Interface.Classes.Print();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("初始化打印机失败!" + ex.Message);

                    return(-1);
                }

                Neusoft.HISFC.Object.Base.PageSize ps = new Neusoft.HISFC.Object.Base.PageSize("MZGH", 0, 0);
                ////纸张宽度
                //ps.Width = this.Width;
                ////纸张高度
                //ps.Height = this.Height;
                ps.Printer = "MZGH";
                //上边距
                ps.Top = 0;
                //左边距
                ps.Left = 0;
                print.SetPageSize(ps);
                print.PrintPage(0, 0, this);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(1);
            }

            return(1);
        }
Ejemplo n.º 13
0
 /// <summary>
 ///打印报表
 /// </summary>
 /// <param name="argPanel"></param>
 public void PrintPanel(System.Windows.Forms.Panel argPanel)
 {
     Neusoft.NFC.Interface.Classes.Print print = new Neusoft.NFC.Interface.Classes.Print();
     print.PrintPage(0, 0, this.panel3);
 }
Ejemplo n.º 14
0
        /// <summary>
        /// 打印
        /// </summary>
        private void PrintOrder()
        {
            Neusoft.NFC.Interface.Classes.Print pf = new Neusoft.NFC.Interface.Classes.Print();

            if (this.tabControl1.SelectedIndex == 0)
            {
                //pf.PageLabel = (Control)this.lblPage;
                this.SetLongRePrint(false);
                //this.sheetLong.RowCount = 0;
                int pageCount = Neusoft.NFC.Function.NConvert.ToInt32(alLongPrint.Count / this.intLineNum);
                for (int iPage = 0; iPage < pageCount; iPage++)
                {
                    Neusoft.NFC.Management.PublicTrans.BeginTransaction();

                    orderBillManager.SetTrans(Neusoft.NFC.Management.PublicTrans.Trans);
                    this.sheetLong.RowCount = 0;
                    bool needPrint = false;
                    for (int i = 0; i < intLineNum; i++)
                    {
                        sheetLong.Rows.Add(i, 1);
                        Neusoft.HISFC.Object.Order.Inpatient.Order ord = null;

                        try
                        {
                            ord = alLongPrint[i + iPage * intLineNum] as Neusoft.HISFC.Object.Order.Inpatient.Order;
                        }
                        catch
                        { }
                        if (ord != null && ord.ID != null && ord.ID != "")
                        {
                            Neusoft.HISFC.Object.Order.OrderBill orderBill = new Neusoft.HISFC.Object.Order.OrderBill();
                            orderBill = orderBillManager.GetOrderBillByOrderID(ord.ID);
                            if (Neusoft.NFC.Function.NConvert.ToBoolean(orderBill.PrintFlag))
                            {
                                this.sheetLong.SetValue(i, 0, "");
                                this.sheetLong.SetValue(i, 1, "");
                                this.sheetLong.SetValue(i, 2, "");
                                this.sheetLong.SetValue(i, 3, "");
                                this.sheetLong.SetValue(i, 4, "");
                                this.sheetLong.SetValue(i, 5, "");
                                this.sheetLong.SetValue(i, 6, "");
                                this.sheetLong.SetValue(i, 7, "");
                                this.sheetLong.SetValue(i, 8, "");
                                this.sheetLong.SetValue(i, 9, "");
                                this.sheetLong.SetValue(i, 10, "");
                            }
                            else
                            {
                                needPrint = true;
                                this.sheetLong.SetValue(i, 0, ord.BeginTime.Month.ToString() + "." + ord.BeginTime.Day.ToString());//.ToShortDateString());
                                sheetLong.SetValue(i, 1, ord.BeginTime.ToShortTimeString());
                                sheetLong.SetValue(i, 2, ord.Item.Name + "  " + ord.Frequency.Name + "  " + ord.Usage.Name);
                                sheetLong.SetValue(i, 3, ord.ReciptDoctor.Name);
                                sheetLong.SetValue(i, 4, ord.Nurse.Name);
                                sheetLong.SetValue(i, 5, ord.ConfirmTime);

                                if (ord.EndTime != DateTime.MinValue)
                                {
                                    sheetLong.SetValue(i, 6, ord.EndTime.Month.ToString() + "." + ord.EndTime.Day.ToString());
                                    sheetLong.SetValue(i, 7, ord.EndTime.ToShortTimeString());//.ExecOper.OperTime.ToShortTimeString());
                                    sheetLong.SetValue(i, 8, ord.DCOper.Name);
                                    sheetLong.SetValue(i, 9, ord.ExecOper.Name);
                                    sheetLong.SetValue(i, 10, ord.ExecOper.OperTime.ToShortTimeString());
                                }
                                else
                                {
                                    this.sheetLong.SetValue(i, 6, "");
                                    this.sheetLong.SetValue(i, 7, "");
                                    this.sheetLong.SetValue(i, 8, "");
                                    this.sheetLong.SetValue(i, 9, "");
                                    this.sheetLong.SetValue(i, 10, "");
                                }

                                int myLineNo = 0;
                                int myPageNo = 0;
                                int myPrnSeq = 0;
                                this.orderBillManager.GetLastOrderBillArg(this.pInfo.ID, orderBill.Order.OrderType.ID, out myPrnSeq, out myPageNo, out myLineNo);

                                if (myPageNo > 0)
                                {
                                    if (myLineNo < this.intLineNum)
                                    {
                                        myLineNo = i + 1;
                                    }
                                    else
                                    {
                                        myLineNo = i + 1;
                                        myPageNo = iPage + 1;
                                        this.SetLongRePrint(false);
                                    }
                                }
                                else
                                {
                                    myLineNo = i + 1;
                                    myPageNo = 1;
                                    this.SetLongRePrint(false);
                                }
                                if (Neusoft.NFC.Function.NConvert.ToBoolean(orderBill.PrintDCFlag) && orderBill.PageNO > 0)
                                {
                                    this.sheetLong.SetValue(i, 0, "");
                                    this.sheetLong.SetValue(i, 1, "");
                                    this.sheetLong.SetValue(i, 2, "");
                                    this.sheetLong.SetValue(i, 3, "");
                                    this.sheetLong.SetValue(i, 4, "");
                                    this.sheetLong.SetValue(i, 5, "");
                                }
                                if (orderBill.PageNO == 0)
                                {
                                    if (orderBillManager.UpdateLineNoPageNo(ord.ID, myLineNo, myPageNo) < 0)
                                    {
                                        Neusoft.NFC.Management.PublicTrans.RollBack();
                                        MessageBox.Show(Neusoft.NFC.Management.Language.Msg("更新医嘱单行号、页码失败!" + orderBillManager.Err));
                                        return;
                                    }
                                }

                                if (orderBillManager.UpdatePrnFlag(ord.ID, "1") < 0)
                                {
                                    Neusoft.NFC.Management.PublicTrans.RollBack();
                                    MessageBox.Show(Neusoft.NFC.Management.Language.Msg("更新医嘱单打印标志失败!" + orderBillManager.Err));
                                    return;
                                }
                            }
                        }
                        else
                        {
                            this.sheetLong.SetValue(i, 0, "");
                            this.sheetLong.SetValue(i, 1, "");
                            this.sheetLong.SetValue(i, 2, "");
                            this.sheetLong.SetValue(i, 3, "");
                            this.sheetLong.SetValue(i, 4, "");
                            this.sheetLong.SetValue(i, 5, "");
                            this.sheetLong.SetValue(i, 6, "");
                            this.sheetLong.SetValue(i, 7, "");
                            this.sheetLong.SetValue(i, 8, "");
                            this.sheetLong.SetValue(i, 9, "");
                            this.sheetLong.SetValue(i, 10, "");
                        }
                    }
                    //this.neuLabel15.Text = "第";
                    //this.neuLabel19.Text = "页";
                    this.lblPage.Text = "第" + (iPage + 1).ToString() + "页";
                    if (needPrint)
                    {
                        pf.PrintPreview(this.plLong);
                    }
                    Neusoft.NFC.Management.PublicTrans.Commit();
                }
            }
            else
            {
                //pf.PageLabel = (Control)this.lblPages;
                this.SetShortRePrint(false);
                this.sheetShort.RowCount = 0;
                int pageCount = Neusoft.NFC.Function.NConvert.ToInt32(alShortPrint.Count / this.intLineNum);
                for (int iPage = 0; iPage < pageCount; iPage++)
                {
                    Neusoft.NFC.Management.PublicTrans.BeginTransaction();

                    orderBillManager.SetTrans(Neusoft.NFC.Management.PublicTrans.Trans);
                    bool needPrint = false;
                    for (int i = 0; i < intLineNum; i++)
                    {
                        sheetShort.Rows.Add(i, 1);
                        Neusoft.HISFC.Object.Order.Inpatient.Order ord = null;

                        try
                        {
                            ord = alShortPrint[i + iPage * intLineNum] as Neusoft.HISFC.Object.Order.Inpatient.Order;
                        }
                        catch
                        { }

                        if (ord != null && ord.ID != null && ord.ID != "")
                        {
                            Neusoft.HISFC.Object.Order.OrderBill orderBill = new Neusoft.HISFC.Object.Order.OrderBill();
                            orderBill = orderBillManager.GetOrderBillByOrderID(ord.ID);
                            if (Neusoft.NFC.Function.NConvert.ToBoolean(orderBill.PrintFlag))
                            {
                                this.sheetShort.SetValue(i, 0, "");
                                this.sheetShort.SetValue(i, 1, "");
                                this.sheetShort.SetValue(i, 2, "");
                                this.sheetShort.SetValue(i, 3, "");
                                this.sheetShort.SetValue(i, 4, "");
                                this.sheetShort.SetValue(i, 5, "");
                                this.sheetShort.SetValue(i, 6, "");
                                this.sheetShort.SetValue(i, 7, "");
                                this.sheetShort.SetValue(i, 8, "");
                            }
                            else
                            {
                                needPrint = true;
                                sheetShort.Rows.Add(i, 1);
                                this.sheetShort.SetValue(i, 0, ord.BeginTime.ToShortDateString());
                                sheetShort.SetValue(i, 1, ord.BeginTime.ToShortTimeString());
                                sheetShort.SetValue(i, 2, ord.Item.Name + "  " + ord.Frequency.Name + "  " + ord.Usage.Name);
                                sheetShort.SetValue(i, 3, ord.ReciptDoctor.Name);
                                sheetShort.SetValue(i, 4, ord.BeginTime);
                                sheetShort.SetValue(i, 5, ord.ExecOper.Name);
                                sheetShort.SetValue(i, 6, ord.EndTime.ToShortDateString());
                                sheetShort.SetValue(i, 7, ord.EndTime.ToShortTimeString());

                                int myLineNo = 0;
                                int myPageNo = 0;
                                int myPrnSeq = 0;
                                this.orderBillManager.GetLastOrderBillArg(this.pInfo.ID, orderBill.Order.OrderType.ID, out myPrnSeq, out myPageNo, out myLineNo);

                                if (myPageNo > 0)
                                {
                                    if (i < this.intLineNum)
                                    {
                                        myLineNo = i + 1;
                                    }
                                    else
                                    {
                                        myLineNo = i + 1;
                                        myPageNo = iPage + 1;
                                        this.SetShortRePrint(false);
                                    }
                                }
                                else
                                {
                                    myLineNo = i + 1;
                                    myPageNo = 1;
                                    this.SetShortRePrint(false);
                                }
                                if (orderBill.PageNO == 0)
                                {
                                    if (orderBillManager.UpdateLineNoPageNo(ord.ID, myLineNo, myPageNo) < 0)
                                    {
                                        Neusoft.NFC.Management.PublicTrans.RollBack();
                                        MessageBox.Show(Neusoft.NFC.Management.Language.Msg("更新医嘱单行号、页码失败!" + orderBillManager.Err));
                                        return;
                                    }
                                }
                                if (orderBillManager.UpdatePrnFlag(ord.ID, "1") < 0)
                                {
                                    Neusoft.NFC.Management.PublicTrans.RollBack();
                                    MessageBox.Show(Neusoft.NFC.Management.Language.Msg("更新医嘱单打印标志失败!" + orderBillManager.Err));
                                    return;
                                }
                            }
                        }
                        else
                        {
                            this.sheetShort.SetValue(i, 0, "");
                            this.sheetShort.SetValue(i, 1, "");
                            this.sheetShort.SetValue(i, 2, "");
                            this.sheetShort.SetValue(i, 3, "");
                            this.sheetShort.SetValue(i, 4, "");
                            this.sheetShort.SetValue(i, 5, "");
                            this.sheetShort.SetValue(i, 6, "");
                            this.sheetShort.SetValue(i, 7, "");
                            this.sheetShort.SetValue(i, 8, "");

                            this.SetShortRePrint(false);
                        }
                    }
                    this.lblPages.Text = "第" + (iPage + 1).ToString() + "页";
                    if (needPrint)
                    {
                        pf.PrintPreview(this.plShort);
                    }
                    Neusoft.NFC.Management.PublicTrans.Commit();
                }
            }

            this.SetShortRePrint(false);
            this.SetLongRePrint(false);
            this.SetPatient(this.pInfo);
        }