Пример #1
0
        public void ShowPaymentReviewReport()
        {
            _branchId = GlobalVariableBO._branchId;
            _fromDate = Convert.ToDateTime(dtpFrom.Value.ToShortDateString());
            _toDate   = Convert.ToDateTime(dtpTO.Value.ToShortDateString());
            PaymentReviewBAL       paymentBAL      = new PaymentReviewBAL();
            DataTable              dtPaymentReview = new DataTable();
            crPaymentReview1       crPayment       = new crPaymentReview1();
            frmPaymenrReportViewer paymentViewer   = new frmPaymenrReportViewer();
            LoadCommonInfo         CmmInfo         = new LoadCommonInfo();

            dtPaymentReview = paymentBAL.GneratePaymentReview(_fromDate, _toDate);

            //_filterdColumnName = dtPaymentReview.Columns[1].ToString();
            //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.Review_Report_Payment_Review);
            //dtPaymentReview = obj.GetRecordLevelFilteredData();

            crPayment.SetDataSource(dtPaymentReview);

            ///// Load Company Name
            ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();

            ///// Load Branch Name
            ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
            ////Load Date
            if (_fromDate != null && _toDate != null)
            {
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "From " + _fromDate.ToShortDateString() + " To " + _toDate.ToShortDateString();
            }
            paymentViewer.crvPaymentReview.ReportSource = crPayment;
            paymentViewer.Show();
        }
Пример #2
0
        private void btnShow_Click(object sender, EventArgs e)
        {
            crToday_Transactions_Customer_List objRPT        = new crToday_Transactions_Customer_List();
            frmPaymenrReportViewer             paymentViewer = new frmPaymenrReportViewer();
            DataTable dt = new DataTable();

            dt = objBAL.Today_Transactions_Customer(dtpToday.Value);
            objRPT.SetDataSource(dt);
            ((TextObject)objRPT.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
            ((TextObject)objRPT.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = _branchName + "," + _branchAddress + ",Phone: " + _branchContactNumber;
            ((TextObject)objRPT.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text   = dtpToday.Value.ToString("dd-MMM-yyyy");
            paymentViewer.crvPaymentReview.ReportSource = objRPT;
            paymentViewer.Show();
        }
        private void GetNewPaymentReview()
        {
            try
            {
                PaymentReviewBAL       paymentBAL      = new PaymentReviewBAL();
                DataTable              dtPaymentReview = new DataTable();
                cr_NewPaymentReview    crPayment       = new cr_NewPaymentReview();
                frmPaymenrReportViewer paymentViewer   = new frmPaymenrReportViewer();
                LoadCommonInfo         CmmInfo         = new LoadCommonInfo();

                int issorted       = 0;
                int isAccountsView = 0;

                if (chbOder.Checked)
                {
                    issorted = 1;
                }
                else
                {
                    issorted = 0;
                }

                dtPaymentReview = paymentBAL.GnerateNewPaymentReview(dtpFromDate.Value, dtpToDate.Value, issorted);

                _filterdColumnName = dtPaymentReview.Columns[1].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.New_Payment_Review);
                dtPaymentReview = obj.GetRecordLevelFilteredData();

                crPayment.SetDataSource(dtPaymentReview);

                GetCommonInfo();
                ///// Load Company Name
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;

                ///// Load Branch Name
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text = _branchName + "," + _branchAddress + ",Phone: " + _branchContactNumber;

                ////Load Date
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtFromDate"]).Text = dtpFromDate.Value.ToString("dd-MMM-yyyy") + " To " + dtpToDate.Value.ToString("dd-MMM-yyyy");

                paymentViewer.crvPaymentReview.DisplayGroupTree = false;
                paymentViewer.crvPaymentReview.ReportSource     = crPayment;
                paymentViewer.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void btn_PaymentReveiw_Click(object sender, EventArgs e)
        {
            try
            {
                if (txt_Reason.Text == string.Empty)
                {
                    MessageBox.Show("You Should Writed Down The Reason");
                    return;
                }

                Admin_Alternative_Report_Bal paymentBAL = new Admin_Alternative_Report_Bal();
                DataTable              dtPaymentReview  = new DataTable();
                cr_NewPaymentReview    crPayment        = new cr_NewPaymentReview();
                frmPaymenrReportViewer paymentViewer    = new frmPaymenrReportViewer();
                LoadCommonInfo         CmmInfo          = new LoadCommonInfo();

                int issorted       = 0;
                int isAccountsView = 0;

                if (chk_SortedByCustCode.Checked)
                {
                    issorted = 1;
                }
                else
                {
                    issorted = 0;
                }

                if (chk_AccountView.Checked)
                {
                    isAccountsView = 1;
                }
                else
                {
                    isAccountsView = 0;
                }


                dtPaymentReview = paymentBAL.GnerateNewPaymentReview(dtp_PaymentReview_FromDate.Value, dtp_PaymentReveiw_ToDate.Value, issorted, isAccountsView);

                _filterdColumnName = dtPaymentReview.Columns[1].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.New_Payment_Review);
                dtPaymentReview = obj.GetRecordLevelFilteredData();

                crPayment.SetDataSource(dtPaymentReview);

                GetCommonInfo();
                ReportName = "PaymentReviewSorted";
                ///// Load Company Name
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;

                ///// Load Branch Name
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text = _branchName + "," + _branchAddress + ",Phone: " + _branchContactNumber;

                ////Load Date
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtFromDate"]).Text = dtp_PaymentReview_FromDate.Value.ToString("dd-MMM-yyyy") + " To " + dtp_PaymentReveiw_ToDate.Value.ToString("dd-MMM-yyyy");

                paymentViewer.crvPaymentReview.DisplayGroupTree = false;
                paymentViewer.crvPaymentReview.ReportSource     = crPayment;
                paymentViewer.Show();
                InsertLog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }