/// <summary> /// Deletes a VegetationCommunityTypesList record /// </summary> public static int Delete(VegetationCommunityTypesListDO DO) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _VegetationCommunityType = new SqlParameter("VegetationCommunityType", SqlDbType.VarChar); _PermitKey.Value = DO.PermitKey; _VegetationCommunityType.Value = DO.VegetationCommunityType; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _VegetationCommunityType }; return DataCommon.ExecuteScalar("[dbo].[VegetationCommunityTypesList_Delete]", _params, "dbo"); }
/// <summary> /// Creates a new VegetationCommunityTypesList record /// </summary> public static void Create(VegetationCommunityTypesListDO DO) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _VegetationCommunityType = new SqlParameter("VegetationCommunityType", SqlDbType.VarChar); SqlParameter _Acres = new SqlParameter("Acres", SqlDbType.Int); _PermitKey.Value = DO.PermitKey; _VegetationCommunityType.Value = DO.VegetationCommunityType; _Acres.Value = DO.Acres; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _VegetationCommunityType, _Acres }; DataCommon.ExecuteNonQuery("[dbo].[VegetationCommunityTypesList_Insert]", _params, "dbo"); }
/// <summary> /// Gets all VegetationCommunityTypesList records /// </summary> public static VegetationCommunityTypesListDO[] GetAll() { SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[VegetationCommunityTypesList_GetAll]", new SqlParameter[] { }, "dbo"); List<VegetationCommunityTypesListDO> objs = new List<VegetationCommunityTypesListDO>(); while(sr.Read()){ VegetationCommunityTypesListDO obj = new VegetationCommunityTypesListDO(); obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey")); obj.VegetationCommunityType = sr.GetString(sr.GetOrdinal("VegetationCommunityType")); obj.Acres = sr.GetInt32(sr.GetOrdinal("Acres")); objs.Add(obj); } return objs.ToArray(); }
/// <summary> /// Selects VegetationCommunityTypesList records by PK /// </summary> public static VegetationCommunityTypesListDO[] GetByPK(Int32 PermitKey, String VegetationCommunityType) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _VegetationCommunityType = new SqlParameter("VegetationCommunityType", SqlDbType.VarChar); _PermitKey.Value = PermitKey; _VegetationCommunityType.Value = VegetationCommunityType; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _VegetationCommunityType }; SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[VegetationCommunityTypesList_GetByPK]", _params, "dbo"); List<VegetationCommunityTypesListDO> objs = new List<VegetationCommunityTypesListDO>(); while(sr.Read()) { VegetationCommunityTypesListDO obj = new VegetationCommunityTypesListDO(); obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey")); obj.VegetationCommunityType = sr.GetString(sr.GetOrdinal("VegetationCommunityType")); obj.Acres = sr.GetInt32(sr.GetOrdinal("Acres")); objs.Add(obj); } return objs.ToArray(); }