public void TransferCardFrom(string cardNumber, string EmployerFrom, DateTime date)
        {
            foreach (CardObject CO in Cards)
            {
                if (CO.Number == cardNumber)
                {
                    Card = CO;
                    break;
                }
            }

            foreach (EmployerObject EOFrom in Employers)
            {
                if (EOFrom.FullName == EmployerFrom)
                {
                    if (!Card.IsCardReturned())
                    {
                        EOFrom.ReturnCard(Card, date);
                        //Card.ReturnCard(date);
                    }

                    Employer.AddCard(Card, date);
                    //Card.AddAction(date);
                    Card.EmployerName = Employer.FullName;
                    SaveEmployers();
                    break;
                }
            }

            Card = null;
        }
Пример #2
0
        public void AddNewCard(string n, string t, DateTime dt)
        {
            CardObject CO = new CardObject()
            {
                CardType = t, Number = n, EmployerName = Employer.FullName
            };

            Employer.AddCard(CO, dt);
            //Cards.Add(CO); // CARDS DISPOSING

            SaveEmployers();
        }
Пример #3
0
        public void AddNewCard(string n, string t, DateTime dt)
        {
            CardObject CO = new CardObject()
            {
                CardType = t, Number = n, EmployerName = Employer.FullName
            };

            Employer.AddCard(CO, dt);

            UStatus.UpdateValue(2);
            CollectedBits = UStatus.Value;
            SaveUserStatus();

            //Cards.Add(CO); // CARDS DISPOSING

            SaveEmployers();
        }