/// <summary> /// Deletes a RedistributionThickness record /// </summary> public static int Delete(RedistributionThicknessDO DO) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _LandUseType = new SqlParameter("LandUseType", SqlDbType.VarChar); _PermitKey.Value = DO.PermitKey; _LandUseType.Value = DO.LandUseType; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _LandUseType }; return DataCommon.ExecuteScalar("[dbo].[RedistributionThickness_Delete]", _params, "dbo"); }
/// <summary> /// Creates a new RedistributionThickness record /// </summary> public static void Create(RedistributionThicknessDO DO) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _LandUseType = new SqlParameter("LandUseType", SqlDbType.VarChar); SqlParameter _Redistribution = new SqlParameter("Redistribution", SqlDbType.VarChar); SqlParameter _Acres = new SqlParameter("Acres", SqlDbType.Int); SqlParameter _SoilStockpileVolume = new SqlParameter("SoilStockpileVolume", SqlDbType.Int); _PermitKey.Value = DO.PermitKey; _LandUseType.Value = DO.LandUseType; _Redistribution.Value = DO.Redistribution; _Acres.Value = DO.Acres; _SoilStockpileVolume.Value = DO.SoilStockpileVolume; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _LandUseType, _Redistribution, _Acres, _SoilStockpileVolume }; DataCommon.ExecuteNonQuery("[dbo].[RedistributionThickness_Insert]", _params, "dbo"); }
/// <summary> /// Gets all RedistributionThickness records /// </summary> public static RedistributionThicknessDO[] GetAll() { SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[RedistributionThickness_GetAll]", new SqlParameter[] { }, "dbo"); List<RedistributionThicknessDO> objs = new List<RedistributionThicknessDO>(); while(sr.Read()){ RedistributionThicknessDO obj = new RedistributionThicknessDO(); obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey")); obj.LandUseType = sr.GetString(sr.GetOrdinal("LandUseType")); obj.Redistribution = sr.GetString(sr.GetOrdinal("Redistribution")); obj.Acres = sr.GetInt32(sr.GetOrdinal("Acres")); obj.SoilStockpileVolume = sr.GetInt32(sr.GetOrdinal("SoilStockpileVolume")); objs.Add(obj); } return objs.ToArray(); }
/// <summary> /// Selects RedistributionThickness records by PK /// </summary> public static RedistributionThicknessDO[] GetByPK(Int32 PermitKey, String LandUseType) { SqlParameter _PermitKey = new SqlParameter("PermitKey", SqlDbType.Int); SqlParameter _LandUseType = new SqlParameter("LandUseType", SqlDbType.VarChar); _PermitKey.Value = PermitKey; _LandUseType.Value = LandUseType; SqlParameter[] _params = new SqlParameter[] { _PermitKey, _LandUseType }; SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[RedistributionThickness_GetByPK]", _params, "dbo"); List<RedistributionThicknessDO> objs = new List<RedistributionThicknessDO>(); while(sr.Read()) { RedistributionThicknessDO obj = new RedistributionThicknessDO(); obj.PermitKey = sr.GetInt32(sr.GetOrdinal("PermitKey")); obj.LandUseType = sr.GetString(sr.GetOrdinal("LandUseType")); obj.Redistribution = sr.GetString(sr.GetOrdinal("Redistribution")); obj.Acres = sr.GetInt32(sr.GetOrdinal("Acres")); obj.SoilStockpileVolume = sr.GetInt32(sr.GetOrdinal("SoilStockpileVolume")); objs.Add(obj); } return objs.ToArray(); }