Esempio n. 1
0
        protected override ICollection <Domain.PaymentTerm> GetData()
        {
            ICollection <Domain.PaymentTerm> paymentTerms = new Collection <Domain.PaymentTerm>();
            var paymentType = new BLL.PaymentType();

            paymentType.LoadAll();
            while (!paymentType.EOF)
            {
                paymentTerms.Add(new Domain.PaymentTerm {
                    PaymentTermID = paymentType.ID, Name = paymentType.Name
                });
                paymentType.MoveNext();
            }
            return(paymentTerms);
        }
 /// <summary>
 /// Generates the matrix for A new user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void GenerateMatrixForANewUser(int userID)
 {
     BLL.PaymentType paymentType = new PaymentType();
     paymentType.LoadAll();
     while (!paymentType.EOF)
     {
         BLL.UserPaymentType usrPayment = new UserPaymentType();
         usrPayment.AddNew();
         usrPayment.UserID        = userID;
         usrPayment.PaymentTypeID = paymentType.ID;
         usrPayment.CanAccess     = false;
         usrPayment.IsDefault     = false;
         usrPayment.Save();
         paymentType.MoveNext();
     }
 }