コード例 #1
0
ファイル: AARDS14.cs プロジェクト: oopsha/eldorado-rms-backup
        /// <summary>
        /// 프린터버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnInfoPrint_Click(object sender, EventArgs e)
        {
            try
            {
                if (dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다.");
                    return;
                }

                if (Basic.ShowMessageQuestion("출력하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                if (f != null && f.IsHandleCreated)
                {
                    f.Activate();
                    return;
                }

                for (int nCnt = 0; nCnt < dt.Rows.Count; nCnt++)
                {
                    if (dt.Rows[nCnt]["CHK"].ToString() == "N")
                    {
                        continue;
                    }

                    string    appno   = dt.Rows[nCnt]["APPLICATION_NO"].ToString();
                    DataTable dtparam = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtparam.Rows.Add(new object[] { "V_APPLICATION_NO", appno });
                    DataSet ds = DataLayer.ExecuteSpDataset("PKG_AARDS14.PR_02", dtparam, DataLayer.MessageEncoding.Default);

                    if (ds.Tables[0].Rows.Count <= 0)
                    {
                        continue;
                    }

                    //DxReport 추가
                    f = new XtraReportsBase.DxReport.XtraPreviewForm();
                    DevExpress.XtraReports.UI.XtraReport rptSale = new Erp.SubdivisionSale.AARA.Report.AARDP14();
                    f.ShowReportPrint(ds, rptSale, 1);
                }
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
            }
        }
コード例 #2
0
ファイル: AARAS01.cs プロジェクト: oopsha/eldorado-rms-backup
        /// <summary>
        /// 프린터버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnContractPrint_Click(object sender, EventArgs e)
        {
            try
            {
                if (dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다.");
                    return;
                }

                if (Basic.MaskReplace(dtpPrintDate.Text.ToString().Trim()) == "")
                {
                    Basic.ShowMessage(1, "출력일자가 없습니다.");
                    dtpPrintDate.Focus();
                    return;
                }

                if (Basic.ShowMessageQuestion("출력하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                if (f != null && f.IsHandleCreated)
                {
                    f.Activate();
                    return;
                }
                string    appno   = this.gridView.GetRowCellValue(this.gridView.FocusedRowHandle, "APPLICATION_NO").ToString().Trim();
                DataTable dtparam = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtparam.Rows.Add(new object[] { "V_APPLICATION_NO", appno });
                dtparam.Rows.Add(new object[] { "V_PRINT_DATE", Basic.MaskReplace(dtpPrintDate.Text.ToString().Trim()) });
                DataSet ds = DataLayer.ExecuteSpDataset("PKG_AARAS01_01.PR_01", dtparam, DataLayer.MessageEncoding.Default);

                if (ds.Tables[0].Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다");
                    return;
                }

                ds.Tables[0].TableName = "SALE";
                ds.Tables[1].TableName = "OPER";

                //DxReport 추가
                f = new XtraReportsBase.DxReport.XtraPreviewForm();
                DevExpress.XtraReports.UI.XtraReport rptSale = new Erp.SubdivisionSale.AARA.Report.AARAP01_01();
                f.ShowReportPrint(ds, rptSale, 4);
                //f.ShowReport(ds, rptSale);
                //f.Show();

                //DxReport 추가
                f1 = new XtraReportsBase.DxReport.XtraPreviewForm();
                DevExpress.XtraReports.UI.XtraReport rptOper = new Erp.SubdivisionSale.AARA.Report.AARAP01_02();
                f1.ShowReportPrint(ds, rptOper, 4);
                //f1.ShowReport(ds, rptOper);
                //f1.Show();
            }

            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }

            finally
            {
                Basic.SetCursor(this, true);
            }
        }
コード例 #3
0
        private void btnCardPrintAll_Click(object sender, EventArgs e)
        {
            try
            {
                if (dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다.");
                    return;
                }

                if (Basic.ShowMessageQuestion("출력하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                if (f != null && f.IsHandleCreated)
                {
                    f.Activate();
                    return;
                }

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataTable dtPrint = new DataTable();
                    dtPrint.Columns.Add("ASSIGN_ROOM_NO");              //객실번호
                    dtPrint.Columns.Add("ROOM_TYPE");                   //room_type
                    dtPrint.Columns.Add("ROOM_TYPE_NAME");              //room_tyupe_name
                    dtPrint.Columns.Add("APP_AMT");                     // 객실요금
                    dtPrint.Columns.Add("CHECKIN_DATE");                // 도착일자
                    dtPrint.Columns.Add("CHECKOUT_DATE");               // 출발일
                    dtPrint.Columns.Add("GUEST_NAME");                  // 투숙객명
                    dtPrint.Columns.Add("GUEST_ADDRESS");               // 주소
                    dtPrint.Columns.Add("GUEST_ID_NO");                 // 주민번호
                    dtPrint.Columns.Add("COMPANY_NAME");                // 회사명
                    dtPrint.Columns.Add("GUEST_TEL_NO");                // 전화번호
                    dtPrint.Columns.Add("MOBILE_TEL");                  // 휴대전화
                    dtPrint.Columns.Add("EMAIL");                       // EMAIL
                    //int _iRow = this.gridView.GetDataSourceRowIndex(this.gridView.FocusedRowHandle);
                    dtPrint.Rows.Add(new object[] { dt.Rows[i]["ASSIGN_ROOM_NO"].ToString()
                                                    , dt.Rows[i]["ROOM_TYPE"].ToString()
                                                    , dt.Rows[i]["ROOM_TYPE_NAME"].ToString()
                                                    , dt.Rows[i]["APP_AMT"].ToString()
                                                    , dt.Rows[i]["CHECKIN_DATE"].ToString()
                                                    , dt.Rows[i]["CHECKOUT_DATE"].ToString()
                                                    , dt.Rows[i]["GUEST_NAME"].ToString()
                                                    , dt.Rows[i]["GUEST_ADDRESS"].ToString()
                                                    , dt.Rows[i]["GUEST_ID_NO"].ToString()
                                                    , dt.Rows[i]["COMPANY_NAME"].ToString()
                                                    , dt.Rows[i]["GUEST_TEL_NO"].ToString()
                                                    , dt.Rows[i]["MOBILE_TEL"].ToString()
                                                    , dt.Rows[i]["EMAIL"].ToString() });

                    DataSet dsTemp = new DataSet();
                    dsTemp.Tables.AddRange(new DataTable[] { dtPrint });

                    f = new XtraReportsBase.DxReport.XtraPreviewForm();
                    DevExpress.XtraReports.UI.XtraReport rpt = new Erp.Reservation.CBRA.Report.CBRAP04_02();
                    rpt.PrinterName = "CardPrinter";
                    f.ShowReportPrint(dsTemp, rpt, 1);
                }
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
            }
        }
コード例 #4
0
        /// <summary>
        /// 프린터버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnMemberPrint_Click(object sender, EventArgs e)
        {
            try
            {
                if (dt.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다.");
                    return;
                }

                if (Basic.MaskReplace(dtpPrintDate.Text.ToString().Trim()) == "")
                {
                    Basic.ShowMessage(1, "출력일자가 없습니다.");
                    dtpPrintDate.Focus();
                    return;
                }

                if (Basic.ShowMessageQuestion("출력하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                if (f != null && f.IsHandleCreated)
                {
                    f.Activate();
                    return;
                }

                DataTable dtparam = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                DataSet   ds      = new DataSet();
                for (int nCnt = 0; nCnt < dt.Rows.Count; nCnt++)
                {
                    if (dt.Rows[nCnt]["CHECK_YN"].ToString() == "N")
                    {
                        continue;
                    }
                    string printDate   = ((DateTime)this.dtpPrintDate.EditValue).ToString("yyyyMMdd");
                    string memberSeq   = this.dt.Rows[nCnt]["MEMBER_SEQ"].ToString();
                    string certIssueNo = this.dt.Rows[nCnt]["CERT_ISSUE_NO"].ToString();
                    string ceoName     = Parm.CurrentUserInformation.BizInfo.CeoName;

                    dtparam.Clear();
                    dtparam.Rows.Add(new object[] { "V_MEMBER_SEQ", memberSeq });
                    dtparam.Rows.Add(new object[] { "V_PRINT_DATE", printDate });
                    dtparam.Rows.Add(new object[] { "V_CERT_ISSUE_NO", certIssueNo });
                    dtparam.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    ds = DataLayer.ExecuteSpDataset("PKG_AEAAI11.PR_01", dtparam.Copy(), DataLayer.MessageEncoding.Default);

                    ds.Tables[1].TableName = "MEMBERPRINT";

                    int ceoNameLen = ceoName.Length;

                    for (int i = ceoNameLen - 1; i > 0; i--)
                    {
                        ceoName = ceoName.Insert(i, " ");
                    }

                    DataTable dtTemp = new DataTable("dtVar");
                    dtTemp.Columns.Add("CEO_NAME");
                    dtTemp.Rows.Add(new object[] { ceoName });
                    ds.Tables.Add(dtTemp);

                    //DxReport 추가
                    f = new XtraReportsBase.DxReport.XtraPreviewForm();
                    DevExpress.XtraReports.UI.XtraReport rptMemberPrint = new Erp.SubdivisionSale.AEAA.Report.AEAAP11();
                    f.ShowReportPrint(ds, rptMemberPrint, 1);

                    //f = new XtraReportsBase.DxReport.XtraPreviewForm();
                    //DevExpress.XtraReports.UI.XtraReport rptMemberPrint = new Erp.SubdivisionSale.AEAA.Report.AEAAP11();
                    //f.ShowReport(ds, rptMemberPrint);
                    //f.Show();
                }
            }

            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }

            finally
            {
                Basic.SetCursor(this, true);
            }
        }
コード例 #5
0
        private void bill_Print_Card(string _strTaskDate, string _strBizCode, string _strFacilityCode, string _strBillNo, string _strPaySeq, string _strMngNo, string _strMngSeq)
        {
            try
            {
                string strBizCode = Parm.CurrentUserInformation.BizInfo.BizCode;

                DataSet ds = null;

                DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtParm.Rows.Add(new object[] { "V_SALE_DATE", _strTaskDate });
                dtParm.Rows.Add(new object[] { "V_BIZ_CODE", _strBizCode });
                dtParm.Rows.Add(new object[] { "V_FACILITY_CODE", _strFacilityCode });
                dtParm.Rows.Add(new object[] { "V_POS_NO", "01" });
                dtParm.Rows.Add(new object[] { "V_BILL_NO", _strBillNo });
                dtParm.Rows.Add(new object[] { "V_AGREE_YN", "N" });
                dtParm.Rows.Add(new object[] { "V_PAY_SEQ", "" });

                ds = DataLayer.ExecuteSpDataset("PKG_DAZAZ02.PR_CARD_SELECT", dtParm, DataLayer.MessageEncoding.Default);

                DataTable dtCard = new DataTable();
                dtCard.Load(ds.Tables[0].CreateDataReader());

                DataTable dtTitle = new DataTable("dtTitle");

                dtTitle.Columns.Add("ROOM_NO");
                dtTitle.Columns.Add("GUEST_NAME");
                dtTitle.Columns.Add("AMT", typeof(decimal));
                dtTitle.Columns.Add("CHECKOUT_DATE");
                dtTitle.Columns.Add("ROOM_TYPE");
                dtTitle.Columns.Add("MEMBER_NO");
                dtTitle.Columns.Add("MOBILE_TEL");
                dtTitle.Columns.Add("CHECKIN_DATE");

                DataSet dst = null;

                DataTable dtParmT = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtParmT.Rows.Add(new object[] { "V_MNG_NO", _strMngNo });
                dtParmT.Rows.Add(new object[] { "V_MNG_SEQ", _strMngSeq });
                dtParmT.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                dtParmT.Rows.Add(new object[] { "V_FACILITY_CODE", Parm.CurrentUserInformation.roomTask.gsDFacility });

                if (strBizCode == "20")
                {
                    dst = DataLayer.ExecuteSpDataset("PKG_DAHAH23.PR_04", dtParmT, DataLayer.MessageEncoding.Default);
                }
                else
                {
                    dst = DataLayer.ExecuteSpDataset("PKG_DAHDH23.PR_04", dtParmT, DataLayer.MessageEncoding.Default);
                }

                dtTitle.Clear();
                dtTitle.Load(dst.Tables[0].CreateDataReader());

                #region 레포트이용
                if (Parm.CurrentUserInformation.roomTask.gsPrintMode == PrintMode.DRIVER)
                {
                    // 신용카드영수증 출력
                    DevExpress.XtraReports.UI.XtraReport rpt = null;

                    if (Parm.CurrentUserInformation.BizInfo.BizCode == "22141")
                    {
                    }
                    else
                    {
                        rpt = new Erp.Room.DAHA.Report.DAHAP23_03();
                    }

                    DataTable dttmp = new DataTable();
                    dttmp.Columns.Add("PRINT_YN");
                    dttmp.Columns.Add("BIZ_CODE");
                    dttmp.Columns.Add("MNG_NO");
                    dttmp.Columns.Add("MNG_SEQ", typeof(decimal));
                    dttmp.Columns.Add("TASK_DATE");
                    dttmp.Columns.Add("KEY_SEQ", typeof(decimal));
                    dttmp.Columns.Add("CARD_NO");
                    dttmp.Columns.Add("RAISE_CODE_NAME");
                    dttmp.Columns.Add("AGREE_NO");
                    dttmp.Columns.Add("CARD_CO_NAME");
                    dttmp.Columns.Add("INSTALLMENT_CNT", typeof(decimal));
                    dttmp.Columns.Add("SALE_AMT", typeof(decimal));
                    dttmp.Columns.Add("CARD_JOIN_NO");
                    dttmp.Columns.Add("VALID_THRU");

                    dttmp.Rows.Add(new Object[] { "Y"
                                                  , dtCard.Rows[0]["BIZ_CODE"]
                                                  , _strMngNo
                                                  , Int32.Parse(_strMngSeq)
                                                  , dtCard.Rows[0]["TASK_DATE"]
                                                  , dtCard.Rows[0]["KEY_SEQ"]
                                                  , dtCard.Rows[0]["CARD_NO"]
                                                  , ""
                                                  , dtCard.Rows[0]["AGREE_NO"]
                                                  , dtCard.Rows[0]["CARD_CO_NAME"]
                                                  , dtCard.Rows[0]["INSTALLMENT_CNT"]
                                                  , dtCard.Rows[0]["SALE_AMT"]
                                                  , dtCard.Rows[0]["CARD_JOIN_NO"]
                                                  , dtCard.Rows[0]["VALID_THRU"] });

                    DataTable dtSign     = new DataTable("dtSign");
                    DataTable dtParmsign = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParmsign.Rows.Add(new object[] { "V_SALE_DATE", dtCard.Rows[0]["TASK_DATE"].ToString().Replace("-", "").Trim() });
                    dtParmsign.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtParmsign.Rows.Add(new object[] { "V_FACILITY_CODE", Parm.CurrentUserInformation.roomTask.gsDFacility });
                    dtParmsign.Rows.Add(new object[] { "V_PAY_SEQ", dtCard.Rows[0]["KEY_SEQ"] });

                    DataSet dssign = DataLayer.ExecuteSpDataset("PKG_DAHAH23.PR_05", dtParmsign, DataLayer.MessageEncoding.Default);
                    dtSign.Load(dssign.Tables[0].CreateDataReader());

                    //int prtcnt = dtSign.Rows.Count > 0 ? 1 : 2;
                    DataSet dsTemp = new DataSet();
                    dsTemp.Tables.AddRange(new DataTable[] { dttmp.Copy(), dtTitle.Copy(), dtSign.Copy() });

                    frmReport = new XtraReportsBase.DxReport.XtraPreviewForm();

                    //frmReport.ShowReport(dsTemp, rpt);  // FREEVIEW
                    //frmReport.Show();
                    rpt.PrinterName = Parm.CurrentUserInformation.roomTask.TSP800;
                    frmReport.ShowReportPrint(dsTemp, rpt, 1); // 출력
                    if (dtSign.Rows.Count <= 0)
                    {
                        frmReport.ShowReportPrint(dsTemp, rpt, 1); // 출력
                    }
                }
                #endregion

                //////////////////////////////////////////////////////////////////////////////////////////////////

                #region 시리얼프린트사용
                //영수증 프린터
                if (Parm.CurrentUserInformation.roomTask.gsPrintMode == PrintMode.SERIALPORT)
                {
                    using (Bill_Print bill = new Bill_Print(Parm.CurrentUserInformation.roomTask.SerialPrintStyle))
                    {
                        bill.PortNum  = int.Parse(Parm.CurrentUserInformation.roomTask.SerialPrintInfo.ComPort.Trim().ToUpper().Replace("COM", ""));
                        bill.Parity   = Parm.CurrentUserInformation.roomTask.SerialPrintInfo.Parity;
                        bill.StopBit  = Parm.CurrentUserInformation.roomTask.SerialPrintInfo.StopBit;
                        bill.DataBit  = int.Parse(Parm.CurrentUserInformation.roomTask.SerialPrintInfo.DataBit);
                        bill.BaudRate = int.Parse(Parm.CurrentUserInformation.roomTask.SerialPrintInfo.BaundRate);

                        bill.SetCenter();
                        bill.SetHW2();
                        bill.Add("신용카드 영수증");
                        bill.ClearFontSize();
                        bill.NewLine();
                        bill.Add("(보관용)");
                        bill.NewLine();
                        bill.SetLeft();
                        bill.NewLine();

                        bill.Add("사업자 번호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.BizNo);
                        bill.NewLine();
                        bill.Add("상       호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.BizName);
                        bill.NewLine();
                        bill.Add("대 표 자 명 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.CeoName);
                        bill.NewLine();
                        bill.Add("전 화 번 호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.TelNo1);
                        bill.NewLine();
                        string   StrAddr = Parm.CurrentUserInformation.BizInfo.Address;
                        string[] addrs   = bill.Split42byte(StrAddr);
                        for (int j = 0; j < addrs.Length; j++)
                        {
                            bill.Add(addrs[j]);
                            bill.NewLine();
                        }

                        bill.NewLine();
                        bill.AddDoubleLine();
                        bill.NewLine();
                        bill.NewLine();

                        bill.Add("카드종류 : " + dtCard.Rows[0]["CARD_CO_NAME"].ToString().Trim()); bill.NewLine();
                        bill.Add("카드번호 : " + dtCard.Rows[0]["CARD_NO"].ToString().Trim()); bill.NewLine();
                        bill.Add("유효기간 : " + dtCard.Rows[0]["VALID_THRU"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인일자 : " + dtCard.Rows[0]["TASK_DATE"].ToString().Trim()); bill.NewLine();
                        bill.Add("할부기간 : " + dtCard.Rows[0]["INSTALLMENT_CNT"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인번호 : " + dtCard.Rows[0]["AGREE_NO"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인금액 : " + int.Parse(dtCard.Rows[0]["SALE_AMT"].ToString().Trim()).ToString("n0")); bill.NewLine();
                        bill.Add("가맹번호 : " + dtCard.Rows[0]["CARD_JOIN_NO"].ToString().Trim()); bill.NewLine(); bill.NewLine();

                        DataTable dtParmsign = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                        dtParmsign.Rows.Add(new object[] { "V_SALE_DATE", dtCard.Rows[0]["TASK_DATE"].ToString().Replace("-", "").Trim() });
                        dtParmsign.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                        dtParmsign.Rows.Add(new object[] { "V_FACILITY_CODE", Parm.CurrentUserInformation.roomTask.gsDFacility });
                        dtParmsign.Rows.Add(new object[] { "V_PAY_SEQ", dtCard.Rows[0]["KEY_SEQ"] });

                        DataSet dssign = DataLayer.ExecuteSpDataset("PKG_DAHAH23.PR_05", dtParmsign, DataLayer.MessageEncoding.Default);
                        //dtSign.Load(dssign.Tables[0].CreateDataReader());


                        if (dssign.Tables[0].Rows.Count == 0)
                        //if (DBNull.Value.Equals(dtSign.Rows[0]["SIGN_IMG"]))
                        {
                            bill.AddDoubleLine();
                            bill.NewLine();
                            bill.Add("서명 : ");
                            bill.NewLine();
                            bill.NewLine();
                            bill.NewLine();
                            bill.NewLine();
                            bill.NewLine();
                        }
                        else
                        {
                            //byte[] bSign = (byte[])dssign.Tables[0].Rows[i]["SIGN_IMG"];

                            byte[] bSign = (byte[])dssign.Tables[0].Rows[0]["SIGN_IMG"];

                            if (bSign != null && bSign.Length >= 1086)
                            {
                                bill.AddDoubleLine();
                                bill.NewLine();
                                bill.AddSignData(bSign);
                                bill.NewLine();
                                bill.NewLine();
                                bill.NewLine();
                                bill.NewLine();
                                bill.NewLine();
                            }
                        }

                        bill.Add(bill.GetCut());
                        bill.Send(bill.GetInitPrinter());
                        bill.Send(bill.SendData);

                        //if (dssign.Tables[0].Rows.Count == 0)
                        //{
                        //고객용 영수증 출력 //대천 무조건 2장씩 출력..요즘 편의점도 1장만 출력 하는구만..ㅠㅠ
                        #region Sign 정보가 없을시 고객용 출력
                        //Sign 정보가 없을시 고객용 출력
                        bill.Clear();

                        // 고객용.
                        bill.SetCenter();
                        bill.SetHW2();
                        bill.Add("신용카드 영수증");
                        bill.ClearFontSize();
                        bill.NewLine();
                        bill.Add("(고객용)");
                        bill.NewLine();
                        bill.SetLeft();
                        bill.NewLine();

                        bill.Add("사업자 번호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.BizNo);
                        bill.NewLine();
                        bill.Add("상       호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.BizName);
                        bill.NewLine();
                        bill.Add("대 표 자 명 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.CeoName);
                        bill.NewLine();
                        bill.Add("전 화 번 호 : ");
                        bill.Add(Parm.CurrentUserInformation.BizInfo.TelNo1);
                        bill.NewLine();

                        for (int j = 0; j < addrs.Length; j++)
                        {
                            bill.Add(addrs[j]);
                            bill.NewLine();
                        }

                        bill.NewLine();
                        bill.AddDoubleLine();
                        bill.NewLine();
                        bill.NewLine();

                        bill.Add("카드종류 : " + dtCard.Rows[0]["CARD_CO_NAME"].ToString().Trim()); bill.NewLine();
                        bill.Add("카드번호 : " + dtCard.Rows[0]["CARD_NO"].ToString().Trim()); bill.NewLine();
                        bill.Add("유효기간 : " + dtCard.Rows[0]["VALID_THRU"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인일자 : " + dtCard.Rows[0]["TASK_DATE"].ToString().Trim()); bill.NewLine();
                        bill.Add("할부기간 : " + dtCard.Rows[0]["INSTALLMENT_CNT"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인번호 : " + dtCard.Rows[0]["AGREE_NO"].ToString().Trim()); bill.NewLine();
                        bill.Add("승인금액 : " + int.Parse(dtCard.Rows[0]["SALE_AMT"].ToString().Trim()).ToString("n0")); bill.NewLine();
                        bill.Add("가맹번호 : " + dtCard.Rows[0]["CARD_JOIN_NO"].ToString().Trim()); bill.NewLine(); bill.NewLine();

                        bill.AddDoubleLine();
                        bill.NewLine();
                        bill.Add("서명 : ");
                        bill.NewLine();
                        bill.NewLine();
                        bill.NewLine();
                        bill.NewLine();
                        bill.NewLine();

                        bill.Add(bill.GetCut());
                        bill.Send(bill.GetInitPrinter());
                        bill.Send(bill.SendData);
                        #endregion
                        //}


                        bill.Clear();

                        //메모리소멸 프린트 /  시리얼개체소멸
                        bill.Dispose();
                    }
                }
                #endregion
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
コード例 #6
0
        /// <summary>
        /// 입금표버튼을 눌렀을 경우
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAmtPrint_Click(object sender, EventArgs e)
        {
            try
            {
                if (dt.Rows.Count <= 0 || this.gridView.FocusedRowHandle < 0)
                {
                    Basic.ShowMessage(1, "출력할 데이터가 없습니다.");
                    return;
                }

                if (!ISCheckData(JobStyle.INSERT))
                {
                    return;
                }


                if (Basic.ShowMessageQuestion("출력하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                Basic.SetCursor(this, false);

                if (f != null && f.IsHandleCreated)
                {
                    f.Activate();
                    return;
                }

                DataTable dtparam = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                for (int nCnt = 0; nCnt < dt.Rows.Count; nCnt++)
                {
                    if (dt.Rows[nCnt]["CHECK_YN"].ToString() == "N")
                    {
                        continue;
                    }
                    string applicationno = dt.Rows[nCnt]["APPLICATION_NO"].ToString().Trim();             //this.gridView.GetRowCellValue(this.gridView.FocusedRowHandle, "APPLICATION_NO").ToString().Trim();
                    string partitioncode = dt.Rows[nCnt]["PARTITION_CODE"].ToString().Trim();             //this.gridView.GetRowCellValue(this.gridView.FocusedRowHandle, "PARTITION_CODE").ToString().Trim();
                    string plandate      = dt.Rows[nCnt]["PLAN_DATE"].ToString().Trim().Replace("-", ""); //this.gridView.GetRowCellValue(this.gridView.FocusedRowHandle, "PLAN_DATE").ToString().Trim();
                    string amtment01     = this.txtMent01.Text.ToString().Trim();
                    string amtment02     = this.txtMent02.Text.ToString().Trim();
                    string amtment03     = this.txtMent03.Text.ToString().Trim();
                    string amtment04     = this.txtMent04.Text.ToString().Trim();
                    string amtment11     = this.txtMent11.Text.ToString().Trim();
                    string amtment12     = this.txtMent12.Text.ToString().Trim();
                    string amtment13     = this.txtMent13.Text.ToString().Trim();
                    string amtment14     = this.txtMent14.Text.ToString().Trim();

                    dtparam.Clear();
                    dtparam.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                    dtparam.Rows.Add(new object[] { "V_APPLICATION_NO", applicationno });
                    dtparam.Rows.Add(new object[] { "V_PARTITION_CODE", partitioncode });
                    dtparam.Rows.Add(new object[] { "V_PLAN_DATE", plandate });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT01", amtment01 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT02", amtment02 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT03", amtment03 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT04", amtment04 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT11", amtment11 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT12", amtment12 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT13", amtment13 });
                    dtparam.Rows.Add(new object[] { "V_AMT_MENT14", amtment14 });


                    string pkgname = "PKG_AARCS03_01.PR_01";     //버튼 : 중도금안내(선택)

                    DevExpress.XtraEditors.SimpleButton btnedit = (SimpleButton)sender;
                    if (btnedit.Name == "btnAmtPrintSum")
                    {
                        pkgname = "PKG_AARCS03_01.PR_02";        //버튼 : 중도금안내(합계)
                    }

                    DataSet ds = DataLayer.ExecuteSpDataset(pkgname, dtparam.Copy(), DataLayer.MessageEncoding.Default);

                    if (ds.Tables[0].Rows.Count <= 0)
                    {
                        Basic.ShowMessage(1, "출력할 데이터가 없습니다");
                        return;
                    }

                    ds.Tables[0].TableName = "Amt1";
                    ds.Tables[1].TableName = "Amt2";

                    //DxReport 추가
                    f = new XtraReportsBase.DxReport.XtraPreviewForm();
                    DevExpress.XtraReports.UI.XtraReport rpt = new Erp.SubdivisionSale.AARA.Report.AARCP03_01();

                    if (chkAmtPrintView.Checked == false)
                    {
                        f.ShowReportPrint(ds, rpt, 1);
                    }
                    else
                    {
                        f.ShowReport(ds, rpt);
                        f.Show();
                    }
                }
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }

            finally
            {
                Basic.SetCursor(this, true);
            }
        }