Exemple #1
0
        private void yearly()
        {
            dgv_InterestDetail.Rows.Clear();
            DataTable dtFiancialYear = _objFinancialYear.getFinancialYear();

            try
            {
                double sum = 0;
                int    i;
                int    j    = 0;
                int    year = Convert.ToInt32(Convert.ToDateTime(dtFiancialYear.Rows[0]["startyear"].ToString()).Year + Convert.ToDateTime(dtFiancialYear.Rows[0]["endyear"].ToString()).Year);
                for (i = 0; i < dtFiancialYear.Rows.Count; i++)
                {
                    string space     = " to";
                    string StartDate = (dtFiancialYear.Rows[i]["startyear"].ToString());
                    string EndDate   = (dtFiancialYear.Rows[i]["endyear"].ToString());
                    string yera3     = StartDate + space + EndDate;

                    double dtInterstTotal = _objGirviCommon.getInterestTotal(StartDate, EndDate);


                    dgv_InterestDetail.Rows.Add(yera3, dtInterstTotal);
                }



                dgv_InterestDetail.Rows.Add("एकुण व्याज", sum.ToString());
                dgv_InterestDetail.Rows[dgv_InterestDetail.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Red;
                dgv_InterestDetail.Rows[dgv_InterestDetail.Rows.Count - 1].DefaultCellStyle.ForeColor = Color.White;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #2
0
        private void FillGrid()
        {
            dgv_YearsDetail.Rows.Clear();
            DataTable dtyear = _objFinancialYear.getFinancialYear();

            for (int i = 0; i < dtyear.Rows.Count; i++)
            {
                dgv_YearsDetail.Rows.Add();
                dgv_YearsDetail.Rows[i].Cells["StartYear"].Value = dtyear.Rows[i]["startyear"].ToString();
                dgv_YearsDetail.Rows[i].Cells["EndYear"].Value   = dtyear.Rows[i]["endyear"].ToString();
                dgv_YearsDetail.Rows[i].Cells["id"].Value        = dtyear.Rows[i]["id"].ToString();

                if (Convert.ToBoolean(dtyear.Rows[i]["isSelected"].ToString()) == true)
                {
                    dgv_YearsDetail.Rows[i].Cells["SelectedYear"].Value = true;
                }
                else
                {
                    dgv_YearsDetail.Rows[i].Cells["SelectedYear"].Value = false;
                }
            }
        }
Exemple #3
0
 private void FillGrid()
 {
     DataTable dtBalanceSheet = _objGirviCommon.getAllGirviData();
     DataTable dtFiancialYear = _objFinancialYear.getFinancialYear();
     int       month          = Convert.ToInt32(Convert.ToDateTime(dtFiancialYear.Rows[0]["startyear"].ToString()).Month);
 }
Exemple #4
0
        private void Refresh()
        {
            DataTable dt = _a.getallssetting();

            // Get crystal report list

            DirectoryInfo DirInfo = new DirectoryInfo(Environment.CurrentDirectory);

            foreach (FileInfo fi in DirInfo.GetFiles("*.rpt"))
            {
                cmb_SaleBillInterState.Items.Add(fi.Name);
                cmb_SaleBillOtherState.Items.Add(fi.Name);
                cmb_estimate.Items.Add(fi.Name);
                cmb_PurchaseBill.Items.Add(fi.Name);
                cmb_ServiceInc.Items.Add(fi.Name);
            }

            //2 Barcode
            txt_barcode.Text = dt.Rows[0]["BarcodeCount"].ToString();
            //4 Bill Count
            txt_print.Text = dt.Rows[0]["BillCount"].ToString();
            //1 Barcode Check
            if (dt.Rows[0]["Barcode"].ToString() == "Yes")
            {
                rbt_yes1.Checked = true;
            }
            else
            {
                rbt_No1.Checked = true;
            }
            //3 Barcode Type
            cmb_BarcodeType.Text = dt.Rows[0]["BarcodeType"].ToString();

            //Bill Type
            cmb_BillType.Text = dt.Rows[0]["BillType"].ToString();

            //4 maintain
            cmb_maintain.Text = dt.Rows[0]["Maintenance"].ToString();

            //5 Set Crystal Report
            cmb_SaleBillInterState.Text = _a.GetSaleBillName().Rows[0]["SaleBill"].ToString();
            cmb_SaleBillOtherState.Text = _a.GetSaleBillName().Rows[6]["SaleBill"].ToString();
            cmb_estimate.Text           = _a.GetSaleBillName().Rows[1]["SaleBill"].ToString();
            cmb_PurchaseBill.Text       = _a.GetSaleBillName().Rows[2]["SaleBill"].ToString();
            cmb_ServiceInc.Text         = _a.GetSaleBillName().Rows[3]["SaleBill"].ToString();

            //6 payment form

            if (dt.Rows[0]["PaymentForm"].ToString() == "1")
            {
                rbt_PaymentYes.Checked = true;
            }
            else
            {
                rbt_PaymentNo.Checked = true;
            }

            //7 Get Financial Year
            DataTable yr    = _f.getFinancialYear();
            string    start = yr.Rows[0]["startyear"].ToString();
            string    end   = yr.Rows[0]["endyear"].ToString();

            dtp_start.Value = Convert.ToDateTime(start);
            dtp_end.Value   = Convert.ToDateTime(end);

            //8 Estimate Payment Form
            if (dt.Rows[0]["EstimatePayment"].ToString() == "1")
            {
                rbt_EstPayYes.Checked = true;
            }
            else
            {
                rbt_EstPayNo.Checked = true;
            }

            //9 Extra Charges Included

            cmb_ExtraCharges.Text = dt.Rows[0]["ExtraChargesInc"].ToString();

            //10 GST Rate
            if (dt.Rows[0]["GSTRate"].ToString() == "1")
            {
                rbt_GSTInc.Checked = true;
            }
            else
            {
                rbt_GSTExc.Checked = true;
            }
        }