private void button1_Click(object sender, EventArgs e) { string ipaddress = kryptonComboBoxControllerIp.Text.Trim(); String Temp = "UserID=" + 7; StringBuilder Data = new StringBuilder(Temp); //int ret = DllC0402.setDeviceData(ipaddress, "ControllerInfo","ControllerID=241,ControllerType=1,ControllerName='Controller1',ControllerLocation='XXXXX',EncryptionType=0,ControllerVersion='Vxx.xx.xx-x',ControllerMAC='AA:BB:CC:DD:EE:FF',ControllerIP='192.168.1.241',ControllerSubnetMask='255.255.255.0',ControllerGateway='192.168.1.1',ControllerPort=1200,ControllerDNS='8.8.8.8',ControllerBUDNS='114.114.114.114',ControllerAddr485=0,ControllerBaudrate=115200,ControllerDataBits=8,ControllerStopBits=1,ControllerParityCheck='None',ControllerFlowControl='None',ControllerSAM=0,ControllerSAMType=0,DoorUnitCounts=2,ExpansionBoardCounts=0", ""); int ret = DllC0402.deleteDeviceData(ipaddress, "UserInfo", Data, ""); if (ret >= 0) { MyMessageBox.MessageBoxOK("success"); } }
private void buttonDeleteTriggerEvent_Click(object sender, EventArgs e) { string ipaddress = kryptonComboBoxControllerIp.Text.Trim(); String Temp = "EventID='" + textBoxDeleteTriggerEvent.Text.Trim() + "'"; StringBuilder Data = new StringBuilder(Temp); int ret = DllC0402.deleteDeviceData(ipaddress, DllC0402.TRRIGEREVENTTABLENAME, Data, ""); if (ret >= 0) { toolStripStatusLabel2.Text = MyMessageBox.getStringFromRes("textDeleteBlackUserInfoSuccess"); } else { toolStripStatusLabel2.Text = MyMessageBox.getStringFromRes("textDeviceIsNotOnline"); } }