public static void toggleSelectCheckBox(SAPbouiCOM.ItemEvent pVal, string dtName, string CellNumber) { SAPbouiCOM.DataTable variable = null; SAPbouiCOM.Form variable1 = null; XmlDocument xmlDocument = null; XmlNodeList xmlNodeLists = null; try { xmlDocument = new XmlDocument(); variable1 = MainObject.Instance.B1Application.Forms.Item(pVal.FormUID); variable = variable1.DataSources.DataTables.Item(dtName); xmlDocument.LoadXml(variable.SerializeAsXML(SAPbouiCOM.BoDataTableXmlSelect.dxs_DataOnly)); xmlNodeLists = xmlDocument.SelectNodes("/DataTable/Rows/Row/Cells/Cell[" + CellNumber + "]/Value"); if (xmlNodeLists.Count > 0) { foreach (XmlNode xmlNodes in xmlNodeLists) { if (xmlNodes.InnerText != "Y") { xmlNodes.InnerText = "Y"; } else { xmlNodes.InnerText = "N"; } } } variable.LoadSerializedXML(SAPbouiCOM.BoDataTableXmlSelect.dxs_DataOnly, xmlDocument.InnerXml); } catch (COMException cOMException1) { COMException cOMException = cOMException1; Exception exception = new Exception(Convert.ToString(string.Concat(new object[] { "COM Error::", cOMException.ErrorCode, "::", cOMException.Message, "::", cOMException.StackTrace }))); _Logger.Error("", exception); } catch (Exception exception2) { Exception exception1 = exception2; _Logger.Error("", exception2); } }