Beispiel #1
0
        private void btnChangeID_Click(object sender, EventArgs e)
        {
            string[] comPorts = SerialPort.GetPortNames();
            foreach (string com in comPorts)
            {
                if (Properties.Settings.Default.FirstDevice == com)
                {
                    sp.Dispose();
                    sp.Close();
                }
            }

            frmChangeID frm = new frmChangeID();

            frm.TraineeID = TraineeID;
            frm.type      = "مشترك";
            frm.ShowDialog();

            string[] comPorts_ = SerialPort.GetPortNames();
            foreach (string com in comPorts_)
            {
                if (Properties.Settings.Default.FirstDevice == com)
                {
                    sp.Open();
                }
            }

            getTrainee();
        }
Beispiel #2
0
        private void btnChangeID_Click(object sender, EventArgs e)
        {
            sp.Dispose();
            sp.Close();
            frmChangeID frm = new frmChangeID();

            frm.type      = "موظف";
            frm.TraineeID = EmployeeID;
            frm.ShowDialog();
            fill();
        }