日期:2014-05-20 浏览次数:21103 次
SqlDataReader rec = null;
try
{
sqlHelper.RunProc("Get_SingModuleClass", ParamList, out rec);
}
catch (Exception ex)
{
SystemError.CreateErrorLog(ex.Message);
throw new Exception(ex.Message, ex);
}
if(rec==null)
{
SystemError.CreateErrorLog("空");
throw new Exception(“空对象”, new Excption(“ 空对象”));
}
ModuleClass moduleClass = new ModuleClass();
while (rec.Read())
{
moduleClass.ID = Int32.Parse(rec["ID"].ToString());
moduleClass.ClassID = Int32.Parse(rec["ClassID"].ToString());
moduleClass.ClassName = rec["ClassName"].ToString();
moduleClass.ParentID = Int32.Parse(rec["ParentID"].ToString());
moduleClass.ParentOrder = Int32.Parse(rec["ParentOrder"].ToString());
moduleClass.IsValid = rec["IsValid"].ToString();
moduleClass.CanEdit = rec["CanEdit"].ToString();
moduleClass.PageUrl = rec["PageUrl"].ToString();
}
return moduleClass;