/// <summary>
 /// Delete Function
 /// </summary>
 /// <param name="decContraMasterId"></param>
 public void DeleteFunction(decimal decContraMasterId)
 {
     try
     {
         //ContraDetailsSP spContraDetails = new ContraDetailsSP();
         ContraVoucherDetailsBll bllContraVoucherDetails = new ContraVoucherDetailsBll();
         bllContraVoucherDetails.ContraVoucherDelete(decContraMasterId, DecContraVoucherTypeId, strVoucherNo);
         Messages.DeletedMessage();
         this.Close();
         if (frmsearch != null)
         {
             this.Close();
             frmsearch.GridFill();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CV:18" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }