Subversion Repository Public Repository

ChrisCompleteCodeTrunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

using Telerik.Reporting;
using LPD;

namespace Action_Tire_Payment_Processor
{
    public partial class ReceiptForm : Form
    {
        int RecID = -1;
        bool Loyalty = false;
        public bool invoice = false;

        public ReceiptForm(int RecID, bool Loyalty, bool roa, bool noPrint, bool invoice)
        {
            InitializeComponent();
            //UriReportSource rs = new UriReportSource();
            //rs.Uri = "ATC Receipt.trdx";
            //rs.Parameters.Add(new Telerik.Reporting.Parameter("ID", RecID));
            //reportViewer1.ReportSource = rs;
            this.RecID = RecID;
            this.Loyalty = Loyalty;
            if (Loyalty)
            {
                labelResponse.Visible = false;
                lblResponse2.Visible = false;
                lblResponse.Visible = false;
                labelAuthCode.Visible = false;
                lblAuthCode.Visible = false;
                lblResponse.Text = "SUCCESS";
                lblResponse.Visible = true;
            }

            if(invoice == true && noPrint == false)
                PrintMe();
        }

        private void btnOkay_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        public void PrintMe()
        {
            ReceiptPreview rp = Loyalty ? new ReceiptPreview(RecID, Loyalty, lblType.Text) : new ReceiptPreview(RecID, false, "");
            //rp.ShowDialog();
            rp.PrintMe();
            rp.Dispose();
            rp = null;
        }

        private void ReceiptForm_Load(object sender, EventArgs e)
        {
            //this.reportViewer1.RefreshReport();
        }

        private void btnOkay_Click_1(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnPrint_Click_1(object sender, EventArgs e)
        {
            ReceiptPreview rp = Loyalty ? new ReceiptPreview(RecID, Loyalty, lblType.Text) : new ReceiptPreview(RecID, false, "");
            //rp.ShowDialog();
            rp.PrintMe();
            rp.Dispose();
            rp = null;
        }
    }
}

Commits for ChrisCompleteCodeTrunk/ATTP/ATPP_New/ReceiptForm.cs

Diff revisions: vs.
Revision Author Commited Message
1 BBDSCHRIS picture BBDSCHRIS Wed 22 Aug, 2018 20:08:03 +0000