예제 #1
0
        private void dataGridView_user_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                Form_User_appendModify form_user_appendModify = new Form_User_appendModify();
                form_user_appendModify.isAppend = false;
                form_user_appendModify.Text     = "用户修改";

                form_user_appendModify.loginName              = dataGridView_user.Rows[e.RowIndex].Cells["登录名"].Value.ToString();
                form_user_appendModify.userName               = dataGridView_user.Rows[e.RowIndex].Cells["姓名"].Value.ToString();
                form_user_appendModify.gender                 = dataGridView_user.Rows[e.RowIndex].Cells["性别"].Value.ToString();
                form_user_appendModify.idNo                   = dataGridView_user.Rows[e.RowIndex].Cells["身份证明号码"].Value.ToString();
                form_user_appendModify.userNo                 = dataGridView_user.Rows[e.RowIndex].Cells["用户编号"].Value.ToString();
                form_user_appendModify.userFlag               = dataGridView_user.Rows[e.RowIndex].Cells["用户标识"].Value.ToString();
                form_user_appendModify.maxFailureCount        = dataGridView_user.Rows[e.RowIndex].Cells["最大连续失败次数"].Value.ToString();
                form_user_appendModify.passwordModifyDate     = dataGridView_user.Rows[e.RowIndex].Cells["密码修改日期"].Value.ToString();
                form_user_appendModify.enableDate             = dataGridView_user.Rows[e.RowIndex].Cells["用户启用日期"].Value.ToString();
                form_user_appendModify.disableDate            = dataGridView_user.Rows[e.RowIndex].Cells["用户停用日期"].Value.ToString();
                form_user_appendModify.role                   = dataGridView_user.Rows[e.RowIndex].Cells["角色"].Value.ToString();
                form_user_appendModify.qualifiedStartTime     = dataGridView_user.Rows[e.RowIndex].Cells["允许登录开始时间"].Value.ToString();
                form_user_appendModify.qualifiedEndTime       = dataGridView_user.Rows[e.RowIndex].Cells["允许登录结束时间"].Value.ToString();
                form_user_appendModify.qualifiedAddressList   = dataGridView_user.Rows[e.RowIndex].Cells["允许登录地址列表"].Value.ToString();
                form_user_appendModify.button_unblock.Enabled = "已锁定" == dataGridView_user.Rows[e.RowIndex].Cells["锁定状态"].Value.ToString();
                form_user_appendModify.textBox_IP.Text        = Form_Main.terminalIP;
                form_user_appendModify.textBox_MAC.Text       = Form_Main.terminalMAC;
                if (form_user_appendModify.ShowDialog() == DialogResult.OK)
                {
                    dataGridView_user.DataSource = mDBM.Select(userViewSQL).Tables[0];
                }
            }
        }
예제 #2
0
        private void btn_append_Click(object sender, EventArgs e)
        {
            Form_User_appendModify form_user_appendModify = new Form_User_appendModify();

            form_user_appendModify.isAppend         = true;
            form_user_appendModify.Text             = "用户添加";
            form_user_appendModify.textBox_IP.Text  = Form_Main.terminalIP;
            form_user_appendModify.textBox_MAC.Text = Form_Main.terminalMAC;

            if (form_user_appendModify.ShowDialog() == DialogResult.OK)
            {
                dataGridView_user.DataSource = mDBM.Select(userViewSQL).Tables[0];
            }
        }