예제 #1
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            Form myform = new Users_Add(1);

            myform.ShowDialog();
            myform.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            cmbd.bind(dgv_users, "SELECT * FROM [User]", "User");
        }
예제 #2
0
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string username = dgv_users.SelectedRows[0].Cells[1].Value.ToString();
            string password = dgv_users.SelectedRows[0].Cells[2].Value.ToString();
            string level    = dgv_users.SelectedRows[0].Cells[3].Value.ToString();
            Form   myform   = new Users_Add(2, username, password, level);

            myform.ShowDialog();
            myform.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            cmbd.bind(dgv_users, "SELECT * FROM [User]", "User");
        }