Esempio n. 1
0
 /// <summary>
 /// Calls corresponding voucher on ViewDetails button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnViewDetails_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvpdcPayableRegister.CurrentRow != null)
         {
             decimal       decMasterId      = Convert.ToDecimal(dgvpdcPayableRegister.CurrentRow.Cells["dgvpdcPayableMasterId"].Value.ToString());
             frmPdcPayable frmpdcPayableObj = new frmPdcPayable();
             frmpdcPayableObj.MdiParent = formMDI.MDIObj;
             frmpdcPayableObj.CallFromPDCPayableRegister(this, decMasterId);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PPREG14:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Calls corresponding voucher on cell double click in Datagridview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvpdcPayableRegister_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1)
                {
                    if (dgvpdcPayableRegister.CurrentRow != null)
                    {
                        decimal       decMasterId      = Convert.ToDecimal(dgvpdcPayableRegister.Rows[e.RowIndex].Cells["dgvpdcPayableMasterId"].Value.ToString());
                        frmPdcPayable frmpdcPayableObj = new frmPdcPayable();

                        frmpdcPayableObj.MdiParent = formMDI.MDIObj;
                        frmpdcPayableObj.CallFromPDCPayableRegister(this, decMasterId);
                        txtFromDate.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PPREG13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }