private static void InitializeReport()
        {
            var reportConfig = configuration.GetSection("ReportConfiguration");

            extent = ReportsUtility.InitializeReport(reportConfig);
            ReportsUtility.CreateScreenshotsfolder(reportConfig);
        }
Esempio n. 2
0
        public tlrGSTAdditionalInfo(DataSet DS)
        {
            String GLBadDebt = "", GLCapitalGoods = "";

            InitializeComponent();
            if (!Object.Equals(DS, null))
            {
                DataRow DTCompany = DS.Tables[0].Rows[0];

                GLBadDebt      = DTCompany["GLCodeBadDebt"].ToString();
                GLCapitalGoods = DTCompany["CapitalGoods"].ToString();

                string FromDate = string.Format("{0:dd/MM/yyyy}", DTCompany["FromDate"]);
                string Todate   = string.Format("{0:dd/MM/yyyy}", DTCompany["ToDate"]);
                txtTaxPeriod.Value = string.Format(" for Taxable Period {0} To {1}", FromDate, Todate);

                List <GstReport> lstGstReport = new GstReport().GetGstReport(DS.Tables[1]);
                txtRLS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "ZRL")).Sum(P => P.GstBaseAmount));
                txtRLS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRL").Sum(P => P.GstAmount));

                txtVES1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "ZRE")).Sum(P => P.GstBaseAmount));
                txtVES2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRE").Sum(P => P.GstAmount));

                txtExmS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "ES")).Sum(P => P.GstBaseAmount));
                txtExmS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ES").Sum(P => P.GstAmount));

                txtSGR1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "RS")).Sum(P => P.GstBaseAmount));
                txtSGR2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "RS").Sum(P => P.GstAmount));

                txtSGS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "IM")).Sum(P => P.GstBaseAmount));
                txtSGS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IM").Sum(P => P.GstAmount));

                txtVDS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "GS")).Sum(P => P.GstBaseAmount));
                txtVDS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "GS").Sum(P => P.GstAmount));

                txtGT1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRL" ||
                                                                            P.GstCode == "ZRE" ||
                                                                            P.GstCode == "ES" ||
                                                                            P.GstCode == "RS" ||
                                                                            P.GstCode == "GS" ||
                                                                            P.GstCode == "IM" ||
                                                                            P.GstCode == "GS"
                                                                            ).Sum(P => P.GstBaseAmount));

                txtGT2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRL" ||
                                                                            P.GstCode == "ZRE" ||
                                                                            P.GstCode == "ES" ||
                                                                            P.GstCode == "RS" ||
                                                                            P.GstCode == "GS" ||
                                                                            P.GstCode == "IM" ||
                                                                            P.GstCode == "GS"
                                                                            ).Sum(P => P.GstAmount));
            }
        }
        private void InsertReportSteprs()
        {
            var stepType = ScenarioStepContext.Current.StepInfo.StepDefinitionType.ToString();

            if (ScenarioContext.Current.TestError == null)
            {
                if (stepType == "Given")
                {
                    scenario.CreateNode <Given>(ScenarioStepContext.Current.StepInfo.Text);
                }
                else if (stepType == "When")
                {
                    scenario.CreateNode <When>(ScenarioStepContext.Current.StepInfo.Text);
                }
                else if (stepType == "Then")
                {
                    scenario.CreateNode <Then>(ScenarioStepContext.Current.StepInfo.Text);
                }
                else if (stepType == "And")
                {
                    scenario.CreateNode <And>(ScenarioStepContext.Current.StepInfo.Text);
                }
            }
            else if (ScenarioContext.Current.TestError != null)
            {
                var    webDriver  = objectContainer.Resolve <IWebDriver>();
                string screenshot = ReportsUtility.TakeScreenshot(webDriver, configuration.GetSection("ReportConfiguration"));

                if (stepType == "Given")
                {
                    scenario.CreateNode <Given>(ScenarioStepContext.Current.StepInfo.Text)
                    .Fail(ScenarioContext.Current.TestError.ToString(),
                          MediaEntityBuilder.CreateScreenCaptureFromPath(screenshot).Build());
                }
                else if (stepType == "When")
                {
                    scenario.CreateNode <When>(ScenarioStepContext.Current.StepInfo.Text)
                    .Fail(ScenarioContext.Current.TestError.ToString(),
                          MediaEntityBuilder.CreateScreenCaptureFromPath(screenshot).Build());
                }
                else if (stepType == "Then")
                {
                    scenario.CreateNode <Then>(ScenarioStepContext.Current.StepInfo.Text)
                    .Fail(ScenarioContext.Current.TestError.ToString(),
                          MediaEntityBuilder.CreateScreenCaptureFromPath(screenshot).Build());
                }
            }
        }
Esempio n. 4
0
        public BalanceSheet(DataSet Ds, string Month, int YYYY, string filepath, DataSet DsComp, string logfilepath)
        {
            InitializeComponent();
            ReportsUtility objrep = new ReportsUtility();

            textBox13.Visible = true;
            textBox9.Visible  = true;
            textBox9.Value    = "RUN DATE :" + DateTime.Now.ToString("dd/MM/yyyy");
            //objrep.LogFile(textBox9.Value, "textBox9.Value +" + textBox9.Value + "", "BalanceSheet", "", logfilepath);
            textBox13.Value = "For Financial Month :" + Month + ' ' + YYYY;
            //objrep.LogFile(textBox13.Value, "textBox13.Value +" + textBox13.Value + "", "BalanceSheet", "", logfilepath);
            //if (string.IsNullOrEmpty(filepath))
            //{
            //    pictureBox1.Visible = false;
            //}
            //else
            //{
            //    Image image1 = Image.FromFile(filepath);
            //    this.pictureBox1.Value = image1;
            //}

            if (Ds.Tables[0].Rows.Count > 0)
            {
                Ds.Tables[0].Rows[0].Delete();
                table2.DataSource = Ds;
            }
            if (Ds.Tables[1].Rows.Count > 0)
            {
                //textBox2.Value = Ds.Tables[1].Rows[0]["CompanyName"].ToString();
                //textBox4.Value = Ds.Tables[1].Rows[0]["CompanyAdd1"].ToString();
                //textBox6.Value = Ds.Tables[1].Rows[0]["CompanyAdd2"].ToString();
                //textBox8.Value = Ds.Tables[1].Rows[0]["CompanyAdd3"].ToString();
                //textBox10.Value = Ds.Tables[1].Rows[0]["CompanyAdd4"].ToString();
                //textBox1.Value = Ds.Tables[1].Rows[0]["Email"].ToString();
                //textBox3.Value = Ds.Tables[1].Rows[0]["RegNo"].ToString();
                //textBox5.Value = Ds.Tables[1].Rows[0]["GSTCode"].ToString();

                textBox2.Value = Ds.Tables[1].Rows[0]["CompanyName"].ToString();
                textBox4.Value = Convert.ToString(Ds.Tables[1].Rows[0]["CompanyAdd1"]) + " " + Convert.ToString(Ds.Tables[1].Rows[0]["CompanyAdd2"]) + " " + Convert.ToString(Ds.Tables[1].Rows[0]["CompanyAdd3"]) + " " + Convert.ToString(Ds.Tables[1].Rows[0]["CompanyAdd4"]);
                textBox6.Value = Ds.Tables[1].Rows[0]["RegNo"].ToString();
                if (!string.IsNullOrEmpty(Convert.ToString(Ds.Tables[1].Rows[0]["GSTCode"])))
                {
                    textBox8.Value = Convert.ToString(Ds.Tables[1].Rows[0]["GSTCode"]);
                }
            }
        }
Esempio n. 5
0
        //START - Method for Generate Batch Printing(Vouchers) Report :---------------------
        public VoucherLawton(DataRow header, DataTable dt, string ReportType)
        {
            InitializeComponent();

            txtCompanyName.Value = Convert.ToString(header["CompanyName"]);
            txtAddress.Value     = Convert.ToString(header["CompanyAddress"]);
            txtDescription.Value = Convert.ToString(header["Description"]);
            txtVoucherNo.Value   = Convert.ToString(header["VouRefNo"]);
            txtVoucherDate.Value = Convert.ToString(header["VoucherDate"]);

            if (ReportType.Trim().ToUpper() == "P")
            {
                txtReportType.Value = "Payment Journal";
            }
            else if (ReportType.Trim().ToUpper() == "J")
            {
                txtReportType.Value = "General Journal";
            }

            int rowCount = dt.Rows.Count;

            for (int i = 1; i <= 24 - (rowCount % 20); i++)
            {
                dt.Rows.Add(dt.NewRow());
            }

            table1.DataSource = dt;

            double total = 0.0;

            for (int i = 0; i < rowCount; i++)
            {
                try
                {
                    total += double.Parse(dt.Rows[i]["TranAmountCr"].ToString());
                }
                catch (Exception ex)
                {
                }
            }

            ReportsUtility ReportsUtility = new ReportsUtility();

            txtAmountinWord.Value = ReportsUtility.DecimalToWords(total);
        }
Esempio n. 6
0
        public VoucherLawton(DataSet DS, string ReportType)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            txtCompanyName.Value = DS.Tables[1].Rows[0]["CompanyName"].ToString();
            txtAddress.Value     = DS.Tables[1].Rows[0]["CompanyAddress"].ToString();
            txtDescription.Value = DS.Tables[1].Rows[0]["Description"].ToString();
            txtVoucherNo.Value   = DS.Tables[1].Rows[0]["VouRefNo"].ToString();
            txtVoucherDate.Value = DS.Tables[1].Rows[0]["VoucherDate"].ToString();
            if (ReportType.Trim().ToUpper() == "P")
            {
                txtReportType.Value = "Payment Journal";
            }
            else if (ReportType.Trim().ToUpper() == "J")
            {
                txtReportType.Value = "General Journal";
            }
            int rowCount = DS.Tables[0].Rows.Count;

            for (int i = 1; i <= 24 - (rowCount % 20); i++)
            {
                DS.Tables[0].Rows.Add(DS.Tables[0].NewRow());
            }
            table1.DataSource = DS.Tables[0];
            double total = 0.0;

            for (int i = 0; i < rowCount; i++)
            {
                try
                {
                    total += double.Parse(DS.Tables[0].Rows[i]["TranAmountCr"].ToString());
                }
                catch (Exception ex)
                {
                }
            }
            ReportsUtility ReportsUtility = new ReportsUtility();

            txtAmountinWord.Value = ReportsUtility.DecimalToWords(total);
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
        public tlrGoodsAndServiceTaxReturn(DataSet DS)
        {
            String GLBadDebt = "";

            InitializeComponent();
            if (!Object.Equals(DS, null))
            {
                DataRow DTCompany = DS.Tables[0].Rows[0];
                GLBadDebt             = DTCompany["GLCodeBadDebt"].ToString();
                txtGSTNo.Value        = DTCompany["GSTCode"].ToString();
                txtBusinessName.Value = DTCompany["CompanyName"].ToString();
                string FromDate = string.Format("{0:dd/MM/yyyy}", DTCompany["FromDate"]);
                string Todate   = string.Format("{0:dd/MM/yyyy}", DTCompany["ToDate"]);
                txtTaxableDate.Value = string.Format("{0} To {1}", FromDate, Todate);

                List <GstReport> lstGstReport = new GstReport().GetGstReport(DS.Tables[1]);
                txtTotStandRate.Value    = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstType == "OUT" && P.GstAmount > 0).Sum(P => P.GstBaseAmount));
                txtOtherAdjustment.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstType == "OUT" && P.GstAmount > 0).Sum(P => P.GstAmount));

                txtINTotStanRate.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstType == "IN" && P.GstAmount > 0).Sum(P => P.GstBaseAmount));
                txtInTotOtherAdj.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstType == "IN" && P.GstAmount > 0).Sum(P => P.GstAmount));

                if (decimal.Parse(txtOtherAdjustment.Value) > decimal.Parse(txtInTotOtherAdj.Value))
                {
                    txtGSTAmtPayable.Value = ReportsUtility.MyFormat(decimal.Parse(txtOtherAdjustment.Value) - decimal.Parse(txtInTotOtherAdj.Value));
                }
                else
                {
                    txtGSTAmtClamable.Value = ReportsUtility.MyFormat(decimal.Parse(txtInTotOtherAdj.Value) - decimal.Parse(txtOtherAdjustment.Value));
                }

                txtZeroRatedSup.Value   = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRL").Sum(P => P.GstBaseAmount));
                txtTotExpSuplies.Value  = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ZRE").Sum(P => P.GstBaseAmount));
                txtTotExeSupplies.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "ES" || P.GstCode == "ES43").Sum(P => P.GstBaseAmount));

                txtTotSupGSTRel.Value  = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "RS").Sum(P => P.GstBaseAmount));
                txtTotTradScheme.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IM").Sum(P => P.GstBaseAmount));

                txtTotItem14.Value   = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IM").Sum(P => P.GstAmount));
                txttotGoodsAcq.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX" || P.GstCode == "EP").Sum(P => P.GstBaseAmount));

                txtTotRecIncTax.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GLCode == GLBadDebt && P.GstType == "IN").Sum(P => P.GstAmount));
            }
        }
        public ltrTopTenAmtByHospital(DataSet ds)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            DataTable dt  = null;
            DataTable dt2 = null;

            if ((ds != null) && (ds.Tables.Count > 0) && (ds.Tables[0].Rows.Count > 0))
            {
                dt                = ds.Tables[0];
                dt2               = ds.Tables[1];
                dt.TableName      = "ReportByAmtVisits";
                table1.DataSource = dt;
                if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "ABH")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Amount By Hospital/Clinic";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Amount By Hospital/Clinic";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "A_Percentage", "Hospital");
                }
                else if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "VBH")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Visits By Hospital/Clinic";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Visits By Hospital/Clinic";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "V_Percentage", "Hospital");
                }
                else if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "ABD")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Amount By Disease";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Amount By Disease";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "A_Percentage", "DISEASE");
                }
                else if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "VBD")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Visits By Disease";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Visits By Disease";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "V_Percentage", "DISEASE");
                }
                else if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "ABM")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Amount By Member";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Amount By Member";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "A_Percentage", "Name");
                }
                else if (dt.Rows.Count > 0 && dt.Rows[0]["ReportType"].ToString() == "VBM")
                {
                    txtReport.Value = "Report Claim Analysis By Top Ten Visits By Member";
                    _PieChartAmount.ChartTitle.TextBlock.Text = "Top Ten Visits By Member";
                    ReportsUtility.GeneratePieChart(dt2, _PieChartAmount, "V_Percentage", "Name");
                }
                if (dt.Rows.Count > 0 && dt.Columns[0].ToString() == "HOSPITAL")
                {
                    txtSortBy.Value    = "Hospital / Clinic Name";
                    txtSortValue.Value = "=HOSPITAL";
                }
                else if (dt.Rows.Count > 0 && dt.Columns[0].ToString() == "DISEASE")
                {
                    txtSortBy.Value    = "Disease";
                    txtSortValue.Value = "=DISEASE";
                }
                else if (dt.Rows.Count > 0 && dt.Columns[0].ToString() == "Name")
                {
                    txtSortBy.Value    = "Member";
                    txtSortValue.Value = "=Name";
                }
            }
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
Esempio n. 9
0
        public tlrTotSuppNOutTax(DataSet DS)
        {
            String GLBadDebt = "", GLCapitalGoods = "";

            InitializeComponent();
            if (!Object.Equals(DS, null))
            {
                DataRow DTCompany = DS.Tables[0].Rows[0];

                GLBadDebt      = DTCompany["GLCodeBadDebt"].ToString();
                GLCapitalGoods = DTCompany["CapitalGoods"].ToString();

                string FromDate = string.Format("{0:dd/MM/yyyy}", DTCompany["FromDate"]);
                string Todate   = string.Format("{0:dd/MM/yyyy}", DTCompany["ToDate"]);
                txtTaxPeriod.Value = string.Format(" for Taxable Period {0} To {1}", FromDate, Todate);

                List <GstReport> lstGstReport = new GstReport().GetGstReport(DS.Tables[1]);
                txtSRNS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "SR")).Sum(P => P.GstBaseAmount));
                txtSRNS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "SR").Sum(P => P.GstAmount));

                //txtSRDBA1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode == GLCapitalGoods).Sum(P => P.GstBaseAmount));
                //txtSRDBA2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode == GLCapitalGoods).Sum(P => P.GstAmount));

                //txtSRAUP1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode != GLCapitalGoods).Sum(P => P.GstBaseAmount));
                //txtSRAUP2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode != GLCapitalGoods).Sum(P => P.GstAmount));

                txtSRDBA1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode == GLCapitalGoods).Sum(P => P.GstBaseAmount));
                txtSRDBA2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode == GLCapitalGoods).Sum(P => P.GstAmount));

                txtSRAUP1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode != GLCapitalGoods).Sum(P => P.GstBaseAmount));
                txtSRAUP2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "DS" && P.GLCode != GLCapitalGoods).Sum(P => P.GstAmount));


                txtST1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "SR" || P.GstCode == "DS").Sum(P => P.GstBaseAmount));
                txtST2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "SR" || P.GstCode == "DS").Sum(P => P.GstAmount));



                txtBDR1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "BDR").Sum(P => P.GstBaseAmount));
                txtBDR2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "BDR").Sum(P => P.GstAmount));

                txtCNDN1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "CNDN").Sum(P => P.GstBaseAmount));
                txtCNDN2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "CNDN").Sum(P => P.GstAmount));

                txtCGA1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "CGA").Sum(P => P.GstBaseAmount));
                txtCGA2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "CGA").Sum(P => P.GstAmount));

                txtAAd1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "AAD").Sum(P => P.GstBaseAmount));
                txtAAd2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "AAD").Sum(P => P.GstAmount));

                txtOAd1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "OAD").Sum(P => P.GstBaseAmount));
                txtOAd2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && P.AdjType == "OAD").Sum(P => P.GstAmount));

                txtAST1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && (P.AdjType == "BDR" ||
                                                                                                         P.AdjType == "CNDN" || P.AdjType == "CGA" || P.AdjType == "AAD" || P.AdjType == "OAD")).Sum(P => P.GstBaseAmount));
                txtAST2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJS" && (P.AdjType == "BDR" ||
                                                                                                         P.AdjType == "CNDN" || P.AdjType == "CGA" || P.AdjType == "AAD" || P.AdjType == "OAD")).Sum(P => P.GstAmount));

                txtGT1.Value = ReportsUtility.MyFormat(decimal.Parse(txtST1.Value) + decimal.Parse(txtAST1.Value));
                txtGT2.Value = ReportsUtility.MyFormat(decimal.Parse(txtST2.Value) + decimal.Parse(txtAST2.Value));
            }
        }
Esempio n. 10
0
        public tlrGSTSummaryTotAcqInTax(DataSet DS)
        {
            String GLBadDebt = "", GLCapitalGoods = "";

            InitializeComponent();
            if (!Object.Equals(DS, null))
            {
                DataRow DTCompany = DS.Tables[0].Rows[0];

                GLBadDebt      = DTCompany["GLCodeBadDebt"].ToString();
                GLCapitalGoods = DTCompany["CapitalGoods"].ToString();

                string FromDate = string.Format("{0:dd/MM/yyyy}", DTCompany["FromDate"]);
                string Todate   = string.Format("{0:dd/MM/yyyy}", DTCompany["ToDate"]);
                txtTaxPeriod.Value = string.Format(" for Taxable Period {0} To {1}", FromDate, Todate);

                List <GstReport> lstGstReport = new GstReport().GetGstReport(DS.Tables[1]);
                txtNPSRS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => (P.GstCode == "TX" || P.GstCode == "BL") && P.GLCode != GLCapitalGoods).Sum(P => P.GstBaseAmount));
                txtNPSRS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX").Sum(P => P.GstAmount));
                txtNPSRS3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "BL").Sum(P => P.GstAmount));

                txtNPMES1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstBaseAmount));
                //txtNPSRS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstAmount));
                txtNPMES3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstAmount));

                txtNPIES1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX-E43" || P.GstCode == "TX-N43").Sum(P => P.GstBaseAmount));
                txtNPIES2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX-E43").Sum(P => P.GstAmount));
                txtNPIES3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX-N43").Sum(P => P.GstAmount));

                txtCGSRS1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX" && P.GLCode == GLCapitalGoods).Sum(P => P.GstBaseAmount));
                txtCGSRS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX" && P.GLCode == GLCapitalGoods).Sum(P => P.GstAmount));
                //txtNPIES3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX-N43").Sum(P => P.GstAmount));

                txtCGMES1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstBaseAmount));
                //txtNPSRS2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstAmount));
                txtCGMES3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "EP").Sum(P => P.GstAmount));

                txtGI1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IS" || P.GstCode == "IM").Sum(P => P.GstBaseAmount));
                txtGI2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IS").Sum(P => P.GstAmount));
                txtGI3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "IM").Sum(P => P.GstAmount));

                txtST1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX" ||
                                                                            P.GstCode == "BL" ||
                                                                            P.GstCode == "EP" ||
                                                                            P.GstCode == "TX-E43" ||
                                                                            P.GstCode == "TX-N43" ||
                                                                            P.GstCode == "IS" ||
                                                                            P.GstCode == "IM").Sum(P => P.GstBaseAmount));
                txtST2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "TX" ||
                                                                            P.GstCode == "TX-E43" ||
                                                                            P.GstCode == "IS").Sum(P => P.GstAmount));

                txtST3.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "BL" ||
                                                                            P.GstCode == "EP" ||
                                                                            P.GstCode == "TX-N43" ||
                                                                            P.GstCode == "IM").Sum(P => P.GstAmount));

                txtBDR1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "BDR").Sum(P => P.GstBaseAmount));
                txtBDR2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "BDR").Sum(P => P.GstAmount));

                txtCNDN1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "CNDN").Sum(P => P.GstBaseAmount));
                txtCNDN2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "CNDN").Sum(P => P.GstAmount));

                txtCGA1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "CGA").Sum(P => P.GstBaseAmount));
                txtCGA2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "CGA").Sum(P => P.GstAmount));

                txtAAd1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "AAD").Sum(P => P.GstBaseAmount));
                txtAAd2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "AAD").Sum(P => P.GstAmount));

                txtOAd1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "OAD").Sum(P => P.GstBaseAmount));
                txtOAd2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" && P.AdjType == "OAD").Sum(P => P.GstAmount));

                txtAST1.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" &&
                                                                             P.AdjType != "").Sum(P => P.GstBaseAmount));

                txtAST2.Value = ReportsUtility.MyFormat(lstGstReport.FindAll(P => P.GstCode == "AJP" &&
                                                                             P.AdjType != "").Sum(P => P.GstAmount));


                txtGT1.Value = ReportsUtility.MyFormat(decimal.Parse(txtST1.Value) + decimal.Parse(txtAST1.Value));
                txtGT2.Value = ReportsUtility.MyFormat(decimal.Parse(txtST2.Value) + decimal.Parse(txtAST2.Value));
                txtGT3.Value = ReportsUtility.MyFormat(decimal.Parse(txtST3.Value) + decimal.Parse(txtAST3.Value));
            }
        }
Esempio n. 11
0
        public ltrClaimTop10HospitalBenefit(DataSet ds)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            DataTable dt = null;

            if ((ds != null) && (ds.Tables.Count > 0) && (ds.Tables[0].Rows.Count > 0))
            {
                dt = ds.Tables[0];
                tblNormal.DataSource = dt;
                if (dt.Rows.Count > 0 && dt.Columns[1].ToString() == "HOSPITAL")
                {
                    // tblNormal.ColumnGroups.RemoveAt(1);
                    // tblNormal.Body.Columns.Remove(tblNormal.Body.Columns[1]);
                    tblNormal.Visible        = false;
                    tblMember.Visible        = true;
                    tblMember.DataSource     = dt;
                    tblMember.Location       = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Pixel(0), Telerik.Reporting.Drawing.Unit.Pixel(250));
                    txtReport.Value          = "Report Claim Analysis By Top Ten Amount Of Hospital / Clinic All Benefit";
                    txtsortByMember.Value    = "Hospital / Clinic Name";
                    txtsortValueMember.Value = "=HOSPITAL";

                    //txtSortBy.Value = "Hospital / Clinic Name";
                    // txtSortByThai.Value = "Hospital / Clinic Name";
                    //txtSortValue.Value = "=HOSPITAL";
                    // txtSortValueThai.Value = "=HOSPITAL";
                    _PieChartAmount.ChartTitle.TextBlock.Text    = "Claim Cost Amount";
                    _pieChartFrequency.ChartTitle.TextBlock.Text = "Claim Frequency of Visits";
                    ReportsUtility.GeneratePieChart(dt, _PieChartAmount, "A_Percentage", "Hospital");
                    ReportsUtility.GeneratePieChart(dt, _pieChartFrequency, "F_Percentage", "Hospital");
                }
                else if (dt.Rows.Count > 0 && dt.Columns[1].ToString() == "DISEASE")
                {
                    txtReport.Value        = "Report Claim Analysis By Top Ten Amount Of Disease All Benefit";
                    txtSortBy.Value        = "Disease";
                    txtSortByThai.Value    = "Disease Thai";
                    txtSortValue.Value     = "=DISEASE";
                    txtSortValueThai.Value = "=DISEASE_THAI";
                    tblNormal.Location     = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Pixel(0), Telerik.Reporting.Drawing.Unit.Pixel(250));
                    _PieChartAmount.ChartTitle.TextBlock.Text    = "Claim Cost Amount";
                    _pieChartFrequency.ChartTitle.TextBlock.Text = "Claim Frequency of Visits";
                    ReportsUtility.GeneratePieChart(dt, _PieChartAmount, "A_Percentage", "DISEASE");
                    ReportsUtility.GeneratePieChart(dt, _pieChartFrequency, "F_Percentage", "DISEASE");
                }

                else if (dt.Rows.Count > 0 && dt.Columns[1].ToString() == "Name")
                {
                    tblNormal.Visible        = false;
                    tblMember.Visible        = true;
                    tblMember.DataSource     = dt;
                    tblMember.Location       = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Pixel(0), Telerik.Reporting.Drawing.Unit.Pixel(250));
                    txtReport.Value          = "Report Claim Analysis By Top Ten Amount Of Member All Benefit";
                    txtsortByMember.Value    = "Member Name";
                    txtsortValueMember.Value = "=Name";
                    _PieChartAmount.ChartTitle.TextBlock.Text    = "Claim Cost Amount";
                    _pieChartFrequency.ChartTitle.TextBlock.Text = "Claim Frequency of Visits";
                    ReportsUtility.GeneratePieChart(dt, _PieChartAmount, "A_Percentage", "Name");
                    ReportsUtility.GeneratePieChart(dt, _pieChartFrequency, "F_Percentage", "Name");
                }
            }
        }