示例#1
0
        private void IDGenBtn_Click(object sender, EventArgs e)
        {
            NameTBox.Clear();
            Last_NameTBox.Clear();
            PositionTBox.Clear();
            KeyPassTBox.Clear();

            IDGenerator IDG = new IDGenerator();

            IDG.GenID();
            var _Verification = IDG.GenID();

            try
            {
                if (_Verification == IDG.NewID)
                {
                    IDTbox.Text = IDG.NewID;
                }
            }
            catch (Exception Ex)
            {
                var Message = Ex.ToString();
                MessageBox.Show(Message);
            }
        }
示例#2
0
 private void Erasebtn_Click(object sender, EventArgs e)
 {
     try
     {
         var WarningMesg = userModel.EraseAdvice(IDTbox.Text);
         if (WarningMesg == true)
         {
             DialogResult Result = MessageBox.Show("Are you sure to erase this ID information from the Data Base?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
             if (Result == DialogResult.Yes)
             {
                 userModel.Erase(IDTbox.Text);
                 MessageBox.Show("The ID information has been erased from the Data Base");
                 NameTBox.Clear();
                 Last_NameTBox.Clear();
                 PositionTBox.Clear();
                 KeyPassTBox.Clear();
                 ChargeTable();
             }
         }
     }
     catch (Exception Ex)
     {
         MessageBox.Show("An error has occurred: " + Ex);
     }
 }
示例#3
0
 private void GuardForm_Load(object sender, EventArgs e)
 {
     IDTbox.Clear();
     NameTBox.Clear();
     Last_NameTBox.Clear();
     PositionTBox.Clear();
     KeyPassTBox.Clear();
     Access_LevelTBox.Clear();
 }
示例#4
0
 private void MasterForm_Load(object sender, EventArgs e)
 {
     IDTbox.Clear();
     NameTBox.Clear();
     Last_NameTBox.Clear();
     PositionTBox.Clear();
     KeyPassTBox.Clear();
     ChargeTable();
 }
示例#5
0
 private void IDTbox_TextChanged(object sender, EventArgs e)
 {
     UpdateBtn.Visible     = false;
     KeyPassGenBtn.Visible = false;
     Access_LevelTBox.Clear();
     NameTBox.Clear();
     Last_NameTBox.Clear();
     PositionTBox.Clear();
     KeyPassTBox.Clear();
 }