Example #1
0
        private void GetShareReviewEntry(DateTime date)
        {
            try
            {
                cr_ShareEntryReview objcrReviewShare = new cr_ShareEntryReview();
                DataTable           dataTable        = new DataTable();
                frmReportViewer     objReportviewer  = new frmReportViewer();
                ShareDWBAL          objShareDW       = new ShareDWBAL();

                dataTable = objShareDW.GetDayShareSummary(date);
                objcrReviewShare.SetDataSource(dataTable);

                GetCommonInfo();

                ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
                ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;
                ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text   = date.ToString("dd-MMM-yyyy");

                objReportviewer.crvReportViewer.ReportSource = objcrReviewShare;
                objReportviewer.Text = "Share Review Entry";
                objReportviewer.crvReportViewer.DisplayGroupTree = false;
                objReportviewer.Show();
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #2
0
        private void btnNewPortfolioReport_Click(object sender, EventArgs e)
        {
            //if (ValidationCheck())
            //    return;

            ShareDWBAL            shareDwbal           = new ShareDWBAL();
            ShareLedgerBAL        bal                  = new ShareLedgerBAL();
            MoneyLadgerReportBAL  moneyLedgerReportBal = new MoneyLadgerReportBAL();
            DataTable             dtPort               = new DataTable();
            frmReportViewer       viewer               = new frmReportViewer();
            cr_NewPortfolioWithGL rpt                  = new cr_NewPortfolioWithGL();

            DataTable dtCommission   = shareDwbal.GetCommissionRate(txtCustCode.Text.Trim());
            double    CommissionRate = Convert.ToDouble(dtCommission.Rows[0][0].ToString());

            //string AsOnDateeeeee=Convert.ToString
            dtPort = bal.PortfolioWithActualBEPRealizeGL(txtCustCode.Text.Trim(), CommissionRate, dtToDate.Value);

            DataTable dtCustBasicInfo = moneyLedgerReportBal.GetCustBasicInfo(txtCustCode.Text.Trim());

            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtCustCode"]).Text =
                "Cust. Code: " + dtCustBasicInfo.Rows[0]["Cust_Code"].ToString();
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtBOID"]).Text =
                "Cust. BO ID: " + dtCustBasicInfo.Rows[0]["BO_ID"].ToString();
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtCustName"]).Text =
                "Cust. Name: " + dtCustBasicInfo.Rows[0]["Cust_Name"].ToString();
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["AsOnDate"]).Text =
                "As On: " + dtToDate.Value.ToString("dd MMMM yyyy") + "";
            GetCommonInfo();
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtBranchName"]).Text  =
                _branchName + ", " + _branchAddress + ", " + "Phone: " + _branchContactNumber;
            ((TextObject)rpt.ReportDefinition.Sections[1].ReportObjects["txtReportName"]).Text = "Portfolio Statement";
            rpt.SetDataSource(dtPort);
            viewer.crvReportViewer.ReportSource = rpt;
            viewer.Show();
        }