Exemple #1
0
        private void BtnGetDeviceTime_Click(object sender, EventArgs e)
        {
            int machineNumber = int.Parse(tbxMachineNumber.Text.Trim());
            int dwYear        = 0;
            int dwMonth       = 0;
            int dwDay         = 0;
            int dwHour        = 0;
            int dwMinute      = 0;
            int dwSecond      = 0;

            objZkeeper.GetDeviceTime(machineNumber, ref dwYear, ref dwMonth, ref dwDay, ref dwHour, ref dwMinute, ref dwSecond);

            string deviceTime = new DateTime(dwYear, dwMonth, dwDay, dwHour, dwMinute, dwSecond).ToString();
            List <DeviceTimeInfo> lstDeviceInfo = new List <DeviceTimeInfo>
            {
                new DeviceTimeInfo()
                {
                    DeviceTime = deviceTime
                }
            };

            BindToGridView(lstDeviceInfo);
        }