private void btnPrintEditor_Click(object sender, EventArgs e) { if (LUESaf.EditValue == null || LUEFasl.EditValue == null) { MessageBox.Show("من فضلك اختار الصف و الفصل"); return; } XRepCardFront front = new XRepCardFront(LUESaf.EditValue.ToString(), LUEFasl.EditValue.ToString()); Misc.Misc.ShowPrintPreview(front); XRepCardBack back = new XRepCardBack(LUESaf.EditValue.ToString(), LUEFasl.EditValue.ToString()); Misc.Misc.ShowPrintPreview(front); }
private void btnPrint_Click(object sender, EventArgs e) { if ((LUESaf.EditValue == null || LUEFasl.EditValue == null) && lueSNAME.EditValue == null) { MessageBox.Show("من فضلك اختار الصف و الفصل"); return; } if (lueSNAME.EditValue != null) { XRepCardFront front = new XRepCardFront(Convert.ToInt32(lueSNAME.EditValue)); Misc.Misc.ShowPrintPreview(front); XRepCardBack back = new XRepCardBack(Convert.ToInt32(lueSNAME.EditValue)); Misc.Misc.ShowPrintPreview(back); } else { XRepCardFront front = new XRepCardFront(LUESaf.EditValue.ToString(), LUEFasl.EditValue.ToString()); Misc.Misc.ShowPrintPreview(front); XRepCardBack back = new XRepCardBack(LUESaf.EditValue.ToString(), LUEFasl.EditValue.ToString()); Misc.Misc.ShowPrintPreview(back); } }