private ZCRMUserTheme GetZCRMUserTheme(JObject themeDetails)
        {
            ZCRMUserTheme themeInstance = ZCRMUserTheme.GetInstance();

            themeInstance.NormalTabFontColor    = (string)themeDetails["normal_tab"]["font_color"];
            themeInstance.NormalTabBackground   = (string)themeDetails["normal_tab"]["background"];
            themeInstance.SelectedTabFontColor  = (string)themeDetails["selected_tab"]["font_color"];
            themeInstance.SelectedTabBackground = (string)themeDetails["selected_tab"]["background"];
            themeInstance.New_background        = (string)themeDetails["new_background"];
            themeInstance.Background            = (string)themeDetails["background"];
            themeInstance.Screen = (string)themeDetails["screen"];
            themeInstance.Type   = (string)themeDetails["type"];
            return(themeInstance);
        }
예제 #2
0
        /** To get All Users */
        public void GetAllUsers()
        {
            ZCRMRestClient             restClient = ZCRMRestClient.GetInstance();
            BulkAPIResponse <ZCRMUser> response   = restClient.GetOrganizationInstance().GetAllUsers();
            List <ZCRMUser>            allUsers   = response.BulkData; // users - list of ZCRMUser instances

            foreach (ZCRMUser user in allUsers)
            {
                Console.WriteLine(user.Country);
                ZCRMRole Role = user.Role;
                if (Role != null)
                {
                    Console.WriteLine(Role.Id);
                    Console.WriteLine(Role.Name);
                }
                if (user.CustomizeInfo != null)
                {
                    ZCRMUserCustomizeInfo customizeInfo = user.CustomizeInfo;
                    Console.WriteLine(customizeInfo.NotesDesc);
                    Console.WriteLine(customizeInfo.IsToShowRightPanel);
                    Console.WriteLine(customizeInfo.IsBcView);
                    Console.WriteLine(customizeInfo.IsToShowHome);
                    Console.WriteLine(customizeInfo.IsToShowDetailView);
                    Console.WriteLine(customizeInfo.UnpinRecentItem);
                }
                Console.WriteLine(user.City);
                Console.WriteLine(user.Signature);
                Console.WriteLine(user.NameFormat);
                Console.WriteLine(user.Language);
                Console.WriteLine(user.Locale);
                Console.WriteLine(user.MicrosoftAppUser);
                Console.WriteLine(user.IsPersonalAccount);
                Console.WriteLine(user.IsOnline);
                Console.WriteLine(user.DefaultTabGroup);
                ZCRMUser ModifiedBy = user.ModifiedBy;
                if (ModifiedBy != null)
                {
                    Console.WriteLine(ModifiedBy.Id);
                    Console.WriteLine(ModifiedBy.FullName);
                }
                Console.WriteLine(user.Number);
                Console.WriteLine(user.Street);
                Console.WriteLine(user.Alias);
                if (user.Theme != null)
                {
                    ZCRMUserTheme theme = user.Theme;
                    Console.WriteLine(theme.NormalTabFontColor);
                    Console.WriteLine(theme.NormalTabBackground);
                    Console.WriteLine(theme.SelectedTabFontColor);
                    Console.WriteLine(theme.SelectedTabBackground);
                    Console.WriteLine(theme.New_background);
                    Console.WriteLine(theme.Background);
                    Console.WriteLine(theme.Screen);
                    Console.WriteLine(theme.Type);
                }
                Console.WriteLine(user.Id);
                Console.WriteLine(user.State);
                Console.WriteLine(user.Fax);
                Console.WriteLine(user.CountryLocale);
                Console.WriteLine(user.FirstName);
                Console.WriteLine(user.EmailId);
                ZCRMUser ReportingTo = user.ReportingTo;
                if (ReportingTo != null)
                {
                    Console.WriteLine(ReportingTo.Id);
                    Console.WriteLine(ReportingTo.FullName);
                }
                Console.WriteLine(user.Zip);
                Console.WriteLine(user.DecimalSeparator);
                Console.WriteLine(user.CreatedTime);
                Console.WriteLine(user.ModifiedTime);
                Console.WriteLine(user.Website);
                Console.WriteLine(user.TimeFormat);
                Console.WriteLine(user.OffSet);
                ZCRMProfile Profile = user.Profile;
                if (Profile != null)
                {
                    Console.WriteLine(Profile.Id);
                    Console.WriteLine(Profile.Name);
                }
                Console.WriteLine(user.Mobile);
                Console.WriteLine(user.LastName);
                Console.WriteLine(user.TimeZone);
                ZCRMUser CreatedBy = user.CreatedBy;
                if (CreatedBy != null)
                {
                    Console.WriteLine(CreatedBy.Id);
                    Console.WriteLine(CreatedBy.FullName);
                }
                Console.WriteLine(user.ZuId);
                Console.WriteLine(user.Confirm);
                Console.WriteLine(user.FullName);
                if (user.Territories != null && user.Territories.Count > 0)
                {
                    foreach (ZCRMTerritory territory in user.Territories)
                    {
                        Console.WriteLine(territory.IsManager);
                        Console.WriteLine(territory.Name);
                        Console.WriteLine(territory.Id);
                    }
                }
                Console.WriteLine(user.Phone);
                Console.WriteLine(user.DateOfBirth);
                Console.WriteLine(user.DateFormat);
                Console.WriteLine(user.Status);
            }
        }