private void barLargeButtonItem2_ItemClick(object sender, ItemClickEventArgs e) { if (((LoginInfo.UserName != "SYSTEM") || (LoginInfo.Password != "GTA2015")) || (LoginInfo.RoleId != 0)) { MessageBox.Show("您不是超级管理员,无权使用此项功能!"); } else if (this.gridView1.GetSelectedRows().Length == 0) { MessageBox.Show("请选择要编辑的项"); } else { DataRow dataRow = this.gridView1.GetDataRow(this.gridView1.GetSelectedRows()[0]); if (dataRow != null) { if (dataRow["id"].ToString() == ServerSystemInfo.ModuleId.ToString()) { MessageBox.Show(this.alertMsg); } else { FrmModuleEdit edit = new FrmModuleEdit(dataRow); if (edit.ShowDialog(this) == DialogResult.OK) { this.BindData(); } } } } }
private void barLargeButtonItem1_ItemClick(object sender, ItemClickEventArgs e) { if (((LoginInfo.UserName != "SYSTEM") || (LoginInfo.Password != "GTA2015")) || (LoginInfo.RoleId != 0)) { MessageBox.Show("您不是超级管理员,无权使用此项功能!"); } else { FrmModuleEdit edit = new FrmModuleEdit(null); if (edit.ShowDialog(this) == DialogResult.OK) { this.BindData(); } } }