示例#1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            var newsEditForm = new NewsEditForm(sess)
            {
                Location = this.Location, StartPosition = this.StartPosition
            };

            newsEditForm.ShowDialog();

            loadDataGridAll();
        }
示例#2
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var newsEditForm = new NewsEditForm(sess, new News(dataGridView1.SelectedRows[0]))
            {
                Location = this.Location, StartPosition = this.StartPosition
            };

            newsEditForm.ShowDialog();

            if (sess.PressId != 0)
            {
                loadDataGridAll();
            }
        }