Exemplo n.º 1
0
        private void butLabelSingle_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select patient(s) first.");
                return;
            }
            int    patientsPrinted = 0;
            string text;

            for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
            {
                text = "";
                //print single label
                DataRow curRow = (DataRow)gridMain.SelectedGridRows[i].Tag;
                text  = curRow["FName"].ToString() + " " + curRow["LName"].ToString() + "\r\n";
                text += curRow["address"].ToString() + "\r\n";
                text += curRow["City"].ToString() + ", " + curRow["State"].ToString() + " " + curRow["Zip"].ToString() + "\r\n";
                LabelSingle.PrintText(0, text);
                patientsPrinted++;
            }
        }
Exemplo n.º 2
0
        private void butLabelSingle_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select patient(s) first.");
                return;
            }
            int    patientsPrinted = 0;
            string text;

            for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
            {
                text = "";
                //print single label
                text = table.Rows[gridMain.SelectedIndices[i]]["FName"].ToString() + " "
                       + table.Rows[gridMain.SelectedIndices[i]]["LName"].ToString() + "\r\n";
                text += table.Rows[gridMain.SelectedIndices[i]]["address"].ToString() + "\r\n";
                text += table.Rows[gridMain.SelectedIndices[i]]["cityStZip"].ToString() + "\r\n";
                LabelSingle.PrintText(0, text);
                patientsPrinted++;
            }
        }