Ejemplo n.º 1
0
        /// <summary>
        /// delete function
        /// </summary>
        /// <param name="decpdcMasterId"></param>
        public void DeleteFunction(decimal decpdcMasterId)
        {
            try
            {
                PDCClearanceMasterSP spPdcclearance = new PDCClearanceMasterSP();
                AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
                spPdcclearance.PDCClearanceDelete(decpdcMasterId, decPDCclearanceVoucherTypeId, strVoucherNo);
                Messages.DeletedMessage();
                if (pdcClearanceRegObj != null)
                {
                    this.Close();
                    pdcClearanceRegObj.Show();
                }
                else if (pdcClearanceReportObj != null)
                {
                    this.Close();
                    pdcClearanceReportObj.Show();
                }
                else if (objVoucherSearch != null)
                {
                    this.Close();
                    objVoucherSearch.GridFill();
                }
                else if (frmLedgerDetailsObj != null)
                {
                    this.Close();
                }
                else if (frmDayBookObj != null)
                {
                    this.Close();
                }
                else
                {
                    ClearFunction();
                }
                
            }
            catch (Exception ex)
            {
                MessageBox.Show("PC21:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
        }