Exemplo n.º 1
0
        /// <summary>
        /// 新增設備按下事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TsBtnAddDevice_MouseUp(object sender, MouseEventArgs e)
        {
            FormTimeClock FormTC = new FormTimeClock();

            if (FormTC.ShowDialog() == DialogResult.Yes)
            {
                ReadMachineInfo();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 編輯設備按下事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TsBtnEditDevice_MouseUp(object sender, MouseEventArgs e)
        {
            //判斷是否有選擇設備;//
            if (dgvDevice.SelectedRows.Count <= 0)
            {
                MessageBoxEx.Show(this, "請先選擇設備!", "訊息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FormTimeClock FormTC = new FormTimeClock();

            FormTC.LoadDevice(dgvDevice.SelectedRows[0].Cells["columnID"].Value.ToInt());
            if (FormTC.ShowDialog() == DialogResult.Yes)
            {
                ReadMachineInfo();
            }
        }