修改BUG:部门描述为空时,后台抛出异常

This commit is contained in:
Argo-Lenovo 2016-12-26 12:19:47 +08:00
parent 446fac5073
commit 89c494549a
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ namespace Bootstrap.DataAccess
{
ID = (int)reader[0],
GroupName = (string)reader[1],
Description = LgbConvert.ReadValue(reader[2], string.Empty)
Description = reader.IsDBNull(2) ? string.Empty : (string)reader[2]
});
}
}
@ -134,7 +134,7 @@ namespace Bootstrap.DataAccess
{
ID = (int)reader[0],
GroupName = (string)reader[1],
Description = (string)reader[2],
Description = reader.IsDBNull(2) ? string.Empty : (string)reader[2],
Checked = (string)reader[3]
});
}
@ -216,7 +216,7 @@ namespace Bootstrap.DataAccess
{
ID = (int)reader[0],
GroupName = (string)reader[1],
Description = (string)reader[2],
Description = reader.IsDBNull(2) ? string.Empty : (string)reader[2],
Checked = (string)reader[3]
});
}