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()); }
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); }
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()
} // 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()
// 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}"); }
//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); }