private void btnMemberAdd_Click(object sender, EventArgs e) { using (var form = new MemberEdit(mode.Add)) { panelMember.Visible = false; panelMask.Visible = true; var result = form.ShowDialog(); panelMember.Visible = true; panelMask.Visible = false; } memberInitial(); }
private void btnMemberModify_Click(object sender, EventArgs e) { if (this.dgvMember.SelectedRows.Count > 0) { DataGridViewRow row = this.dgvMember.SelectedRows[0]; using (var form = new MemberEdit(mode.Edit, row.Cells["dgvMember_Serno"].Value.ToString())) { panelMember.Visible = false; panelMask.Visible = true; var result = form.ShowDialog(); panelMember.Visible = true; panelMask.Visible = false; } memberLoadData(ddlMemberPage.SelectedIndex + 1); } }
private void dgvMember_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } DataGridViewRow row = this.dgvMember.SelectedRows[0]; using (var form = new MemberEdit(mode.View, row.Cells["dgvMember_Serno"].Value.ToString())) { panelMember.Visible = false; panelMask.Visible = true; var result = form.ShowDialog(); panelMember.Visible = true; panelMask.Visible = false; } }