private void buttonLogin_Click(object sender, EventArgs e) { if (textBoxUserName.Text == "") { labelUserNameError.Visible = true; } else { labelUserNameError.Visible = false; } if (textBoxPassword.Text == "") { labelPasswordError.Visible = true; } else { labelPasswordError.Visible = false; } if (labelUserNameError.Visible || labelPasswordError.Visible) { MainClass.ShowMessage("Fields with * are mandatory", "Error", "Error"); //Error is the type of message. } else { if (Retrievel.GetUserDetails(textBoxUserName.Text, textBoxPassword.Text)) { HomeScreen obj = new HomeScreen(); MainClass.ShowWindow(obj, this, MDI.ActiveForm); } } }
private void POReport_Load(object sender, EventArgs e) { ControlBox = true; Retrievel retrieve = new Retrievel(); crystalReportViewer2.AllowedExportFormats = (int)(ViewerExportFormats.ExcelRecordFormat | ViewerExportFormats.PdfFormat); rd = new ReportDocument(); retrieve.ShowonCrystalReport(rd, crystalReportViewer2, "Usp_CreatePOPDFReport", "@PoNumber", PO); }
private void ReceivingReport_Load(object sender, EventArgs e) { ControlBox = true; crystalReportViewer2.AllowedExportFormats = (int)(ViewerExportFormats.ExcelRecordFormat | ViewerExportFormats.PdfFormat); Retrievel retrieve = new Retrievel(); rd = new ReportDocument(); retrieve.ShowonCrystalReportPOReceiving(rd, crystalReportViewer2, "Usp_CreateReceivPDFReport", "@RecivId", ReceiveId); }
private void SalesReport_Load(object sender, EventArgs e) { ControlBox = true; crystalReportViewer2.AllowedExportFormats = (int)(ViewerExportFormats.ExcelRecordFormat | ViewerExportFormats.PdfFormat); Retrievel retrieve = new Retrievel(); rd = new ReportDocument(); retrieve.ShowonCrystalReportSalesInvoice(rd, crystalReportViewer2, "Usp_CreatePOSalesPDFReport", "@SalesNumber", saleId); }