private void btnMyBlog_Click(object sender, EventArgs e) { int id = Convert.ToInt32(AccountService.Instance.User.ID); string title = DataService.Instance.GetBlogTitle(Convert.ToInt32(AccountService.Instance.User.ID)); BlogForm child = new BlogForm(id, title); child.Location = this.Location; this.Hide(); child.ShowDialog(); DataService.Instance.LabelLoggedUser = labelLoggedUser; DataService.Instance.GetLoggedUser(); DataService.Instance.GetBlogs(); DataService.Instance.GetConnection(); this.Show(); }
private void listBlogs_DoubleClick(object sender, EventArgs e) { if (listBlogs.SelectedItem != null) { int id = DataService.Instance.BlogsID[listBlogs.SelectedIndex]; string title = listBlogs.SelectedItem.ToString(); BlogForm child = new BlogForm(id, title); child.Location = this.Location; this.Hide(); child.ShowDialog(); DataService.Instance.LabelLoggedUser = labelLoggedUser; DataService.Instance.GetLoggedUser(); DataService.Instance.GetBlogs(); DataService.Instance.GetConnection(); this.Show(); } }