private void LightNewsContainer_RemoveNewsClicked(object sender, int NewsID) { PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Сообщение будет удалено безвозвратно.\nПродолжить?", "Удаление сообщения"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } LightNews.RemoveNews(NewsID); LightNews.ReloadNews(LightNewsContainer.NewsCount); LightNews.ReloadComments(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.CreateNews(); } LightMessageBoxForm.Dispose(); bC = true; }
private void CoderBlogContainer_RemoveCommentClicked(object sender, int NewsID, int NewsCommentID) { PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Комментарий будет удален.\nПродолжить?", "Удаление комментария"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(CoderBlogContainer.Top, CoderBlogContainer.Left, CoderBlogContainer.Height, CoderBlogContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } CoderBlog.RemoveComment(NewsCommentID); CoderBlog.ReloadNews(CoderBlogContainer.NewsCount); CoderBlog.ReloadComments(); CoderBlogContainer.NewsDataTable = CoderBlog.BlogNewsDataTable.Copy(); CoderBlogContainer.CommentsDT = CoderBlog.CommentsDataTable.Copy(); CoderBlogContainer.CreateNews(); CoderBlogContainer.ReloadNewsItem(NewsID, true); bC = true; } }
private void SendMailButton_Click(object sender, EventArgs e) { int i = -1; if (InfiniumFileList.Selected == -1) { InfiniumTips.ShowTip(this, 50, 85, "Не выбран клиент", 3000); return; } PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Прикрепить к уведомлению файлы?", "Уведомление клиенту"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { openFileDialog1.ShowDialog(); } if (InfiniumFileList.Entered == 4) { i = InfiniumFiles.GetCurrentClientFolder(InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID); } else { i = InfiniumFiles.GetCurrentClientFolder(InfiniumFileList.Entered); } if (i == -1) { InfiniumTips.ShowTip(this, 50, 85, "Невозможно определить клиента", 4000); return; } string r = InfiniumFiles.SendEmailNotifyClient(i, openFileDialog1.FileNames); if (r == "-1") { LightMessageBox.Show(ref TopForm, false, "У клиента не указан Email", "Уведомление"); //InfiniumTips.ShowTip(this, 50, 85, "У клиента не указан Email", 3000); return; } else if (r == "1") { LightMessageBox.Show(ref TopForm, false, "Уведомление успешно отправлено", "Уведомление"); //InfiniumTips.ShowTip(this, 50, 85, "Уведомление успешно отправлено", 3000); return; } else { LightMessageBox.Show(ref TopForm, false, r, "Уведомление"); //InfiniumTips.ShowTip(this, 50, 85, "Не подключения к интернет", 3000); return; } }
private void LightNewsContainer_RemoveCommentClicked(object sender, int NewsID, int NewsCommentID) { PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Комментарий будет удален.\nПродолжить?", "Удаление комментария"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } MarketingNews.RemoveComment(NewsCommentID); if (cbtnClients.Checked) { if (ClientsMenu.Selected == -1) { MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, NewClientsMenu.Items[NewClientsMenu.Selected].ClientID); } else { MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, ClientsMenu.Items[ClientsMenu.Selected].ClientID); } } if (cbtnManagers.Checked) { if (ClientsManagersMenu.Selected == -1) { MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, NewClientsManagersMenu.Items[NewClientsManagersMenu.Selected].ClientID); } else { MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID); } } MarketingNews.ReloadComments(); LightNewsContainer.NewsDataTable = MarketingNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = MarketingNews.CommentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ReloadNewsItem(NewsID, true); bC = true; } }