修改结构
This commit is contained in:
@@ -112,7 +112,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.T("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
||||
KryptonMessageBox.Show(this.T("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count > 0)
|
||||
{
|
||||
DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||
DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
|
||||
@@ -150,30 +150,30 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
||||
KryptonMessageBox.Show(this.T("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
|
||||
return;
|
||||
}
|
||||
string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'";
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.T("删除角色数据成功!", "DeleteSuccessInfo"));
|
||||
RefreshFrmHost();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
|
||||
KryptonMessageBox.Show(this.T("删除角色数据失败!", "DeleteFailInfo"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
||||
KryptonMessageBox.Show(this.T("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.T("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.T("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
||||
KryptonMessageBox.Show(this.T("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user