public EasyOne.Model.Collection.CollectionPagingRuleInfo GetInfoById(int id, int ruleType) { Parameters cmdParams = new Parameters(); string strCommand = "SELECT * FROM PE_CollectionPagingRules WHERE ItemId = @ItemId AND RuleType = @RuleType"; cmdParams.AddInParameter("@ItemId", DbType.Int32, id); cmdParams.AddInParameter("@RuleType", DbType.Int32, ruleType); using (NullableDataReader reader = DBHelper.ExecuteReader(CommandType.Text, strCommand, cmdParams)) { if (reader.Read()) { return(CollectionPagingRuleInfo(reader)); } return(new EasyOne.Model.Collection.CollectionPagingRuleInfo(true)); } }
public bool Delete(int commentId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@CommentId", DbType.Int32, commentId); return(DBHelper.ExecuteSql("DELETE FROM PE_Comment WHERE CommentId = @CommentId", cmdParams)); }
public bool Add(DeliverChargeInfo deliverChargeInfo) { Parameters cmdParams = AddInCommonParameter(deliverChargeInfo); cmdParams.AddInParameter("@deliverTypeID", DbType.Int32, deliverChargeInfo.DeliverTypeId); return(DBHelper.ExecuteProc("PR_Shop_DeliverCharge_Add", cmdParams)); }
public void DeleteByCommentId(int commentId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@CommentId", DbType.Int32, commentId); DBHelper.ExecuteSql("DELETE FROM PE_CommentPK WHERE CommentId = @CommentId", cmdParams); }
public void Delete(int generalId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@GeneralId", DbType.Int32, generalId); DBHelper.ExecuteSql("DELETE FROM PE_ContentPermission WHERE GeneralId = @GeneralId", cmdParams); }
public bool Delete(int itemId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@ItemId", DbType.Int32, itemId); return(DBHelper.ExecuteSql("DELETE FROM PE_BankrollItem WHERE [ItemId] = @ItemId", cmdParams)); }
public bool Update(BankrollItemInfo bankrollItemInfo) { Parameters cmdParams = GetParameters(bankrollItemInfo); cmdParams.AddInParameter("@ItemId", DbType.Int32, bankrollItemInfo.ItemId); return(DBHelper.ExecuteProc("PR_Accessories_BankrollItem_Update", cmdParams)); }
public bool Add(ADZoneInfo adZoneInfo) { Parameters cmdParams = GetParameters(adZoneInfo); cmdParams.AddInParameter("@ZoneId", DbType.Int32, GetMaxADZoneId()); return(DBHelper.ExecuteProc("PR_Ad_ADZone_ADD", cmdParams)); }
public bool PauseADZone(string id) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@strZoneId", DbType.String, id); return(DBHelper.ExecuteProc("PR_AD_ADZone_Pause", cmdParams)); }
public bool Add(ContacterInfo contacterInfo) { Parameters parms = new Parameters(); if (contacterInfo.ContacterId <= 0) { contacterInfo.ContacterId = DBHelper.GetMaxId("PE_Contacter", "ContacterID") + 1; } parms.AddInParameter("@ContacterID", DbType.Int32, contacterInfo.ContacterId); parms.AddInParameter("@ClientID", DbType.Int32, contacterInfo.ClientId); parms.AddInParameter("@ParentID", DbType.Int32, contacterInfo.ParentId); parms.AddInParameter("@CreateTime", DbType.DateTime, DateTime.Now); parms.AddInParameter("@Owner", DbType.String, contacterInfo.Owner); GetContacterParameters(contacterInfo, parms); return(DBHelper.ExecuteProc("PR_Crm_Contacter_Add", parms)); }
public bool Exists(int id) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@ItemId", DbType.Int32, id); return(DBHelper.ExistsSql("SELECT COUNT(*) FROM PE_CollectionListRules WHERE @ItemId = ItemId", cmdParams)); }
public bool Exists(string userName) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@UserName", DbType.String, userName); return(DBHelper.ExistsSql("SELECT COUNT(*) FROM PE_Contacter WHERE UserName = @UserName", cmdParams)); }
public bool Exists(int contacterId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@ContacterID", DbType.Int32, contacterId); return(DBHelper.ExistsSql("SELECT COUNT(*) FROM PE_Contacter WHERE ContacterID = @ContacterID", cmdParams)); }
public bool DeleteByUserName(string userName) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@UserName", DbType.String, userName); return(DBHelper.ExecuteSql("DELETE FROM PE_Contacter WHERE UserName = @UserName", cmdParams)); }
public bool SaveConfig(StatInfoListInfo info) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@MasterTimeZone", DbType.Int32, info.MasterTimeZone); cmdParams.AddInParameter("@Interval", DbType.Int32, info.Interval); cmdParams.AddInParameter("@IntervalNum", DbType.Int32, info.IntervalNum); cmdParams.AddInParameter("@OnlineTime", DbType.Int32, info.OnlineTime); cmdParams.AddInParameter("@VisitRecord", DbType.Int32, info.VisitRecord); cmdParams.AddInParameter("@KillRefresh", DbType.Int32, info.KillRefresh); cmdParams.AddInParameter("@RegFields_Fill", DbType.String, info.RegFieldsFill); cmdParams.AddInParameter("@OldTotalNum", DbType.Int32, info.OldTotalNum); cmdParams.AddInParameter("@OldTotalView", DbType.Int32, info.OldTotalView); cmdParams.AddInParameter("@StartDate", DbType.String, info.StartDate); return(DBHelper.ExecuteNonQueryProc("PR_Analytics_SaveConfig", cmdParams) > 0); }
public bool Update(ADZoneInfo adZoneInfo) { Parameters cmdParams = GetParameters(adZoneInfo); cmdParams.AddInParameter("@ZoneId", DbType.Int32, adZoneInfo.ZoneId); return(DBHelper.ExecuteProc("PR_AD_ADZone_UPDATE", cmdParams)); }
public bool VisitUpdate(int visitCount) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@visit", DbType.Int32, visitCount); return(DBHelper.ExecuteNonQueryProc("PR_Analytics_StatVisit_Update", cmdParams) > 0); }
public bool ClearADZone(int id) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@ZoneId", DbType.Int32, id); return(DBHelper.ExecuteSql("DELETE FROM PE_Zone_Advertisement WHERE ZoneId = @ZoneId", cmdParams)); }
public bool Add(BankrollItemInfo bankrollItemInfo) { Parameters cmdParams = GetParameters(bankrollItemInfo); cmdParams.AddInParameter("@Memo", DbType.String, bankrollItemInfo.Memo); return(DBHelper.ExecuteProc("PR_Accessories_BankrollItem_Add", cmdParams)); }
public void UpdateReceive(int orderId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@OrderID", DbType.Int32, orderId); DBHelper.ExecuteSql("UPDATE PE_DeliverItem SET Received = 1 WHERE OrderID = @OrderID AND Received = 0", cmdParams); }
public void Delete(int pkId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@PKId", DbType.Int32, pkId); DBHelper.ExecuteSql("DELETE FROM PE_CommentPK WHERE PKId = @PKId", cmdParams); }
private static Parameters GetParameters(LogInfo logInfo) { Parameters parameters = new Parameters(); parameters.AddInParameter("@Category", DbType.Int32, (int)logInfo.Category); parameters.AddInParameter("@Priority", DbType.Int32, logInfo.Priority); parameters.AddInParameter("@Title", DbType.String, logInfo.Title); parameters.AddInParameter("@Message", DbType.AnsiString, logInfo.Message); parameters.AddInParameter("@Timestamp", DbType.DateTime, logInfo.Timestamp); parameters.AddInParameter("@UserName", DbType.String, logInfo.UserName); parameters.AddInParameter("@UserIP", DbType.String, logInfo.UserIP); parameters.AddInParameter("@Source", DbType.AnsiString, logInfo.Source); parameters.AddInParameter("@ScriptName", DbType.String, logInfo.ScriptName); parameters.AddInParameter("@PostString", DbType.AnsiString, logInfo.PostString); return(parameters); }
public bool Add(ReplyInfo info) { Parameters cmdParams = GetParameters(info); cmdParams.AddInParameter("@QuestionID", DbType.Int32, info.QuestionId); return(DBHelper.ExecuteSql("INSERT INTO PE_Reply(ID, QuestionID, ReplyCreator, ReplyTime, ReplyContent) VALUES (@ID, @QuestionID, @ReplyCreator, @ReplyTime, @ReplyContent)", cmdParams)); }
public bool Update(LogInfo logInfo) { Parameters cmdParams = GetParameters(logInfo); cmdParams.AddInParameter("@LogID", DbType.Int32, logInfo.LogId); return(DBHelper.ExecuteProc("PR_Accessories_Log_Update", cmdParams)); }
public bool Exists(int generalId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@GeneralId", DbType.Int32, generalId); return(DBHelper.ExistsSql("SELECT COUNT(*) FROM PE_ContentPermission WHERE GeneralId = @GeneralId", cmdParams)); }
public IList <ProductPriceInfo> GetProductPriceById(int productId, string tableName) { IList <ProductPriceInfo> list = new List <ProductPriceInfo>(); Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@TableName", DbType.String, tableName); cmdParams.AddInParameter("@ProductId", DbType.Int32, productId); using (NullableDataReader reader = DBHelper.ExecuteReaderSql("SELECT ID, GroupID, Price, PropertyValue FROM PE_ProductPrice WHERE TableName = @TableName AND ProductId = @ProductId", cmdParams)) { while (reader.Read()) { list.Add(ProductPriceFromrdr(reader)); } } return(list); }
public IList <DeliverChargeInfo> GetDeliverChargeListByAreaType(int typeId, int areaType) { IList <DeliverChargeInfo> list = new List <DeliverChargeInfo>(); Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@typeId", DbType.Int32, typeId); cmdParams.AddInParameter("@areaType", DbType.Int32, areaType); using (NullableDataReader reader = DBHelper.ExecuteReaderProc("PR_Shop_DeliverCharge_GetListByAreaType", cmdParams)) { while (reader.Read()) { list.Add(CreateInfo(reader)); } } return(list); }
public bool SetPassedOfForbid(int surveyId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@SurveyID", DbType.Int32, surveyId); return(DBHelper.ExecuteSql("UPDATE PE_Survey SET IsOpen = 1 WHERE SurveyID = @SurveyID", cmdParams)); }
public bool Update(DeliverChargeInfo deliverChargeInfo) { Parameters cmdParams = AddInCommonParameter(deliverChargeInfo); cmdParams.AddInParameter("@id", DbType.Int32, deliverChargeInfo.Id); return(DBHelper.ExecuteProc("PR_Shop_DeliverCharge_Update", cmdParams)); }
public bool Exists(string itemName) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@ItemName", DbType.String, itemName); return(DBHelper.ExistsSql("SELECT COUNT(*) FROM PE_CollectionItem WHERE ItemName = @ItemName", cmdParams)); }