/// <summary>
 /// Function to use the cancel the salesOrder
 /// </summary>
 public void SalesOrderCancel()
 {
     try
     {
         SalesOrderBll bllSalesOrderMaster = new SalesOrderBll();
         bllSalesOrderMaster.SalesOrderCancel(decSalesOrderMasterId);
         Messages.InformationMessage("Cancelled successfully");
         if (frmSalesOrderRegisterObj != null)
         {
             this.Close();
             frmSalesOrderRegisterObj.GridFill();
         }
         if (frmSalesOrderReportObj != null)
         {
             this.Close();
             frmSalesOrderReportObj.GridFill();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SO51:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }