Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            fmOperatorEdit fm = new fmOperatorEdit();

            fm.StartPosition = FormStartPosition.CenterScreen;
            if (fm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                BindGridDataSource();
            }
        }
Beispiel #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("请选择需要修改的记录!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            string         userName = dataGridView1[1, dataGridView1.SelectedRows[0].Index].Value.ToString();
            fmOperatorEdit fm       = new fmOperatorEdit(userName);

            fm.StartPosition = FormStartPosition.CenterScreen;
            if (fm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                BindGridDataSource();
            }
        }