Exemple #1
0
        private void btSupPost_Click(object sender, EventArgs e)
        {
            DialogResult dr = new DialogResult();

            dr = MessageBox.Show(Properties.Resources.MsgBoxDeletePostText, Properties.Resources.MsgBoxDeletePostTitre, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
            if (dr == DialogResult.OK)
            {
                if (Outil.DeleteReponse((int)dGVPost.CurrentRow.Cells["ID"].Value) != 1)
                {
                    MessageBox.Show(Properties.Resources.MsgBoxErreurDeletePostText, Properties.Resources.MsgBoxErreurDeletePostTitre);
                }
                List <Post> posts = Outil.GetAllReponseBySujet((int)cbBxSubject.SelectedValue);


                if (posts != null)
                {
                    displaydgVPost(posts);
                }

                if (visibilitePost())
                {
                    PanelPostVisible();
                }
                else
                {
                    PanelPostInvisible();
                }
            }
        }