コード例 #1
0
        // print button
        private void button1_Click(object sender, EventArgs e)
        {
            string mTitle = "Salary Sheate";

            string[] uTitles = new string[1];
            string[] lTitles = new string[1];

            uTitles[0] = dtpStartDate.Value.ToString("dd MMMM yyyy (dddd)") +
                         " - " +
                         dtpEndDate.Value.ToString("dd MMMM yyyy (dddd)");

            lTitles[0] = "Total Amount : Rs. " + this.txtTAmount.Text;


            printer prnt = new printer(mTitle, uTitles, dgvRes, lTitles);

            prnt.print();
        }
コード例 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            printer prnt = new printer(mainTitle, upperTitles, dgvRes, lowerTitles);

            prnt.print();
        }