Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HootsuiteClient"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 public HootsuiteClient(dynamic options)
 {
     _connection     = new Connection(options);
     _connectionOwly = new ConnectionOwly(options);
     //
     Me             = new Me(this, _connection);
     Media          = new Media(this, _connection);
     Members        = new Members(this, _connection);
     Messages       = new Messages(this, _connection);
     Organizations  = new Organizations(this, _connection);
     Scim           = new Scim(this, _connection);
     SocialProfiles = new SocialProfiles(this, _connection);
     Teams          = new Teams(this, _connection);
     Owly           = new Owly(this, _connectionOwly);
 }
Exemplo n.º 2
0
        private void SetSocialProfiles(DataItem data, Dictionary <string, DataItem> included)
        {
            if (data.Relationships == null || data.Relationships.SocialProfiles == null)
            {
                return;
            }

            foreach (var relationship in data.Relationships.SocialProfiles.Data)
            {
                var item = included.LocateItem(relationship);

                if (item == null)
                {
                    continue;
                }

                SocialProfiles.Add(new SocialProfileDTO(item));
            }
        }
Exemplo n.º 3
0
 public ActionResult Socials(SocialProfiles profiles)
 {
     if (db.SocialProfiles.Any())
     {
         var s = db.SocialProfiles.Where(w => w.DeletedDate == null).FirstOrDefault();
         s.Facebook     = profiles.Facebook;
         s.Google       = profiles.Google;
         s.Linked       = profiles.Linked;
         s.Skype        = profiles.Skype;
         s.Twitter      = profiles.Twitter;
         s.ModifiedDate = DateTime.UtcNow;
         db.SaveChanges();
         return(PartialView("~/Areas/Admin/Views/Dashboard/partial/_PartialSocialPro.cshtml", s));
     }
     profiles.CreationDate = DateTime.Now;
     db.SocialProfiles.Add(profiles);
     db.SaveChanges();
     return(View("EditCV"));
 }
Exemplo n.º 4
0
 public ActionResult AddSocialProfile(SocialProfiles SocProfil)
 {
     if (db.SocialProfiles.Any())
     {
         var S = db.SocialProfiles.FirstOrDefault();
         S.Facebook    = SocProfil.Facebook;
         S.Google      = SocProfil.Google;
         S.LinkedIn    = SocProfil.LinkedIn;
         S.Stumbleupon = SocProfil.Stumbleupon;
         S.Twitter     = SocProfil.Twitter;
         S.Dribble     = SocProfil.Dribble;
         S.Behance     = SocProfil.Behance;
         S.UpdateDate  = DateTime.Now;
         db.SaveChanges();
         return(RedirectToAction("EditCV"));
     }
     if (ModelState.IsValid)
     {
         SocProfil.CreatedDate = DateTime.Now;
         db.SocialProfiles.Add(SocProfil);
         db.SaveChanges();
     }
     return(RedirectToAction("EditCV"));
 }
Exemplo n.º 5
0
 public override string ToString()
 {
     return(string.Format("[Contact: Identifier={0}, NamePrefix={1}, GivenName={2}, MiddleName={3}, FamilyName={4}, PreviousFamilyName={5}, NameSuffix={6}, Nickname={7}, OrganizationName={8}, DepartmentName={9}, JobTitle={10}, PhoneticGivenName={11}, PhoneticMiddleName={12}, PhoneticFamilyName={13}, PhoneticOrganizationName={14}, Note={15}, Birthday={16}, PhoneNumbers={17}, Emails={18}, PostalAddresses={19}, Urls={20}, Relations={21}, SocialProfiles={22}, InstantMessageAddresses={23}, Dates={24}]",
                          Identifier, NamePrefix, GivenName, MiddleName, FamilyName, PreviousFamilyName, NameSuffix, Nickname, OrganizationName, DepartmentName, JobTitle, PhoneticGivenName, PhoneticMiddleName, PhoneticFamilyName, PhoneticOrganizationName, Note, Birthday,
                          PhoneNumbers.ToStringList(), Emails.ToStringList(), PostalAddresses.ToStringList(), Urls.ToStringList(), Relations.ToStringList(), SocialProfiles.ToStringList(), InstantMessageAddresses.ToStringList(), Dates.ToStringList()));
 }