public static int GetIdentity() { int retInt = -1; try { DataTable dt = GetResultSet(Crud.GetIdentity()).Tables[0]; foreach (DataRow row in dt.Rows) { retInt = ObjectUtility.ToInt(row[0]); } } catch (Exception) { throw; } return(retInt); }