Exemplo n.º 1
0
        public void ShowCustShareLedgerReport()
        {
            _branchId       = GlobalVariableBO._branchId;
            _shareSummery   = rdoShareSummery.Checked;
            _Details        = rdoDetailShareLedger.Checked;
            _SpecificPeriod = rdoSpecificPeriodShareLedger.Checked;
            _fromDate       = Convert.ToDateTime(dtFromDate.Value.ToShortDateString());
            _toDate         = Convert.ToDateTime(dtToDate.Value.ToShortDateString());
            _custCode       = txtCustCode.Text;
            ShareLedgerBAL shareLedgerBal = new ShareLedgerBAL();

            _maxPriceDate = shareLedgerBal.GetMaxPriceDate();
            LoadCommonInfo CmmInfo = new LoadCommonInfo();

            if (_shareSummery)
            {
                ShowPortFolioReportInvestorWise();
            }
            else if (_Details)
            {
                crShareDetails     crShareDetail     = new crShareDetails();
                ShareDetailsViewer shareDetailViewer = new ShareDetailsViewer();
                DataTable          dtShareDetails    = new DataTable();
                string             Temp_Custcode     = "";

                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(ResourceName.Customer_Share_Ledger_Share_Portfolio_Details_Specific_Period);
                Temp_Custcode = obj.FilterCustCode(_custCode, ResourceName.Customer_Share_Ledger_Share_Portfolio_Details_Specific_Period);

                dtShareDetails = shareLedgerBal.GetShareDetails(Temp_Custcode);


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

                ///// Load Branch Name
                ((TextObject)crShareDetail.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                shareDetailViewer.crvShareDetailsReportViewer.ReportSource = crShareDetail;
                shareDetailViewer.Show();
            }

            else if (_SpecificPeriod)
            {
                //crSpecificShareLedger crSpecificShare = new crSpecificShareLedger();
                crShareDetails            crSpecificShare           = new crShareDetails();
                SpecificShareLedgerViewer specificShareLedgerViewer = new SpecificShareLedgerViewer();
                DataTable dtSpecificShareLedger = new DataTable();
                string    Temp_Custcode         = "";
                RecordLevelFilteringBAL obj     = new RecordLevelFilteringBAL(ResourceName.Customer_Share_Ledger_Share_Portfolio_Details_Specific_Period);
                Temp_Custcode         = obj.FilterCustCode(_custCode, ResourceName.Customer_Share_Ledger_Share_Portfolio_Details_Specific_Period);
                dtSpecificShareLedger = shareLedgerBal.GetSpecificShareLedger(Temp_Custcode, _fromDate, _toDate);

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

                ///// Load Branch Name
                ((TextObject)crSpecificShare.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                ((TextObject)crSpecificShare.ReportDefinition.Sections[2].ReportObjects["txtduration"]).Text   = "Duration : " + dtFromDate.Value.ToString("dd-MMM-yyyy") + " To " + dtToDate.Value.ToString("dd-MMM-yyyy");
                specificShareLedgerViewer.crvSpecificShareLedgerReportViewer.ReportSource = crSpecificShare;
                specificShareLedgerViewer.Show();
            }
            else
            {
                MessageBox.Show("Please Select the report category first.");
            }
        }
Exemplo n.º 2
0
        private void ReportView()
        {
            try
            {
                CompanyBAL             objCompanyBal       = new CompanyBAL();
                PaymentReviewBAL       paymentBAL          = new PaymentReviewBAL();
                DataTable              dtPaymentReview     = new DataTable();
                crPaymentReview1       crPayment           = new crPaymentReview1();
                frmPaymenrReportViewer paymentViewer       = new frmPaymenrReportViewer();
                LoadCommonInfo         CmmInfo             = new LoadCommonInfo();
                BranchManagementBAL    objBranchManagement = new BranchManagementBAL();

                dtPaymentReview = paymentBAL.GneratePaymentReviewByBranchWise(dtpFromDate.Value, dtpToDate.Value);

                //_filterdColumnName = dtPaymentReview.Columns[1].ToString();
                //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.Branch_wise_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 = objCompanyBal.GetHeadofficeInfo();
                ////Load Date
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Review Duration: " + dtpFromDate.Value.ToString("dd-MM-yyyy") + " " + dtpToDate.Value.ToString("dd-MM-yyyy");
                ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranch"]).Text         = "Branch : " + objBranchManagement.GetBranchName();

                paymentViewer.crvPaymentReview.ReportSource = crPayment;
                paymentViewer.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 3
0
        private void ShowReport()
        {
            _branchId      = GlobalVariableBO._branchId;
            _paymentDate   = Convert.ToDateTime(dtPaymentDate.Value.ToShortDateString());
            _clientVoucher = rdoClinetVoucher.Checked;
            _officevoucher = rdoOfficevoucher.Checked;
            VoucherPrintingBAL voucherPrintingBal = new VoucherPrintingBAL();
            DataTable          dtVoucherPrint     = new DataTable();
            LoadCommonInfo     CmmInfo            = new LoadCommonInfo();

            if (_clientVoucher)
            {
                crClientVoucher             crClientvoucher             = new crClientVoucher();
                ClientVoucherPrintingViewer clientVoucherPrintingViewer = new ClientVoucherPrintingViewer();
                dtVoucherPrint = voucherPrintingBal.GetClientVoucher(_paymentDate);
                crClientvoucher.SetDataSource(dtVoucherPrint);
                ///// Load Company Name
                ((TextObject)crClientvoucher.ReportDefinition.Sections[3].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();

                ///// Load Branch Name
                ((TextObject)crClientvoucher.ReportDefinition.Sections[3].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                clientVoucherPrintingViewer.crvClientVoucherViewer.ReportSource = crClientvoucher;
                clientVoucherPrintingViewer.Show();
            }
            else if (_officevoucher)
            {
                crOfficeVoucher             crOfficevoucher             = new crOfficeVoucher();
                OfficeVoucherPrintingViewer officeVoucherPrintingViewer = new OfficeVoucherPrintingViewer();
                dtVoucherPrint = voucherPrintingBal.GetClientVoucher(_paymentDate);
                crOfficevoucher.SetDataSource(dtVoucherPrint);
                ///// Load Company Name
                ((TextObject)crOfficevoucher.ReportDefinition.Sections[3].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();

                ///// Load Branch Name
                ((TextObject)crOfficevoucher.ReportDefinition.Sections[3].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                officeVoucherPrintingViewer.crvOfficeVoucherViewer.ReportSource = crOfficevoucher;
                officeVoucherPrintingViewer.Show();
            }
            else
            {
                MessageBox.Show("Please Select the report category first.");
            }
        }
Exemplo n.º 4
0
        public void ShowClientConfirmationReport()
        {
            _branchId        = GlobalVariableBO._branchId;
            _viewReport      = rdoViewReport.Checked;
            _printClientCopy = rdoClientCopy.Checked;
            _printOfficeCopy = rdoOfficeCopy.Checked;
            _transDate       = Convert.ToDateTime(dtTransDate.Value.ToShortDateString());
            _custCode        = txtCustCode.Text;

            ClientConfirmationBAL clientConfirmationBal = new ClientConfirmationBAL();
            LoadCommonInfo        CmmInfo = new LoadCommonInfo();

            if (_viewReport)
            {
                if (txtCustCode.Text.Trim() == "")
                {
                    MessageBox.Show("Select a customer first.", "Warning!");
                    return;
                }

                crClientConfirmation     crClientConfirm    = new crClientConfirmation();
                ClientConfirmationViewer clientConfirmation = new ClientConfirmationViewer();
                DataTable dtClientBasicData    = new DataTable();
                DataTable dtClientConfirmation = new DataTable();

                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(ResourceName.Customer_Confirmation_default);
                // _filterdColumnName = obj.GetFilteredColumnName(ResourceName.Customer_Confirmation_default);

                string T_custCode = obj.FilterCustCode(_custCode, ResourceName.Customer_Confirmation_default);

                if (T_custCode == "")
                {
                    MessageBox.Show("You are restricted ");
                    return;
                }
                dtClientBasicData = clientConfirmationBal.GetClientBasicData(T_custCode, _transDate);


                if (dtClientBasicData.Rows.Count > 0)
                {
                    ((TextObject)crClientConfirm.ReportDefinition.Sections[2].ReportObjects["txtCustName"]).Text   = dtClientBasicData.Rows[0]["Cust_Name"].ToString();
                    ((TextObject)crClientConfirm.ReportDefinition.Sections[2].ReportObjects["txtCustCode"]).Text   = dtClientBasicData.Rows[0]["Cust_Code"].ToString();
                    ((TextObject)crClientConfirm.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text  = dtClientBasicData.Rows[0]["Trade_Date"].ToString();
                    ((TextObject)crClientConfirm.ReportDefinition.Sections[4].ReportObjects["txtTradeDate2"]).Text = "(" + dtClientBasicData.Rows[0]["Trade_Date"].ToString() + ")";
                    // ((TextObject) crClientConfirm.ReportDefinition.Sections[4].ReportObjects["txtTradeDate3"]).Text =dtClientBasicData.Rows[0]["Trade_Date"].ToString();
                    ((TextObject)crClientConfirm.ReportDefinition.Sections[4].ReportObjects["txtInterestCharge"]).Text = dtClientBasicData.Rows[0]["Interest"].ToString();
                }

                string temp_custCode = obj.FilterCustCode(_custCode, ResourceName.Customer_Confirmation_default);
                dtClientConfirmation = clientConfirmationBal.GetClientConfirmation(temp_custCode, _transDate);

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

                ///// Load Branch Name
                ((TextObject)crClientConfirm.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                clientConfirmation.crvClientConfirmationReportViewer.ReportSource = crClientConfirm;
                clientConfirmation.Show();
            }
            else if (_printClientCopy)
            {
                crClientConfirmationClientCopy     crClientCopy     = new crClientConfirmationClientCopy();
                ClientConfirmationClientCopyViewer clientCopyViewer = new ClientConfirmationClientCopyViewer();
                DataTable dtClientConfClientCopy = new DataTable();
                dtClientConfClientCopy = clientConfirmationBal.getClientConfirmationClientCopy(_transDate);

                _filterdColumnName = dtClientConfClientCopy.Columns[0].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtClientConfClientCopy, _filterdColumnName, ResourceName.Customer_Confirmation_ClientCopy);
                dtClientConfClientCopy = obj.GetRecordLevelFilteredData();

                crClientCopy.SetDataSource(dtClientConfClientCopy);
                //Load Trade date
                ((TextObject)crClientCopy.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text  = dtTransDate.Value.ToShortDateString();
                ((TextObject)crClientCopy.ReportDefinition.Sections[3].ReportObjects["txtTradeDate2"]).Text = dtTransDate.Value.ToShortDateString();
                ((TextObject)crClientCopy.ReportDefinition.Sections[3].ReportObjects["txtTradeDate3"]).Text = dtTransDate.Value.ToShortDateString();
                ///// Load Company Name
                ((TextObject)crClientCopy.ReportDefinition.Sections[1].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();

                ///// Load Branch Name
                ((TextObject)crClientCopy.ReportDefinition.Sections[1].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                clientCopyViewer.crvClientConfirmationClientCopyViewer.ReportSource = crClientCopy;
                clientCopyViewer.Show();
            }
            else if (_printOfficeCopy)
            {
                crClientConfirmationOfficeCopy     crOfficeCopy     = new crClientConfirmationOfficeCopy();
                ClientConfirmationOfficeCopyViewer officeCopyViewer = new ClientConfirmationOfficeCopyViewer();
                DataTable dtClientConfOfficeCopy = new DataTable();
                dtClientConfOfficeCopy = clientConfirmationBal.GetClientConfirmationOfficeCopy(_transDate);

                _filterdColumnName = dtClientConfOfficeCopy.Columns[0].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtClientConfOfficeCopy, _filterdColumnName, ResourceName.Customer_Confirmation_OfficeCopy);
                dtClientConfOfficeCopy = obj.GetRecordLevelFilteredData();

                crOfficeCopy.SetDataSource(dtClientConfOfficeCopy);
                //Load Trade date
                ((TextObject)crOfficeCopy.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text  = dtTransDate.Value.ToShortDateString();
                ((TextObject)crOfficeCopy.ReportDefinition.Sections[3].ReportObjects["txtTradeDate2"]).Text = dtTransDate.Value.ToShortDateString();
                ((TextObject)crOfficeCopy.ReportDefinition.Sections[3].ReportObjects["txtTradeDate3"]).Text = dtTransDate.Value.ToShortDateString();
                ///// Load Company Name
                ((TextObject)crOfficeCopy.ReportDefinition.Sections[1].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();

                ///// Load Branch Name
                ((TextObject)crOfficeCopy.ReportDefinition.Sections[1].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId);
                officeCopyViewer.crvClientConfirmationOfficeCopyViewer.ReportSource = crOfficeCopy;
                officeCopyViewer.Show();
            }
            else
            {
                MessageBox.Show("Please Select the report category first.");
            }
        }
Exemplo n.º 5
0
        private void ReportView()
        {
            if (ddlCompanyShortCode.Text == string.Empty)
            {
                MessageBox.Show("Please Select Instrument Short Code");
                return;
            }
            DataTable       dt            = new DataTable();
            ShareBalanceBAL reportBAL     = new ShareBalanceBAL();
            LoadCommonInfo  CmmInfo       = new LoadCommonInfo();
            CompanyBAL      objCompanyBal = new CompanyBAL();

            string   compShortCode = ddlCompanyShortCode.Text;
            DateTime fromDate      = dtStartDate.Value;
            DateTime toDate        = dtEndDate.Value;

            dt = reportBAL.GetCompanyWiseShareTradeList(compShortCode, fromDate, toDate);

            crInstruwiseShareTradeList reportFile = new crInstruwiseShareTradeList();

            reportFile.SetDataSource(dt);

            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName();
            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtBranchName"]).Text  = objCompanyBal.GetHeadofficeInfo();
            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtReportDate"]).Text  = "From " + fromDate.ToShortDateString() + " To " + toDate.ToShortDateString();


            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruName"]).Text  = Convert.ToString(dt.Rows[0][2]);
            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruCode"]).Text  = Convert.ToString(dt.Rows[0][1]);
            ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruGroup"]).Text = Convert.ToString(dt.Rows[0][3]);

            frmInstruwiseShareTradeListViewer reportViewer = new frmInstruwiseShareTradeListViewer();

            reportViewer.crvInstruWiseShareTradeList.ReportSource = reportFile;
            reportViewer.Show();
        }