public List<string> GetPins(ref PinInterestUser objPinUser, int MaxPin)
        {
            string CategoryName = string.Empty;
            //List<string> _Pins = new List<string>();
            try
            {
                PinterestPins pintrestPins = new PinterestPins();

                // int EmailCount = lstAccounts.Count;
                int EmailCount = LoadedAccountCount;

                int PageCount = ((MaxPin * EmailCount) / 25) + 2;

                if (PageCount > 10)
                {
                    PageCount = 10;
                }

                //if (rbPinType.Checked)
                //{
                   try
                    {
                        //if (rbPopularPin.Checked)
                        //{
                            //  if (lstPins.Count <= 0)
                            //{
                        ClGlobul.lstPins = pintrestPins.PopularPins(PageCount, ref objPinUser);
                            //}
                        //}
                        //else if (rbVideoPin.Checked)
                        //{
                                if (ClGlobul.lstPins.Count <= 0)
                                {
                                    ClGlobul.lstPins = pintrestPins.VideoPins(PageCount, ref objPinUser);
                                }
                        //}
                                if (ClGlobul.lstPins.Count <= 0)
                                {
                                    ClGlobul.lstPins = pintrestPins.NormalPins(ref objPinUser);
                                }
                    }
                    catch (Exception)
                    {

                    }
                //}
                //else
                //{
                    try
                    {
                        if (ClGlobul.lstPins.Count <= 0)
                        {

                            ClGlobul.lstPins = pintrestPins.CategoryPins(CategoryName, PageCount, ref objPinUser);
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error(" Error : " + ex.StackTrace);
                    }
               // }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error : " + ex.StackTrace);
            }
            return ClGlobul.lstPins;
        }
        public List <string> GetPins(ref PinInterestUser objPinUser, int MaxPin)
        {
            string CategoryName = string.Empty;

            //List<string> _Pins = new List<string>();
            try
            {
                PinterestPins pintrestPins = new PinterestPins();

                // int EmailCount = lstAccounts.Count;
                int EmailCount = LoadedAccountCount;

                int PageCount = ((MaxPin * EmailCount) / 25) + 2;

                if (PageCount > 10)
                {
                    PageCount = 10;
                }

                //if (rbPinType.Checked)
                //{
                try
                {
                    //if (rbPopularPin.Checked)
                    //{
                    //  if (lstPins.Count <= 0)
                    //{
                    ClGlobul.lstPins = pintrestPins.PopularPins(PageCount, ref objPinUser);
                    //}
                    //}
                    //else if (rbVideoPin.Checked)
                    //{
                    if (ClGlobul.lstPins.Count <= 0)
                    {
                        ClGlobul.lstPins = pintrestPins.VideoPins(PageCount, ref objPinUser);
                    }
                    //}
                    if (ClGlobul.lstPins.Count <= 0)
                    {
                        ClGlobul.lstPins = pintrestPins.NormalPins(ref objPinUser);
                    }
                }
                catch (Exception)
                {
                }
                //}
                //else
                //{
                try
                {
                    if (ClGlobul.lstPins.Count <= 0)
                    {
                        ClGlobul.lstPins = pintrestPins.CategoryPins(CategoryName, PageCount, ref objPinUser);
                    }
                }
                catch (Exception ex)
                {
                    GlobusLogHelper.log.Error(" Error : " + ex.StackTrace);
                }
                // }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error : " + ex.StackTrace);
            }
            return(ClGlobul.lstPins);
        }