Ejemplo n.º 1
0
        public override string ToString()
        {
            var sb = new StringBuilder(
                String.Format("CartRecord. RecordId = {0}, CartId = {1}, AlbumId = {2}, Count = {3}, DateCreated = {4}",
                              RecordId, CartId, AlbumId, Count, DateCreated.ToShortDateString()));

            if (Album != null)
            {
                sb.AppendLine();
                sb.Append(Album);
            }

            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public async Task <ClaimsIdentity> GenerateUserIdentityAsync(UserManager <ApplicationUser> manager)
        {
            // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
            var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);

            // Add custom user claims here
            userIdentity.AddClaim(new Claim("FirstName", FirstName));
            userIdentity.AddClaim(new Claim("LastName", LastName));
            userIdentity.AddClaim(new Claim("DateOfBirth", DateOfBirth.ToShortDateString()));
            userIdentity.AddClaim(new Claim("Height", Height.ToString()));
            userIdentity.AddClaim(new Claim("Gender", Gender));
            userIdentity.AddClaim(new Claim("DateCreated", DateCreated.ToShortDateString()));
            userIdentity.AddClaim(new Claim("Theme", Theme));

            return(userIdentity);
        }
Ejemplo n.º 3
0
        public string ToQueryString()
        {
            string returnString = "(";

            returnString += "'" + ParentId.ToString() + "', ";                                  // 1
            returnString += "'" + Title + "', ";                                                // 2
            returnString += "'" + ShortDescription + "', ";                                     // 3
            returnString += "'" + DetailedDescription + "', ";                                  // 4
            returnString += "'" + ParentProject.ToString() + "', ";                             // 5
            returnString += "'" + DateCreated.ToShortDateString() + "', ";                      // 6
            returnString += "'" + CreatedBy.ToString() + "', ";                                 // 7
            returnString += "'" + DateCompleted.ToShortDateString() + "', ";                    // 8
            returnString += "'" + CompletedBy.ToString() + "', ";                               // 9
            returnString += "'" + DeadLine.ToShortDateString() + "', ";                         //10
            returnString += "'" + Status + "'";                                                 //11

            return(returnString += ")");
        }         // End of ToQueryString()
Ejemplo n.º 4
0
        }         // End of Constructor

        public string ToQueryString()
        {
            string returnString = "(";

            returnString += "'" + Title + "', ";                                                // 1
            returnString += "'" + ShortDescription + "', ";                                     // 2
            returnString += "'" + DetailedDescription + "', ";                                  // 3
            returnString += "'" + CreatedBy + "', ";                                            // 4
            returnString += "'" + ProjectLead + "', ";                                          // 5
            returnString += "'" + DateCreated.ToShortDateString() + "', ";                      // 6
            returnString += "'" + LogURL + "', ";                                               // 7
            returnString += "'" + Notes + "', ";                                                // 8
            returnString += "'" + AvailibleFunds + "', ";                                       // 9
            returnString += "'" + CurrentYield + "', ";                                         //10
            returnString += "'" + DateTerminated.ToShortDateString() + "', ";                   //11
            returnString += "'" + TerminationReason + "', ";                                    //12
            returnString += "'" + TerminatedBy + "', ";                                         //13
            returnString += "'" + CollectedFunds + "', ";                                       //14
            returnString += "'" + ConsumedFunds + "'";                                          //15

            return(returnString += ")");
        }         // End of ToQueryString()
Ejemplo n.º 5
0
 // TODO: Add a ToString() override (does it require an IEnumerator or something?
 public override string ToString()
 {
     return($"Account Number:\t{AccountNumber}\nBank Name:\t{BankName}\nDate Created:\t{DateCreated.ToShortDateString()}\nBalance:\t{Balance:c}");
 }
Ejemplo n.º 6
0
 //constructor function for bank account class
 public BankAccount(Customer customer, string type, decimal initialBalance)
 {
     Owner       = customer.FullName;
     DateCreated = DateTime.Now;
     AccountType = type;
     MakeDeposit(initialBalance, DateTime.Now, "Initial Balance");
     AccNumber = seedAccNum;
     seedAccNum++;
     Note = $"Congratulations, a {AccountType} account with the number {AccNumber} has been created for {Owner} with CustomerId of {customer.CustomerId}. It was created on {DateCreated.ToShortDateString()} with an initial deposit of {initialBalance}";
     customer.myAccounts.Add(this);
 }