private void btnFuncs_Click(object sender, EventArgs e) { if (bds.Current == null) { return; } DSjckja.trolesRow r = (DSjckja.trolesRow)(((DataRowView)bds.Current).Row); if (r.qx < 1024) { ClsMsgBox.Jg("该角色为系统管理类角色,不需要设置可访问的功能模块。"); return; } FrmRoleFuncs f = new FrmRoleFuncs(); f.Prepare(r.id, r.mc); f.ShowDialog(); }
public void Prepare(EnumNED aNED, BindingSource aBds, DSjckja aDSJckja, trolesTableAdapter atrolesTableAdapter1, DataGridView aDgv = null) { bds = aBds; binding(); NED = aNED; dsJckja1 = aDSJckja; trolesTableAdapter1 = atrolesTableAdapter1; dgv = aDgv; ClsD.SetMaxLength(this, dsJckja1.troles); if (NED == EnumNED.NEW) { bds.AddNew(); DSjckja.trolesRow r = (DSjckja.trolesRow)((DataRowView)bds.Current).Row; } else if (NED == EnumNED.DETALL) { this.btnSave.Visible = false; } }