private void DBDeleteRank(int intRankTypeID) { using (SqlCommand sqcmCommand = TEXCSDBUtil.DBStoredProcExecNonQuery(sqcnMain, "dbo.sp_SW_DeleteRank", new string[] { "@intRankTypeID" }, new object[] { intRankTypeID })) { } }
protected float DBGetRank(int intRankTypeID, int intURLID, float dcmDefaultValue, out bool blnFoundDBValue) { float dcmResult = dcmDefaultValue; byte intFoundRankValue = 0; blnFoundDBValue = false; using (SqlCommand sqcmCommand = TEXCSDBUtil.DBStoredProcExecNonQuery(sqcnMain, "dbo.sp_SW_SelectRank", new string[] { "@intRankTypeID", "@intURLID", "@numRank", "@intFoundRankValue" }, new object[] { intRankTypeID, intURLID, dcmResult, intFoundRankValue })) { if ((byte)(sqcmCommand.Parameters["@intFoundRankValue"].Value) == 1) { dcmResult = (float)((decimal)sqcmCommand.Parameters["@numRank"].Value); blnFoundDBValue = true; } } return(dcmResult); }
protected void DBUpdateRank(int intRankTypeID, int intURLID, float dcmRank) { float dcmOldValue = 0.0f; int intFoundRankOldValue = 0; using (SqlCommand sqcmCommand = TEXCSDBUtil.DBStoredProcExecNonQuery(sqcnMain, "dbo.sp_SW_UpdateRank", new string[] { "@intRankTypeID", "@intURLID", "@numRank", "@numRankOldValue", "@intFoundRankOldValue" }, new object[] { intRankTypeID, intURLID, (decimal)dcmRank, dcmOldValue, intFoundRankOldValue })) { if ((byte)sqcmCommand.Parameters["@intFoundRankOldValue"].Value == 1) { try { dcmOldValue = (float)((decimal)sqcmCommand.Parameters["@numRankOldValue"].Value); } catch { dcmOldValue = float.MinValue; } } } if (dcmOldValue < float.MinValue + 1) { // blnFoundURlWithoutRank=true; intNumUrlsThatFoundDifferenceInPrecisionDigits++; return; } if (HasSignificantDifference(dcmOldValue, dcmRank)) { intNumUrlsThatFoundDifferenceInPrecisionDigits++; return; } return; }