Exemplo n.º 1
0
        public static void SendPasswordResetEmail(IUserBasicDetail to, string newPass)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(new cfEmail(
                                    "Your Climbfind password has been reset",
                                    "Your new password is: " + newPass + "<br /><br />Once logged in your can change your password at https://accounts.climbfind.com/account/changepassword",
                                    new MailAddress(toEmail, to.FullName), Stgs.MailMan));
        }
Exemplo n.º 2
0
        public static void SendCommentEmail(IUserBasicDetail to, IUserBasicDetail by, Guid postID, string commentMessage)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(new cfEmail(
                                    string.Format("{0} made a comment", by.FullName),
                                    HtmlBodyGenerator.GetCommentBody(postID, by.ID, "climber/" + by.ID, by.FullName, by.Avatar, commentMessage),
                                    new MailAddress(toEmail, to.FullName), Stgs.MailMan));
        }
Exemplo n.º 3
0
        public static void SendUserMessageEmail(IUserBasicDetail to, IUserBasicDetail from, string messageContent)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(new cfEmail(
                                    string.Format("{0} sent you a message", from.FullName),
                                    HtmlBodyGenerator.GetMessageBody(from.ID, "climber/" + from.ID, from.FullName, from.Avatar, messageContent),
                                    new MailAddress(toEmail, to.FullName), Stgs.MailMan));
        }
Exemplo n.º 4
0
 public PostCommentDto(PostComment c, IUserBasicDetail p)
 {
     ID    = c.ID.ToString("N");
     By    = p.DisplayName;
     ByID  = c.UserID.ToString("N");
     ByPic = p.Avatar;
     Msg   = c.Message;
     Utc   = c.Utc.ToEpochTimeString();
 }
Exemplo n.º 5
0
 public OpinionDto(Opinion o, IUserBasicDetail by)
 {
     ID      = o.ID.ToString("N");
     Rating  = o.Rating;
     Utc     = o.Utc.ToEpochTimeString();
     By      = by.DisplayName;
     ByID    = by.ID.ToString("N");
     ByPic   = by.Avatar;
     Comment = o.Comment;
 }
Exemplo n.º 6
0
 public ConversationItemDto(Conversation c, IUserBasicDetail with)
 {
     ID           = c.ID.ToString("N");
     LastExcerpt  = c.LastExcerpt;
     LastUtc      = c.LastActivityUtc.ToEpochTimeString();
     LastSenderID = c.LastSenderID.ToString("N");
     WithName     = with.FullName;
     WithID       = with.ID.ToString("N");
     WithAvatar   = with.Avatar;
 }
Exemplo n.º 7
0
        public static void SendPartnerCallEmail(IUserBasicDetail to, IUserBasicDetail by, CfCacheIndexEntry place,
                                                PartnerCall pc, string matchingSubscriptionPlaces)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(new cfEmail(
                                    string.Format("{0}'s PartnerCall for {1}", by.FullName, place.Name),
                                    HtmlBodyGenerator.GetPartnerCallBody(pc.ID, by.ID, "climber/" + by.ID, by.FullName,
                                                                         place.SlugUrl, place.Name, pc.StartDateTime, by.Avatar, pc.Comment, matchingSubscriptionPlaces),
                                    new MailAddress(toEmail, to.FullName), Stgs.MailMan));
        }
Exemplo n.º 8
0
        public ClimbDetailSentClimbDto(LoggedClimb log, IUserBasicDetail by)
        {
            ID         = log.ID.ToString("N");
            Comment    = log.Comment;
            Experience = log.Experince;
            Outcome    = log.Outcome;
            By         = by.DisplayName;
            ByID       = by.ID.ToString("N");
            ByPic      = by.Avatar;

            //Rating = log.Rating;
            //Utc = utc.ToEpochTimeString();
        }
 public ConversationDetailDto(Conversation c, IUserBasicDetail with, IUserBasicDetail me)
 {
     ID           = c.ID.ToString("N");
     LastExcerpt  = c.LastExcerpt;
     LastUtc      = c.LastActivityUtc.ToEpochTimeString();
     LastSenderID = c.LastSenderID.ToString("N");
     WithName     = with.DisplayName;
     WithID       = with.ID.ToString("N");
     WithAvatar   = with.Avatar;
     MeName       = me.DisplayName;
     MeAvatar     = me.Avatar;
     Messages     = new List <ConversationMessageDto>();
 }
Exemplo n.º 10
0
 public MediaDto(Media m, IUserBasicDetail by)
 {
     ID          = m.ID.ToString("N");
     Title       = m.Title;
     Type        = m.TypeID;
     Added       = m.AddedUtc.ToEpochTimeString();
     By          = by.DisplayName;
     ByID        = m.AddedByUserID.ToString("N");
     ByPic       = by.Avatar;
     Content     = m.Content;
     Rating      = m.Rating;
     RatingCount = m.RatingCount;
 }
Exemplo n.º 11
0
 public PartnerCallDto(CfCacheIndexEntry p, PartnerCall pc, IUserBasicDetail user)
 {
     ID            = pc.ID.ToString("N");
     PlaceID       = p.ID.ToString("N");
     Type          = (byte)p.Type;
     Country       = p.CountryID;
     PlaceName     = p.Name;
     Indoor        = pc.ForIndoor;
     Outdoor       = pc.ForOutdoor;
     CreatedUtc    = pc.CreatedUtc.ToEpochTimeString();
     StartDateTime = pc.StartDateTime.ToString("h:mm tt ddd MMM dd");
     if (!pc.HasDefaultEndDate)
     {
         EndDateTime = pc.EndDateTime.ToString("h:mm tt ddd MMM dd");
     }
     PerferredLevel = pc.PreferredLevel;
     Comment        = pc.Comment;
     ByID           = user.ID.ToString("N");
     By             = user.DisplayName;
     ByPic          = user.Avatar;
 }
Exemplo n.º 12
0
 public PartnerCallDto(CfCacheIndexEntry p, PartnerCall pc, IUserBasicDetail user)
 {
     ID = pc.ID.ToString("N");
     PlaceID = p.ID.ToString("N");
     Type = (byte)p.Type;
     Country = p.CountryID;
     PlaceName = p.Name;
     Indoor = pc.ForIndoor;
     Outdoor = pc.ForOutdoor;
     CreatedUtc = pc.CreatedUtc.ToEpochTimeString();
     StartDateTime = pc.StartDateTime.ToString("h:mm tt ddd MMM dd");
     if (!pc.HasDefaultEndDate)
     {
         EndDateTime = pc.EndDateTime.ToString("h:mm tt ddd MMM dd");
     }
     PerferredLevel = pc.PreferredLevel;
     Comment = pc.Comment;
     ByID = user.ID.ToString("N");
     By = user.DisplayName;
     ByPic = user.Avatar;
 }