public Models.Subscription CreatIndividualSubs(IndApplicant a, int n, SubDuration s) { Models.Subscription subind = new Models.Subscription { App1 = a, NumberOfCopies = n, SubDuration = s }; subsList.Add(subind); return(subind); }
public SubcscriptionIndVM() { App1 = new IndApplicant(); subcatalog = new SubscriptionCatalog(); appcatalog = new ApplicantCatalog(); makeSubscription = new RelayCommand(MakeNewSubscription); ListInd = new ObservableCollection <Subscription>(); clean = new ObjectClean(); // load default data which is avaliable in the file //LoadDafaultData(); }
private void MakeNewSubscription(object obj) { string name = Name; string add = Address; string email = Email; string phone = Phone; string cardholder = CardHolder; string cardno = CardNo; DateTime expdate = ExpDate; int cvv = Cvv; int nocopy = NumberOfCopies; SubDuration subdur = SubDuration; IndApplicant appind = appcatalog.CreateIndApplicant(name, add, email, phone, cardholder, cardno, expdate, cvv); Models.Subscription sub = subcatalog.CreatIndividualSubs(appind, nocopy, subdur); List.Add(sub); }
// make a method to create induvidual Applicant public IndApplicant CreateIndApplicant(string n, string address, string email, string ph, string cardH, string cardNo, DateTime expDate, int cvv) { appList = new List <Applicant>(); IndApplicant app1 = new IndApplicant { Name = n, Address = address, Email = email, Phone = ph, CardHolder = cardH, CardNo = cardNo, ExpDate = expDate, Cvv = cvv }; // the list add the aplicant to intself appList.Add(app1); return(app1); }
public Subscription(IndApplicant a, int n, int s) { this.a = a; this.n = n; this.s = s; }