Exemplo n.º 1
0
        private void txtQZID_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                string keyString = txtQZID.Text;
                var    model     = visaORM.Customer.FirstOrDefault(c => c.FAutoID == keyString || c.FPassportNo == keyString);
                if (model == null)
                {
                    MessageBox.Show("找不到对应的签证");
                    return;
                }


                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
                MainPreview.Model = new XtraReportPreviewModel(report);



                //Report.ReportTable1 report = new Report.ReportTable1();
                //report.FilterString = "FAutoID = " + model.FID + " or FPassportNo =  '" + model.FPassportNo + "'";

                MainPreview.Model = new XtraReportPreviewModel(report);


                report.CreateDocument();
            }
        }
Exemplo n.º 2
0
        private void txtPrintSingle_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, this.txtPrintSingle.Text);

                DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
                pt.Print();
                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(this.txtPrintSingle.Text));
            }
        }
Exemplo n.º 3
0
        public Report1(string printID)
        {
            InitializeComponent();
            string keyString = printID;
            var model = visaORM.Customer.FirstOrDefault(c => c.FAutoID == keyString || c.FPassportNo == keyString);
            if (model == null)
            {
                MessageBox.Show("找不到对应的签证");
                return;
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
            MainPreview.Model = new XtraReportPreviewModel(report);

            report.CreateDocument();
        }
Exemplo n.º 4
0
        public Report1(string printID)
        {
            InitializeComponent();
            string keyString = printID;
            var    model     = visaORM.Customer.FirstOrDefault(c => c.FAutoID == keyString || c.FPassportNo == keyString);

            if (model == null)
            {
                MessageBox.Show("找不到对应的签证");
                return;
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
            MainPreview.Model = new XtraReportPreviewModel(report);


            report.CreateDocument();
        }
Exemplo n.º 5
0
        public Report1(List <string> printID)
        {
            InitializeComponent();

            string keyString = "";

            foreach (string autoID in printID)
            {
                keyString += autoID + ",";
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
            MainPreview.Model = new XtraReportPreviewModel(report);

            DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
            pt.Print();

            report.CreateDocument();
        }
Exemplo n.º 6
0
        public Report1(List<string> printID)
        {
            InitializeComponent();

            string keyString = "";

            foreach (string autoID in printID)
            {
                keyString +=  autoID + ",";
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
            MainPreview.Model = new XtraReportPreviewModel(report);

            DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
            pt.Print();

            report.CreateDocument();
        }
Exemplo n.º 7
0
        void printVisa()
        {
            try
            {
                if (cbSubmitList.SelectedItem == null)
                {
                    MessageBox.Show("请先选择已提交名单");
                    return;
                }

                string submitNo  = cbSubmitList.SelectedItem.ToString();
                string keyString = "";


                var visaModelArray = visaORM.TB_TableSubmit.Where(s => s.FSubmitNo == submitNo);
                //List<string> ids = new List<string>();
                foreach (var visaModel in visaModelArray)
                {
                    keyString += visaModel.FAutoID + ",";
                    //ids.Add(visaModel.FAutoID);
                }

                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(ids));


                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);

                DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
                pt.Print();

                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report2(MainContext.UserCompanyName, newSubmitNo));
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
                Log.WriteLog.WriteErorrLog(ex);
            }
        }
Exemplo n.º 8
0
        private void txtPrintSingle_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, this.txtPrintSingle.Text);

                DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
                pt.Print();
                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(this.txtPrintSingle.Text));

            }
        }
Exemplo n.º 9
0
        void printVisa()
        {
            try
            {
                if (cbSubmitList.SelectedItem == null)
                {
                    MessageBox.Show("请先选择已提交名单");
                    return;
                }

                string submitNo = cbSubmitList.SelectedItem.ToString();
                string keyString = "";

                var visaModelArray = visaORM.TB_TableSubmit.Where(s => s.FSubmitNo == submitNo);
                //List<string> ids = new List<string>();
                foreach (var visaModel in visaModelArray)
                {
                    keyString += visaModel.FAutoID + ",";
                    //ids.Add(visaModel.FAutoID);
                }

                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(ids));

                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);

                DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
                pt.Print();

                //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report2(MainContext.UserCompanyName, newSubmitNo));
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
                Log.WriteLog.WriteErorrLog(ex);
            }
        }
Exemplo n.º 10
0
        private void txtQZID_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                string keyString = txtQZID.Text;
                var model = visaORM.Customer.FirstOrDefault(c => c.FAutoID == keyString || c.FPassportNo == keyString);
                if (model == null)
                {
                    MessageBox.Show("找不到对应的签证");
                    return;
                }

                Report.ReportTable1 report = new Report.ReportTable1();
                report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);
                MainPreview.Model = new XtraReportPreviewModel(report);

                //Report.ReportTable1 report = new Report.ReportTable1();
                //report.FilterString = "FAutoID = " + model.FID + " or FPassportNo =  '" + model.FPassportNo + "'";

                MainPreview.Model = new XtraReportPreviewModel(report);

                report.CreateDocument();
            }
        }
Exemplo n.º 11
0
        private void printSingle()
        {
            //跳到预览
            //if (!string.IsNullOrEmpty(model.FAutoID))
            //{
            //    (App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(this.txtAutoID.Text));
            //}
            //else
            //{
            //    MessageBox.Show("请输入选中一条数据,或者保存");
            //}

            string keyString = this.model.FAutoID;
            var model = visaORM.Customer.FirstOrDefault(c => c.FAutoID == keyString);
            if (model == null)
            {
                MessageBox.Show("找不到对应的签证,可能你还未保存");
                return;
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);

            DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
            pt.Print();
        }
Exemplo n.º 12
0
        private void printAll()
        {
            //(App.Current.Windows[1] as MainWindow).MainFrame.Navigate(new Report1(printID));

            string keyString = "";

            foreach (var obj in customerList)
            {
                keyString += obj.FAutoID + ",";
            }

            Report.ReportTable1 report = new Report.ReportTable1();
            report.sp_SelectPrintSendInfoTableAdapter.Fill(report.sp_SelectTable1ForPrint1._sp_SelectTable1ForPrint, keyString);

            DevExpress.XtraReports.UI.ReportPrintTool pt = new DevExpress.XtraReports.UI.ReportPrintTool(report);
            pt.Print();
        }