Esempio n. 1
0
        private void BtnAdd_MouseUp(object sender, MouseEventArgs e)
        {
            FormSettingMachine fMachine = new FormSettingMachine();
            DialogResult       Ret      = fMachine.ShowDialog();

            if (Ret == DialogResult.Yes)
            {
                Setup();
            }

            fMachine.Close();
            fMachine.Dispose();
        }
Esempio n. 2
0
        private void BtnEdit_MouseUp(object sender, MouseEventArgs e)
        {
            if (CheckDataAndSelect() == false)
            {
                return;
            }

            if (dgvMachine.CurrentRow.Selected == true)
            {
                DaoMachine Machine = (DaoMachine)dgvMachine.Rows[dgvMachine.CurrentCell.RowIndex].DataBoundItem;

                FormSettingMachine fMachine = new FormSettingMachine(Machine);

                DialogResult Ret = fMachine.ShowDialog();

                if (Ret == DialogResult.Yes)
                {
                    Setup();
                }

                fMachine.Close();
                fMachine.Dispose();
            }
        }