Exemplo n.º 1
0
        private void ViewReceipt_Load(object sender, EventArgs e)
        {
            GetCompanyInfo();
            // frmSystemSetting obj = (System.Windows.Forms.Application.OpenForms["frmSystemSetting"] as frmSystemSetting);
            frmPOS     p  = (System.Windows.Forms.Application.OpenForms["frmPOS"] as frmPOS);
            frmPayment p1 = (System.Windows.Forms.Application.OpenForms["frmPayment"] as frmPayment);

            try {
                txtPhoneNo = p1.Usphone;
            }
            catch (Exception ex)
            {
            }
            // TODO: This line of code loads data into the 'reciept.DataTable1' table. You can move, or remove it, as needed.

            this.DataTable1TableAdapter.Fill(this.reciept.DataTable1, "" + p.InvoiceNo);

            DateTime        now       = DateTime.Now;
            ReportParameter startDate = new ReportParameter("Date", now.ToLongDateString());

            ReportParameter phone   = new ReportParameter("phone", txtPhoneNo);
            ReportParameter email   = new ReportParameter("email", txtEmail);
            ReportParameter address = new ReportParameter("address", txtAddress);
            ReportParameter website = new ReportParameter("website", txtWebsite);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { startDate, phone, email, address, website });
            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 2
0
        private void btnSettlepayment_Click(object sender, EventArgs e)
        {
            if (Conversion.Val(lblTotalAmount.Text.Replace(",", "")) < 1)
            {
                Interaction.MsgBox("No transaction to be paid.", MsgBoxStyle.Exclamation, "Payment");
                txtBarcode.Focus();
                return;
            }
            frmPayment p = new frmPayment(lblInvoice.Text, Convert.ToDouble(lblTotalAmount.Text.Replace(",", "")));

            p.ShowDialog();
        }
Exemplo n.º 3
0
        private void button6_Click(object sender, EventArgs e)
        {
            double total_price = calculateprice();

            //  int invoice = Convert.ToInt32(invoiceno.Text);

            if (dataGridView1.Rows.Count == 0)
            {
                MessageBox.Show("Please Add product");
            }
            else
            {
                frmPayment frmpayment = new frmPayment(InvoiceNo, total_price);
                frmpayment.Show();
            }
        }