예제 #1
0
        internal Transaction CreatePaymentSlip(TransactionType transactionType, double amount, string remarks, User user, DateTime? dueDate)
        {
            // Start transaction
            var retVal = new Transaction();
            retVal.TransactionType = transactionType;
            retVal.Amount = amount;
            retVal.CreationDate = DateTime.Now;
            retVal.Remarks = remarks;
            retVal.DueDate = dueDate;
            retVal.Status = TransactionStatus.Pending.ToString();

            retVal.TransactionNo = Context.Instance.Group.NewTransactionNo();

            //TODO save transaction

            return retVal;
        }
예제 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUsers(User user)
 {
     base.AddObject("Users", user);
 }
예제 #3
0
 /// <summary>
 /// Create a new User object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="contact">Initial value of the Contact property.</param>
 /// <param name="postalAddress">Initial value of the PostalAddress property.</param>
 /// <param name="permanentAddress">Initial value of the PermanentAddress property.</param>
 /// <param name="dOB">Initial value of the DOB property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 public static User CreateUser(global::System.Int32 id, Name name, ContactInfo contact, Address postalAddress, Address permanentAddress, global::System.DateTime dOB, global::System.String status)
 {
     User user = new User();
     user.Id = id;
     user.Name = StructuralObject.VerifyComplexObjectIsNotNull(name, "Name");
     user.Contact = StructuralObject.VerifyComplexObjectIsNotNull(contact, "Contact");
     user.PostalAddress = StructuralObject.VerifyComplexObjectIsNotNull(postalAddress, "PostalAddress");
     user.PermanentAddress = StructuralObject.VerifyComplexObjectIsNotNull(permanentAddress, "PermanentAddress");
     user.DOB = dOB;
     user.Status = status;
     return user;
 }