static void Main(string[] args) { DeviceManipulator manipulator = new DeviceManipulator(); ZkemClient objZkeeper = new ZkemClient(); setting = ReadSetting(); SendEmail("hey tayo hey tayo bus kecil ramah lingkungan"); try { objZkeeper.Connect_Net(setting.IpAddress, Int32.Parse(setting.Port)); } catch (Exception ex) { WriteToErrorLog("Something wrong with Connect_net()", ex.ToString()); } var machineLogs = GetMachineLog(manipulator, objZkeeper); var attendanceTempLog = ReadAttendanceTempLog(); attendanceTempLog = AddNewMachineLogToTemp(machineLogs, attendanceTempLog); attendanceTempLog = GenerateAttendanceLogToHit(attendanceTempLog); WriteAttendanceTempLog(attendanceTempLog); try { objZkeeper.Disconnect(); } catch (Exception ex) { WriteToErrorLog("Something wrong with Disconnect()", ex.ToString()); //WriteToErrorLog(ex.ToString()); } }
private void Disconnect() { objZkeeper.Disconnect(); }