Exemplo n.º 1
0
        private void MakeNewSubscription(object obj)
        {
            string      name     = Name;
            string      add      = Address;
            string      email    = Email;
            string      phone    = Phone;
            string      title    = Title;
            string      mstop    = MailStop;
            string      cd       = CompanyDepartment;
            int         nocopy   = NumberOfCopies;
            string      password = Password;
            SubDuration subdur   = SubDuration;

            if (string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(Address) || string.IsNullOrEmpty(Email) ||
                string.IsNullOrEmpty(Phone) || string.IsNullOrEmpty(Title) || string.IsNullOrEmpty(MailStop) ||
                string.IsNullOrEmpty(CompanyDepartment) || NumberOfCopies == 0 || string.IsNullOrEmpty(Password))
            {
                CheckInput();
            }
            else
            {
                App2 = appcatalog.CreateCorpApplicant(name, add, email, phone, title, mstop, cd, password);
                Subscription sub = subcatalog.CreatCorporateSubs(App2, nocopy, subdur);
                List.Add(sub);
                //facade.SaveSubscriptionAsXaml(List);
                clean.SaveCorporate(List);
            }
        }
Exemplo n.º 2
0
        public async void RenewCorporate(object obj)
        {
            int          noCopies       = NoOfCopies;
            SubDuration  subscrDuration = SubsDuration;
            Subscription subscr2        = subcatalog.CreatCorporateSubs(App2, noCopies, SubsDuration);

            ListOfRenews.Add(subscr2);
            clean.SaveCorporate(ListOfRenews);
        }