Exemple #1
0
        private void LightNewsContainer_LikeClicked(object sender, int NewsID)
        {
            MarketingNews.LikeNews(Security.CurrentUserID, NewsID);

            MarketingNews.FillLikes();
            LightNewsContainer.NewsLikesDT = MarketingNews.NewsLikesDataTable;
            LightNewsContainer.ReloadLikes(NewsID);
            LightNewsContainer.Focus();
        }
Exemple #2
0
        public MarketingNewsForm(LightStartForm tLightStartForm)
        {
            InitializeComponent();

            LightStartForm = tLightStartForm;

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            MarketingNews = new Infinium.MarketingNews();
            MarketingNews.FillLikes();

            Initialize();

            ClientsManagersMenu.ClientsManagersDataTable = MarketingNews.ClientsManagersDataTable;
            ClientsManagersMenu.InitializeItems();
            ClientsManagersMenu.Selected = 0;

            MarketingNews.FillMNews(ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID);
            MarketingNews.FillNewManagersNews();

            NewClientsManagersMenu.ClientsManagersDataTable = MarketingNews.ClientsManagersNewsDataTable;
            NewClientsManagersMenu.InitializeItems();

            ClientsMenu.ClientsDataTable = MarketingNews.ClientsDataTable;
            ClientsMenu.InitializeItems();
            ClientsMenu.Selected = 0;

            MarketingNews.FillNews(ClientsMenu.Items[ClientsMenu.Selected].ClientID);
            MarketingNews.FillNewClientsNews();

            NewClientsMenu.ClientsDataTable = MarketingNews.ClientsNewsDataTable;
            NewClientsMenu.InitializeItems();

            if (MarketingNews.ClientsNewsDataTable.Rows.Count == 0)
            {
                ClientsMenu.Top    = 0;
                ClientsMenu.Height = panel1.Height;
                if (MarketingNews.ClientsManagersNewsDataTable.Rows.Count == 0)
                {
                    ClientsManagersMenu.Top    = 0;
                    ClientsManagersMenu.Height = panel4.Height;
                    return;
                }
                else
                {
                    NewClientsManagersMenu.Selected = 0;
                    cbtnManagers.Checked            = true;
                    ClientsManagersMenu.Top         = 239;
                    ClientsManagersMenu.Height      = panel4.Height - ClientsManagersMenu.Top;
                    ActiveNotifySystem.ClearSubscribesRecords(Security.CurrentUserID, this.Name);
                }
                return;
            }
            else
            {
                ClientsMenu.Top         = 239;
                ClientsMenu.Height      = panel1.Height - ClientsMenu.Top;
                NewClientsMenu.Selected = 0;
                ActiveNotifySystem.ClearSubscribesRecords(Security.CurrentUserID, this.Name);
            }


            while (!SplashForm.bCreated)
            {
                ;
            }
        }