Beispiel #1
0
        public void printPreview()
        {
            MySqlDataReader _reader = csm.sqlCommand("Select file_name from attachment where attachCode = '" + lblGenRecNo.Text + "'").ExecuteReader();

            while (_reader.Read())
            {
                attachment += _reader.GetString("file_name") + ", ";
            }
            for (int i = 0; i < tblPenalty.Rows.Count; i++)
            {
                section   += "<b>" + tblPenalty.Rows[i].Cells[1].Value.ToString() + ": </b> &quot;" + tblPenalty.Rows[i].Cells[2].Value.ToString() + "&quot;<br>";
                paragraph += tblPenalty.Rows[i].Cells[2].Value.ToString() + "\n";
            }

            fillRecipients(lblGenRecNo.Text);
            using (printPreview pp = new printPreview(bsRecepients.DataSource as List <recepients>))
            {
                pp.retrieveNarrativeData(fillNarrativeValue());
                pp.ShowDialog();
            }

            attachment = "";
            section    = "";
            paragraph  = "";
        }
Beispiel #2
0
        public void printPreview()
        {
            MySqlDataReader _reader = csm.sqlCommand("Select file_name from attachment where attachCode = '" + txtMemoNo.Text + "'").ExecuteReader();

            while (_reader.Read())
            {
                attachment += _reader.GetString("file_name") + ", ";
            }
            for (int i = 0; i < tblPenalty.Rows.Count; i++)
            {
                thisviolation += tblPenalty.Rows[i].Cells[1].Value.ToString() + "\n";
            }
            using (printPreview pp = new printPreview(bsReceipients.DataSource as List <recepients>))
            {
                pp.retrieveNarrativeData(fillManagementDecisionValue());
                pp.ShowDialog();
            }
        }