Beispiel #1
0
        void InputNumbCardClickHandeler(object sender, EventArgs e)
        {
            int numb = 0;

            numb = IOF.InputXmlFile(numb, Properties.Resources.CardFile, myModel.list());
            StructCard Card = SearchCard(myModel.list(), out numb);

            if (!(Card == null))
            {
                if (atmInput.TextPassword.Text == Card.getPaswrod().ToString())
                {
                    atmInput.Hide();
                    ATMMenu ATMMenu = new ATMMenu();
                    _ = new PresentorATMMenu(ATMMenu, myModel);
                    myModel.IndexIn(numb);
                    ATMMenu.ShowDialog();
                    atmInput.Show();
                    atmInput.Hide();
                }
                else
                {
                    MessageBox.Show("Error Pasword", "Error");
                }
            }
            else
            {
                MessageBox.Show("This card is not exist", "Error");
            }
        }
Beispiel #2
0
 void InputNumbCardClickHandeler(object sender, EventArgs e)
 {
     if (Check.ProvValidCard(atmInput.TextNumberCard.Text, atmInput.TextNumberCard.Text.Length))
     {
         int numb = 0;
         numb = IOF.InputXmlFile(numb, "Card.xml", myModel.list());
         for (int i = 0; i < numb; i++)
         {
             if (myModel.equals(myModel.list()[i].getNumbcard(), atmInput.TextNumberCard.Text))
             {
                 if (atmInput.TextPassword.Text == myModel.list()[i].getPaswrod().ToString())
                 {
                     atmInput.Hide();
                     ATMMenu ATMMenu = new ATMMenu();
                     _ = new PresentorATMMenu(ATMMenu, myModel);
                     myModel.IndexIn(i);
                     ATMMenu.ShowDialog();
                     atmInput.Show();
                     atmInput.Hide();
                 }
                 else
                 {
                     atmInput.label3.Text = "Error Pasword";
                 }
             }
             else
             {
                 atmInput.label3.Text = "Number Card is'n Valid";
             }
         }
     }
 }