Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable        dt   = _common.DataGridView2DataTable(dgv_Job, "JobSheet", 0);
            string           From = dtp_from.Value.ToString("dd/MM/yyyy");
            string           To   = dtp_to.Value.ToString("dd/MM/yyyy");
            frm_ReportViewer _objfrm_ReportViewer = new frm_ReportViewer();
            SendData         _obj = new SendData(_objfrm_ReportViewer.JobCardList);

            _obj(dt, From, To);
        }
Пример #2
0
        public void SearchByAccLedger()
        {
            var dt_SearchByAccLedger = _objCommon.DataGridView2DataTable(dgv_ReceiptVoucher, "DataTable_SearchByAccLedger").AsEnumerable().Select(a => a.Field <string>("AccountLedgerName")).AsParallel().Distinct().ToList();

            if (dt_SearchByAccLedger.Count > 0)
            {
                dt_SearchByAccLedger.Add("All");
                cmbSearchByAccLedger.DataSource    = dt_SearchByAccLedger;
                cmbSearchByAccLedger.SelectedIndex = -1;
            }
        }
Пример #3
0
        private void bttn_Generate_Click(object sender, EventArgs e)
        {
            DateTime date            = DateTime.ParseExact(cmb_month.Text, "MMMM", CultureInfo.InvariantCulture);
            var      firstDayOfMonth = new DateTime(Convert.ToInt32(cmb_year.Text), date.Month, 1);
            var      lastDayOfMonth  = firstDayOfMonth.AddMonths(1).AddDays(-1);

            first = firstDayOfMonth.ToString("dd/MM/yyyy");
            last  = lastDayOfMonth.ToString("dd/MM/yyyy");
            dgv_purchase.Rows.Clear();
            dgv_sale.Rows.Clear();
            GeneratePurchase();
            generateSale();
            Sale     = _common.DataGridView2DataTable(dgv_sale, "Sale", 0);
            Purchase = _common.DataGridView2DataTable(dgv_purchase, "Purchase", 0);
        }
Пример #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     DataTable DT = _common.DataGridView2DataTable(dgv_Balance, "Balance", 0);
     CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
     SendData _obj = new SendData(_objfrm_ReportViewer.Balance);
     _obj(DT, "Supplier", dtp_date.Value.ToString("dd/MM/yyyy"));
 }
Пример #5
0
        private void bttn_Print_Click(object sender, EventArgs e)
        {
            DataTable DT = _common.DataGridView2DataTable(dgv_Balance, "Balance", 0);

            CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
            SendData _obj = new SendData(_objfrm_ReportViewer.Balance);

            _obj(DT, "Customer", DateTime.Now.ToString("dd/MM/yyyy"));
        }
Пример #6
0
        private void bttn_Print_Click(object sender, EventArgs e)
        {
            DataTable dtGirviDetails = _objCommon.DataGridView2DataTable(dgv_GirviAdded, "dtCustomerBill");
            DataTable dtPaydetails   = _objCommon.DataGridView2DataTable(dgv_GirviRelease, "table");
            DataTable dtMerge        = _objCommon.mergeTwoDataGrid(dtGirviDetails, dtPaydetails);

            CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
            SendData _obj = new SendData(_objfrm_ReportViewer.ReceiveCashbookRecord);

            if (rbt_OtherTrue.Checked == true)
            {
                _obj(dtMerge, dtp_StartDate.Text, dtp_EndDate.Text, true);
            }
            else
            {
                _obj(dtMerge, dtp_StartDate.Text, dtp_EndDate.Text, false);
            }
            _objfrm_ReportViewer.Show();
        }
Пример #7
0
        private void bttn_Print_Click(object sender, EventArgs e)
        {
            DataTable dtGirviDetails = _objCommon.DataGridView2DataTable(dgv_GirviDetail, "dtCustomerBill");
            DataTable dtPaydetails   = _objCommon.DataGridView2DataTable(dgv_PaymentDetail, "table");
            DataTable dtMerge        = _objCommon.mergeTwoDataGrid(dtGirviDetails, dtPaydetails);

            CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
            SendData _obj = new SendData(_objfrm_ReportViewer.ReceiveDataInterestRecord);

            if (rbt_OtherTrue.Checked == true)
            {
                _obj(dtMerge, txt_KhatawaniNo.Text, totalloanamountsum.ToString(), totalpaidsum.ToString(), txt_AccountBalance.Text, true);
            }
            else
            {
                _obj(dtMerge, txt_KhatawaniNo.Text, totalloanamountsum.ToString(), totalpaidsum.ToString(), txt_AccountBalance.Text, false);
            }
            _objfrm_ReportViewer.Show();
        }
Пример #8
0
        private void bttn_Print_Click(object sender, EventArgs e)
        { //DataTable dtGirviDetails = _objCommon.DataGridView2DataTable(dgv_GirviAdded, "dtCustomerBill");
          //DataTable dtPaydetails = _objCommon.DataGridView2DataTable(dgv_GirviRelease, "table");
          //DataTable dtMerge = _objCommon.mergeTwoDataGrid(dtGirviDetails, dtPaydetails);


            //CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
            //SendData _obj = new SendData(_objfrm_ReportViewer.ReceiveRokadSingleRecord);
            //_obj(dtMerge);
            //_objfrm_ReportViewer.Show();

            string  pageno = "";
            DataSet ds     = new DataSet();

            try
            {
                if (oPrintersetting.ShowDialog() == DialogResult.OK)
                {
                    int j = 0;
                    for (int v = 0; v <= (Convert.ToDateTime(dtp_EndDate.Text) - Convert.ToDateTime(dtp_StartDate.Text)).TotalDays; v++)
                    {
                        dgv_GirviAdded.Rows.Clear();
                        dgv_GirviRelease.Rows.Clear();
                        totalGirviAmount   = 0;
                        totalinterestamt   = 0;
                        totalReleaseAmount = 0;
                        DataTable dt = _objRokad.getAllGirvi((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy"));
                        if (dt.Rows.Count > 0)
                        {
                            pageno = _objGirviCommon.getPageNumber(dt.Rows[0]["Date_of_deposit"].ToString());
                        }
                        if (dt.Rows.Count > 0)
                        {
                            int i;
                            for (i = 0; i < dt.Rows.Count; i++)
                            {
                                int    girvi_no = Convert.ToInt32(dt.Rows[i][1]);
                                string str      = _objRokad.getGirviItem(girvi_no.ToString());

                                DataTable name           = _objRokad.getnamefromID(dt.Rows[i][0].ToString());
                                string    descriptionnew = name.Rows[0][0].ToString().Trim() + "\n" + name.Rows[0][3].ToString() + "," + str + "\n व्याज दर.सा.द.शे " + Convert.ToDecimal(dt.Rows[0]["interset_rate"]) * 12 + "प्र \n " + " दि." + dt.Rows[i][3].ToString();

                                //sagar pulgao column
                                string girviitemforsagarpulgao   = _objRokad.getGirviItemForSagarPulgao(girvi_no.ToString());
                                string descriptionforSagarPulgao = name.Rows[0][0].ToString().Trim() + "\n" + name.Rows[0][3].ToString() + "," + girviitemforsagarpulgao;
                                //

                                dgv_GirviAdded.Rows.Add();

                                dgv_GirviAdded.Rows[i].Cells["DateNave"].Value         = dt.Rows[i]["Date_of_deposit"].ToString();
                                dgv_GirviAdded.Rows[i].Cells["GirviNoNave"].Value      = dt.Rows[i]["receipt_no"].ToString();
                                dgv_GirviAdded.Rows[i].Cells["DiscriptionNave"].Value  = descriptionnew;
                                dgv_GirviAdded.Rows[i].Cells["AmountNave"].Value       = dt.Rows[i]["Amount"].ToString();
                                dgv_GirviAdded.Rows[i].Cells["KhatawaniPanNave"].Value = dt.Rows[i]["khatawani_No"].ToString();

                                //sagar pulgao column
                                dgv_GirviAdded.Rows[i].Cells["ShortDescNaave"].Value = descriptionforSagarPulgao;

                                //

                                //totalGirviAmount = totalGirviAmount + Convert.ToDouble(dgv_GirviAdded.Rows[i].Cells["amountNave"].Value.ToString());
                            }

                            //totalGirviAmount = _objCommon.sumGridViewColumn(dgv_GirviAdded, "AmountNave");
                            // label4.Text = totalGirviAmount.ToString();
                            //dgv_GirviAdded.Rows.Add("Total= " + totalGirviAmount.ToString(), "", "", "");
                            //dgv_GirviAdded.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                            //dgv_GirviAdded.Rows[i].DefaultCellStyle.ForeColor = Color.White;
                        }
                        else
                        {
                        }

                        DataTable dt1 = _objRokad.getAllGirviRelease((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy"));

                        if (dt1.Rows.Count > 0)
                        {
                            pageno = _objGirviCommon.getPageNumber(dt1.Rows[0]["dateOfRelease"].ToString());
                        }

                        if (dt1.Rows.Count > 0)
                        {
                            int i;
                            for (i = 0; i < dt1.Rows.Count; i++)
                            {
                                int       girvi_no       = Convert.ToInt32(dt1.Rows[i][1]);
                                string    str            = _objRokad.getgirviitem(girvi_no.ToString());
                                DataTable name           = _objRokad.getnamefromID(dt1.Rows[i][0].ToString());
                                DataTable girviadddate   = _objRokad.getDatefromGn(dt1.Rows[i]["Girvino"].ToString());
                                string    descriptionnew = name.Rows[0]["FullName"].ToString() + ",\n" + name.Rows[0]["Address"].ToString() + "," + dt1.Rows[i][2].ToString() + " दि." + girviadddate.Rows[0][0].ToString() + " चे मुद्दल " + dt1.Rows[i][3].ToString() + " व्याज\n" + "दि" + girviadddate.Rows[0][0].ToString() + " ते " + dt1.Rows[i]["dateOfRelease"].ToString();
                                double    sumtotal       = Convert.ToDouble(dt1.Rows[i]["AmountDeposit"].ToString()) + Convert.ToDouble(dt1.Rows[i]["Interest_Amount"].ToString());
                                dgv_GirviRelease.Rows.Add();
                                dgv_GirviRelease.Rows[i].Cells["DateJama"].Value = dt1.Rows[i]["dateOfRelease"].ToString();
                                //dgv_GirviRelease.Rows[i].Cells["NameJama"].Value = "";
                                dgv_GirviRelease.Rows[i].Cells["GirviNoReleaseJama"].Value = girviadddate.Rows[0]["receipt_no"].ToString();//dt1.Rows[i]["pavtino"].ToString();//dt1.Rows[i]["Girvino"].ToString()
                                dgv_GirviRelease.Rows[i].Cells["DiscriptionJama"].Value    = descriptionnew;
                                dgv_GirviRelease.Rows[i].Cells["TotalAmountJama"].Value    = sumtotal.ToString();
                                dgv_GirviRelease.Rows[i].Cells["AmountJama"].Value         = dt1.Rows[i]["AmountDeposit"].ToString();
                                dgv_GirviRelease.Rows[i].Cells["InterestJama"].Value       = dt1.Rows[i]["Interest_Amount"].ToString();
                                dgv_GirviRelease.Rows[i].Cells["KhatawaniPanJama"].Value   = dt1.Rows[i]["Khatawani_no"].ToString();


                                string descriptionSagarpulgao = name.Rows[0]["FullName"].ToString() + ",\n" + name.Rows[0]["Address"].ToString() + "," + dt1.Rows[i]["pavtino"].ToString();
                                dgv_GirviRelease.Rows[i].Cells["ShortDesc"].Value      = descriptionSagarpulgao;
                                dgv_GirviRelease.Rows[i].Cells["GirviNoRelease"].Value = dt1.Rows[i]["pavtino"].ToString();

                                //try
                                //{
                                //    totalReleaseAmount = totalReleaseAmount + Convert.ToDouble(dgv_GirviRelease.Rows[i].Cells["AmountJama"].Value.ToString());
                                //}
                                //catch { }
                                //try
                                //{
                                //    totalinterestamt = totalinterestamt + Convert.ToDouble(dgv_GirviRelease.Rows[i].Cells["InterestJama"].Value.ToString());
                                //}
                                //catch { }
                            }
                            //double totalAmountJama = _objCommon.sumGridViewColumn(dgv_GirviRelease, "TotalAmountJama");
                            //totalReleaseAmount = _objCommon.sumGridViewColumn(dgv_GirviRelease, "AmountJama");
                            //totalinterestamt = _objCommon.sumGridViewColumn(dgv_GirviRelease, "InterestJama");

                            //dgv_GirviRelease.Rows.Add("Total= ", totalAmountJama.ToString(), totalReleaseAmount.ToString(), totalinterestamt.ToString());
                            //dgv_GirviRelease.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                            //dgv_GirviRelease.Rows[i].DefaultCellStyle.ForeColor = Color.White;
                            // label5.Text = totalReleaseAmount.ToString();
                        }

                        totalGirviAmount.ToString();
                        totalReleaseAmount.ToString();
                        totalinterestamt.ToString();


                        //ds.Tables.Add(dtmerge);
                        j++;
                        DataTable dtGirviDetails = _objCommon.DataGridView2DataTable(dgv_GirviAdded, "dtCustomerBill");
                        DataTable dtPaydetails   = _objCommon.DataGridView2DataTable(dgv_GirviRelease, "table");
                        DataTable dtMerge        = _objCommon.mergeTwoDataGrid(dtGirviDetails, dtPaydetails);

                        if (dt.Rows.Count > 0)
                        {
                            CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
                            SendData _obj = new SendData(_objfrm_ReportViewer.ReceiveRokadMultiRecord);
                            if (rbt_OtherTrue.Checked == true)
                            {
                                _obj(dtMerge, oPrintersetting.PrinterName, true, _objGirviCommon.getPageNumber((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy")));
                            }
                            else
                            {
                                _obj(dtMerge, oPrintersetting.PrinterName, false, _objGirviCommon.getPageNumber((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy")));
                            }
                            //  _objfrm_ReportViewer.Show();
                            //DataTable dtmerge=_objCommon.mergeTwoDataGrid(_objCommon.DataGridView2DataTable(dgv_GirviAdded,"table1"),_objCommon.DataGridView2DataTable(dgv_GirviRelease,"table2"));
                            //RokadoneNew(dtmerge, totalGirviAmount.ToString(), totalReleaseAmount.ToString(), totalinterestamt.ToString(), pageno);
                        }

                        if (dt1.Rows.Count > 0)
                        {
                            CrystalReport.frm_ReportViewer _objfrm_ReportViewer = new CrystalReport.frm_ReportViewer();
                            SendData _obj = new SendData(_objfrm_ReportViewer.ReceiveRokadMultiRecord);
                            if (rbt_OtherTrue.Checked == true)
                            {
                                _obj(dtMerge, oPrintersetting.PrinterName, true, _objGirviCommon.getPageNumber((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy")));
                            }
                            else
                            {
                                _obj(dtMerge, oPrintersetting.PrinterName, false, _objGirviCommon.getPageNumber((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j - 1)).ToString("dd/MM/yyyy")), _objGirviCommon.getOpeningBalanceWithlastDate((Convert.ToDateTime(dtp_StartDate.Text).AddDays(j)).ToString("dd/MM/yyyy")));
                            }
                            //  _objfrm_ReportViewer.Show();
                            //DataTable dtmerge=_objCommon.mergeTwoDataGrid(_objCommon.DataGridView2DataTable(dgv_GirviAdded,"table1"),_objCommon.DataGridView2DataTable(dgv_GirviRelease,"table2"));
                            //RokadoneNew(dtmerge, totalGirviAmount.ToString(), totalReleaseAmount.ToString(), totalinterestamt.ToString(), pageno);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #9
0
        private void bttn_Generate_Click(object sender, EventArgs e)
        {
            dgv_GST.Rows.Clear();
            int       i        = 0;
            DataTable Supplier = _purchase.GetSupplierDetail(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"));

            for (i = 0; i < Supplier.Rows.Count; i++)
            {
                //For 0% Item
                DataTable ZeroPer = _purchase.SupplierGSTReportZerPer(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"), Supplier.Rows[i]["Name"].ToString(), "0", "0");

                //Rest of Slabs
                DataTable FivePer     = _purchase.SupplierGSTReport(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"), Supplier.Rows[i]["Name"].ToString(), "2.5", "5");
                DataTable TwelvePer   = _purchase.SupplierGSTReport(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"), Supplier.Rows[i]["Name"].ToString(), "6", "12");
                DataTable EighteenPer = _purchase.SupplierGSTReport(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"), Supplier.Rows[i]["Name"].ToString(), "9", "18");
                DataTable TwentyEtPer = _purchase.SupplierGSTReport(dtp_From.Value.ToString("dd/MM/yyyy"), dtp_to.Value.ToString("dd/MM/yyyy"), Supplier.Rows[i]["Name"].ToString(), "14", "28");



                dgv_GST.Rows.Add(i + 1, Supplier.Rows[i]["Name"], Supplier.Rows[i]["GSTIN"], Supplier.Rows[i]["State"]);

                dgv_GST.Rows[i].Cells[4].Value = ZeroPer.Rows[0]["Taxable"];

                dgv_GST.Rows[i].Cells[5].Value = FivePer.Rows[0]["Taxable"];
                dgv_GST.Rows[i].Cells[6].Value = FivePer.Rows[0]["CGST"];
                dgv_GST.Rows[i].Cells[7].Value = FivePer.Rows[0]["SGST"];
                dgv_GST.Rows[i].Cells[8].Value = FivePer.Rows[0]["IGST"];

                dgv_GST.Rows[i].Cells[9].Value  = TwelvePer.Rows[0]["Taxable"];
                dgv_GST.Rows[i].Cells[10].Value = TwelvePer.Rows[0]["CGST"];
                dgv_GST.Rows[i].Cells[11].Value = TwelvePer.Rows[0]["SGST"];
                dgv_GST.Rows[i].Cells[12].Value = TwelvePer.Rows[0]["IGST"];

                dgv_GST.Rows[i].Cells[13].Value = EighteenPer.Rows[0]["Taxable"];
                dgv_GST.Rows[i].Cells[14].Value = EighteenPer.Rows[0]["CGST"];
                dgv_GST.Rows[i].Cells[15].Value = EighteenPer.Rows[0]["SGST"];
                dgv_GST.Rows[i].Cells[16].Value = EighteenPer.Rows[0]["IGST"];

                dgv_GST.Rows[i].Cells[17].Value = TwentyEtPer.Rows[0]["Taxable"];
                dgv_GST.Rows[i].Cells[18].Value = TwentyEtPer.Rows[0]["CGST"];
                dgv_GST.Rows[i].Cells[19].Value = TwentyEtPer.Rows[0]["SGST"];
                dgv_GST.Rows[i].Cells[20].Value = TwentyEtPer.Rows[0]["IGST"];
            }

            dgv_GST.Rows.Add(2);
            int j = i + 1;

            dgv_GST.Rows[j].Cells[3].Value = "Total";

            dgv_GST.Rows[j].Cells[4].Value = _common.sumGridViewColumn(dgv_GST, "AmountZero");

            dgv_GST.Rows[j].Cells[5].Value = _common.sumGridViewColumn(dgv_GST, "Amt5per");
            dgv_GST.Rows[j].Cells[6].Value = _common.sumGridViewColumn(dgv_GST, "SGST5per");
            dgv_GST.Rows[j].Cells[7].Value = _common.sumGridViewColumn(dgv_GST, "CGST5per");
            dgv_GST.Rows[j].Cells[8].Value = _common.sumGridViewColumn(dgv_GST, "IGST5per");

            dgv_GST.Rows[j].Cells[9].Value  = _common.sumGridViewColumn(dgv_GST, "Amt12per");
            dgv_GST.Rows[j].Cells[10].Value = _common.sumGridViewColumn(dgv_GST, "SGST12per");
            dgv_GST.Rows[j].Cells[11].Value = _common.sumGridViewColumn(dgv_GST, "CGST12per");
            dgv_GST.Rows[j].Cells[12].Value = _common.sumGridViewColumn(dgv_GST, "IGST12per");

            dgv_GST.Rows[j].Cells[13].Value = _common.sumGridViewColumn(dgv_GST, "Amt18per");
            dgv_GST.Rows[j].Cells[14].Value = _common.sumGridViewColumn(dgv_GST, "SGST18per");
            dgv_GST.Rows[j].Cells[15].Value = _common.sumGridViewColumn(dgv_GST, "CGST18per");
            dgv_GST.Rows[j].Cells[16].Value = _common.sumGridViewColumn(dgv_GST, "IGST18per");

            dgv_GST.Rows[j].Cells[17].Value = _common.sumGridViewColumn(dgv_GST, "Amt28per");
            dgv_GST.Rows[j].Cells[18].Value = _common.sumGridViewColumn(dgv_GST, "SGST28per");
            dgv_GST.Rows[j].Cells[19].Value = _common.sumGridViewColumn(dgv_GST, "CGST28per");
            dgv_GST.Rows[j].Cells[20].Value = _common.sumGridViewColumn(dgv_GST, "IGST28per");

            GST = _common.DataGridView2DataTable(dgv_GST, "GST", 0);
        }