コード例 #1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //this.Hide();
            if (cmbViewType.Text == "Daily")
            {
                try
                {
                    Global.ledgyear = Convert.ToInt32(cmbYear.Text);
                }
                catch (Exception)
                {
                    Global.ledgyear = 0;
                }
                try
                {
                    Global.ledgmon = cmbMonth.SelectedIndex + 1;
                }
                catch (Exception)
                {
                    Global.ledgmon = 0;
                }
            }
            else
            {
                Global.ledgyear = 0;
                Global.ledgmon  = 0;
            }
            frmLedger.mGlid   = dataGridView1.Rows[e.RowIndex].Cells["GLID"].Value.ToString();
            frmLedger.mSlid   = dataGridView1.Rows[e.RowIndex].Cells["SLID"].Value.ToString();
            frmLedger.mLedger = dataGridView1.Rows[e.RowIndex].Cells["LEDGER"].Value.ToString();
            frmLedger F = new frmLedger();

            F.ShowDialog();
        }
コード例 #2
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Global.ledgyear = 0;
            Global.ledgmon  = 0;

            frmLedger.mSlid = dataGridView1.Rows[e.RowIndex].Cells["SLID"].Value.ToString();

            try
            {
                frmLedger.mSlid = dataGridView1.Rows[e.RowIndex].Cells["SLID"].Value.ToString();
            }
            catch (Exception)
            {
                frmLedger.mSlid = "";
            }
            frmLedger.mLedger = dataGridView1.Rows[e.RowIndex].Cells["Particular"].Value.ToString();
            frmLedger F = new frmLedger();

            F.ShowDialog();
        }