private void OnLabels_Click() { if (gridMain.SelectedIndices.Length == 0) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } PrintDocument pd = new PrintDocument(); //only used to pass printerName if (!Printers.SetPrinter(pd, PrintSituation.LabelSingle)) { return; } Carrier carrier; Claim claim; InsPlan plan; for (int i = 0; i < gridMain.SelectedIndices.Length; i++) { claim = Claims.GetClaim(listQueue[gridMain.SelectedIndices[i]].ClaimNum); plan = InsPlans.GetPlan(claim.PlanNum, new InsPlan[] {}); carrier = Carriers.GetCarrier(plan.CarrierNum); LabelSingle label = new LabelSingle(); if (!label.PrintIns(carrier, pd.PrinterSettings.PrinterName)) { return; } } }
private void butLabelRef_Click(object sender, EventArgs e) { LabelSingle label = new LabelSingle(); label.PrintReferral(ReferralCur); DialogResult = DialogResult.Cancel; //because there's no need to refresh ContrAccount }
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++; } }
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++; } }
private void menuEmail_Click(object sender,System.EventArgs e) { if(((MenuItem)sender).Tag==null){ return; } LabelSingle label=new LabelSingle(); if(((MenuItem)sender).Tag.GetType()==typeof(Referral)) { Referral refer=(Referral)((MenuItem)sender).Tag; if(refer.EMail==""){ return; //MsgBox.Show(this,""); } EmailMessage message=new EmailMessage(); message.PatNum=CurPatNum; Patient pat=Patients.GetPat(CurPatNum); message.ToAddress=refer.EMail;//pat.Email; message.FromAddress=PrefC.GetString(PrefName.EmailSenderAddress); message.Subject=Lan.g(this,"RE: ")+pat.GetNameFL(); FormEmailMessageEdit FormE=new FormEmailMessageEdit(message); FormE.IsNew=true; FormE.ShowDialog(); if(FormE.DialogResult==DialogResult.OK) { RefreshCurrentModule(); } } }