Ejemplo n.º 1
0
        /// <summary>
        /// 添加用户
        /// </summary>
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            EditUserForm editUserForm = new EditUserForm(this.menuStripMain, "add", "");

            editUserForm.userInfoFormChange += new EditUserForm.UserInfoFormChange(editUserForm_userInfoFormChange);
            editUserForm.ShowDialog();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改用户
        /// </summary>
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            if (this.dataGridViewUsers.SelectedRows.Count <= 0)
            {
                return;
            }
            this.curRowIndex = this.dataGridViewUsers.SelectedRows[0].Index;

            if (this.dataGridViewUsers.SelectedRows[0].Cells["用户编码"].Value == null)
            {
                return;
            }
            string userId = this.dataGridViewUsers.SelectedRows[0].Cells["用户编码"].Value.ToString().Trim();

            if (userId == "")
            {
                return;
            }

            EditUserForm editUserForm = new EditUserForm(this.menuStripMain, "edit", userId);

            editUserForm.userInfoFormChange += new EditUserForm.UserInfoFormChange(editUserForm_userInfoFormChange);
            editUserForm.ShowDialog();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 添加用户
 /// </summary> 
 private void toolStripButtonAdd_Click(object sender, EventArgs e)
 {
     EditUserForm editUserForm = new EditUserForm(this.menuStripMain, "add", "");
     editUserForm.userInfoFormChange += new EditUserForm.UserInfoFormChange(editUserForm_userInfoFormChange);
     editUserForm.ShowDialog();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 修改用户
        /// </summary> 
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            if (this.dataGridViewUsers.SelectedRows.Count <= 0)
                return;
            this.curRowIndex = this.dataGridViewUsers.SelectedRows[0].Index;

            if (this.dataGridViewUsers.SelectedRows[0].Cells["用户编码"].Value == null) return;
            string userId = this.dataGridViewUsers.SelectedRows[0].Cells["用户编码"].Value.ToString().Trim();
            if (userId == "") return;

            EditUserForm editUserForm = new EditUserForm(this.menuStripMain, "edit", userId);
            editUserForm.userInfoFormChange += new EditUserForm.UserInfoFormChange(editUserForm_userInfoFormChange);
            editUserForm.ShowDialog();
        }