Exemplo n.º 1
0
        private void dgvReceiptAndPayment_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var rp = dgvReceiptAndPayment.SelectedItem as BLL.ReceiptAndPayment;

            if (rp != null)
            {
                if (rp.EType == 'P')
                {
                    Transaction.frmPayment f = new Transaction.frmPayment();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.SearchText = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
                else if (rp.EType == 'R')
                {
                    Transaction.frmReceipt f = new Transaction.frmReceipt();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.SearchText = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
                else if (rp.EType == 'J')
                {
                    Transaction.frmJournal f = new Transaction.frmJournal();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.SearchText = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
            }
        }
        private void dgvDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var rp = dgvDetails.SelectedItem as BLL.VoucherReport;

            if (rp != null)
            {
                if (rp.EType == "P")
                {
                    Transaction.frmPayment f = new Transaction.frmPayment();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.EntryNo = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
                else if (rp.EType == "R")
                {
                    Transaction.frmReceipt f = new Transaction.frmReceipt();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.EntryNo = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
                else if (rp.EType == "J")
                {
                    Transaction.frmJournal f = new Transaction.frmJournal();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.EntryNo = rp.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                }
            }
        }
        private void dgvActivityReport_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var gl = dgvActivityReport.SelectedItem as BLL.GeneralLedger;

            if (gl != null)
            {
                if (gl.EType != null)
                {
                    if (gl.EType.StartsWith(BLL.FormPrefix.Payment))
                    {
                        Transaction.frmPayment f = new Transaction.frmPayment();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;
                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                    }
                    else if (gl.EType.StartsWith(BLL.FormPrefix.Receipt))
                    {
                        Transaction.frmReceipt f = new Transaction.frmReceipt();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;
                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                    }
                    else if (gl.EType.StartsWith(BLL.FormPrefix.Journal))
                    {
                        Transaction.frmJournal f = new Transaction.frmJournal();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;

                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                    }
                }
                else
                {
                    Transaction.frmJournal f = new Transaction.frmJournal();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.EntryNo = gl.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                    f.btnPrint.IsEnabled = true;
                }
            }
        }
Exemplo n.º 4
0
        private void dgvDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var rp = dgvDetails.SelectedItem as BLL.Receipt;

            if (rp != null)
            {
                Transaction.frmReceipt f = new Transaction.frmReceipt();
                App.frmHome.ShowForm(f);
                System.Windows.Forms.Application.DoEvents();
                f.data.EntryNo = rp.EntryNo;
                f.data.Find();
                System.Windows.Forms.Application.DoEvents();
                this.Close();
            }
        }
        private void dgvDetail_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var gl = dgvDetail.SelectedItem as BLL.ExpenseReport;

            if (gl != null && gl.EntryNo != null)
            {
                if (gl.EType != null)
                {
                    if (gl.EType.StartsWith(BLL.FormPrefix.Payment))
                    {
                        Transaction.frmPayment f = new Transaction.frmPayment();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;
                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                        if (f.data.RefCode != null)
                        {
                            f.btnSave.IsEnabled   = false;
                            f.btnDelete.IsEnabled = false;
                        }
                    }
                    else if (gl.EType.StartsWith(BLL.FormPrefix.Receipt))
                    {
                        Transaction.frmReceipt f = new Transaction.frmReceipt();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;
                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                        if (f.data.RefCode != null)
                        {
                            f.btnSave.IsEnabled   = false;
                            f.btnDelete.IsEnabled = false;
                        }
                    }
                    else if (gl.EType.StartsWith(BLL.FormPrefix.Journal))
                    {
                        Transaction.frmJournal f = new Transaction.frmJournal();
                        App.frmHome.ShowForm(f);
                        System.Windows.Forms.Application.DoEvents();
                        f.data.EntryNo = gl.EntryNo;
                        System.Windows.Forms.Application.DoEvents();
                        f.data.Find();
                        f.btnPrint.IsEnabled = true;
                        if (f.data.RefCode != null)
                        {
                            f.btnSave.IsEnabled   = false;
                            f.btnDelete.IsEnabled = false;
                        }
                    }
                }
                else
                {
                    Transaction.frmJournal f = new Transaction.frmJournal();
                    App.frmHome.ShowForm(f);
                    System.Windows.Forms.Application.DoEvents();
                    f.data.EntryNo = gl.EntryNo;
                    System.Windows.Forms.Application.DoEvents();
                    f.data.Find();
                    f.btnPrint.IsEnabled = true;
                    //if (f.data.RefCode != null)
                    //{
                    //    f.btnSave.IsEnabled = false;
                    //    f.btnDelete.IsEnabled = false;
                    //}
                }
            }
        }