Exemplo n.º 1
0
        private void booksOfAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Details_Ledger fdel = new frm_Details_Ledger();

            fdel.comboBox1.Text = "Only This Ledger";
            fdel.Show();
        }
Exemplo n.º 2
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            frm_Details_Ledger fdel = new frm_Details_Ledger();

            fdel.comboBox1.Text = "Only This Ledger";
            fdel.Show();
        }
Exemplo n.º 3
0
        private void mnuBooksOfAccount_Click(object sender, EventArgs e)
        {
            frm_Details_Ledger fdel = new frm_Details_Ledger();

            fdel.comboBox1.Text = "Only This Ledger";
            fdel.Show();
            fdel.BringToFront();
        }
Exemplo n.º 4
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            if (e.RowIndex != 0 || e.RowIndex != dataGridView1.Rows.Count - 1)
            {
                string   date = dataGridView1.Rows[e.RowIndex].Cells["Month"].Value.ToString();
                DateTime dt   = DateTime.Today;

                string slgl = "";
                if (mSlid == "")
                {
                    slgl = mGlid.ToString() + "-00";
                }
                else
                {
                    slgl = mGlid.ToString() + "-" + mSlid.ToString();
                }


                try
                {
                    dt = Convert.ToDateTime(date);
                    frm_Details_Ledger f = new frm_Details_Ledger();
                    f.frmDt.Value = dt;
                    f.toDt.Value  = dt;
                    f.fillledgers();
                    f.cmbLedger.SelectedValue = slgl;
                    //f.comboBox1.Text = "Total Voucher";
                    f.comboBox1.Text = "Only This Ledger";
                    f.button1_Click(null, null);
                    f.Show();
                }
                catch (Exception)
                {
                    string stdt = "", enddt = "";
                    string mon         = "";
                    int    currentyear = Global.gFromDt.Year;

                    if (date == "January")
                    {
                        mon = "01";
                        currentyear++;
                    }
                    else if (date == "February")
                    {
                        mon = "02";
                        currentyear++;
                    }
                    else if (date == "March")
                    {
                        mon = "03";
                        currentyear++;
                    }
                    else if (date == "April")
                    {
                        mon = "04";
                    }
                    else if (date == "May")
                    {
                        mon = "05";
                    }
                    else if (date == "June")
                    {
                        mon = "06";
                    }
                    else if (date == "July")
                    {
                        mon = "07";
                    }
                    else if (date == "August")
                    {
                        mon = "08";
                    }
                    else if (date == "September")
                    {
                        mon = "09";
                    }
                    else if (date == "October")
                    {
                        mon = "10";
                    }
                    else if (date == "November")
                    {
                        mon = "11";
                    }
                    else if (date == "December")
                    {
                        mon = "12";
                    }

                    stdt = "01/" + mon + "/" + currentyear.ToString();

                    int day = DateTime.DaysInMonth(currentyear, Convert.ToInt32(mon));
                    enddt = day.ToString() + "/" + mon + "/" + currentyear.ToString();

                    frm_Details_Ledger f = new frm_Details_Ledger();
                    f.Show();
                    f.frmDt.Value = Convert.ToDateTime(stdt);
                    f.toDt.Value  = Convert.ToDateTime(enddt);
                    f.fillledgers();
                    f.cmbLedger.SelectedValue = slgl;
                    //f.comboBox1.Text = "Total Voucher";
                    f.comboBox1.Text = "Only This Ledger";
                    f.button1_Click(null, null);
                }
            }

            this.Cursor = Cursors.Default;
        }