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);
                }
            }
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }