Beispiel #1
0
        public FinancialReport(DataSet Ds, string Month, int YYYY, string filepath, string logfilepath)
        {
            InitializeComponent();
            ReportUtility objrep = new ReportUtility();

            textBox13.Visible = true;
            textBox9.Visible  = true;
            textBox9.Value    = "RUN DATE :" + DateTime.Now.ToString("MM/dd/yyyy");
            objrep.LogFile(textBox9.Value, "textBox9.Value +" + textBox9.Value + "", "FinancialReport", "", logfilepath);
            textBox13.Value = "For Financial Month :" + Month + ' ' + YYYY;
            objrep.LogFile(textBox13.Value, "textBox13.Value + " + textBox13.Value + " ", "FinancialReport", "", logfilepath);
            if (Ds.Tables[0].Rows.Count > 0)
            {
                // Image image1 = Image.FromFile(filepath);
                // this.pictureBox1.Value = image1;
                Ds.Tables[0].Rows[0].Delete();
                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();
                table2.DataSource = Ds;
            }
        }
Beispiel #2
0
        public BalanceSheet(DataSet Ds, string Month, int YYYY, string filepath, DataSet DsComp, string logfilepath)
        {
            InitializeComponent();
            ReportUtility objrep = new ReportUtility();

            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"]);
                }
            }
        }
        //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)
                {
                }
            }

            ReportUtility reportUtility = new ReportUtility();

            txtAmountinWord.Value = reportUtility.DecimalToWords(total);
        }
        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)
                {
                }
            }
            ReportUtility reportUtility = new ReportUtility();

            txtAmountinWord.Value = reportUtility.DecimalToWords(total);
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }