修改结构
This commit is contained in:
@@ -61,18 +61,18 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtRoleCode.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo"));
|
||||
KryptonMessageBox.Show(this.T("请输入角色编码!", "EnterRoleCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtRoleName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
KryptonMessageBox.Show(this.T("请输入角色名称!", "EnterRoleNameInfo"));
|
||||
return;
|
||||
}
|
||||
int roleGrade = 0;
|
||||
if (kcmb_roleGrade.SelectedIndex == 0)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
KryptonMessageBox.Show(this.T("请选择角色级别!", "SelectRoleGradeInfo"));
|
||||
return;
|
||||
}
|
||||
else if (kcmb_roleGrade.SelectedIndex == 1)
|
||||
@@ -81,7 +81,7 @@ namespace CleanMachineHMI.frmChild
|
||||
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
|
||||
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
||||
KryptonMessageBox.Show(this.T("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo"));
|
||||
return;
|
||||
}
|
||||
roleGrade = 100;
|
||||
@@ -139,18 +139,18 @@ namespace CleanMachineHMI.frmChild
|
||||
int row = LeadDbHelperSQLite.ExecuteSql(sql);
|
||||
if (row > 0)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.T("新增角色数据成功!", "AddSuccessInfo"));
|
||||
frmRole.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.T("新增角色数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.T("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user