示例#1
0
        public bool UpdateJob(JobInfo model)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@JobTitle", SqlDbType.NVarChar, 50, model.JobTitle),
                GenerateInParam("@PubDate",  SqlDbType.DateTime,  8, model.PubDate),
                GenerateInParam("@EndDate",  SqlDbType.DateTime,  8, model.EndDate),
                GenerateInParam("@Number",   SqlDbType.Int,       4, model.Number),
                GenerateInParam("@State",    SqlDbType.Int,       4, model.State),
                GenerateInParam("@Body",     SqlDbType.NText,     0, model.Body),
                GenerateInParam("@City",     SqlDbType.NVarChar, 50, model.City),
                GenerateInParam("@JobID",    SqlDbType.Int,       4, model.JobID)
            };

            string commandText = string.Format("update {0}Jobs set JobTitle=@JobTitle,PubDate=@PubDate,EndDate=@EndDate,Number=@Number,State=@State,Body=@Body,City=@City where JobID=@JobID ",
                                               RDBSHelper.RDBSTablePre);

            if (RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        public bool UpdateShop(ShopInfo model)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@ShopName", SqlDbType.NVarChar,  50, model.ShopName),
                GenerateInParam("@Address",  SqlDbType.NVarChar, 200, model.Address),
                GenerateInParam("@Tel",      SqlDbType.NVarChar, 200, model.Tel),
                GenerateInParam("@Fax",      SqlDbType.NVarChar, 200, model.Fax),
                GenerateInParam("@ShopImg",  SqlDbType.NVarChar, 200, model.ShopImg),
                GenerateInParam("@Position", SqlDbType.NVarChar,  50, model.Position),
                GenerateInParam("@Body",     SqlDbType.NText,      0, model.Body),
                GenerateInParam("@Area",     SqlDbType.NVarChar,  50, model.Area),
                GenerateInParam("@Type",     SqlDbType.NVarChar,  50, model.Type),
                GenerateInParam("@OrderID",  SqlDbType.Int,        4, model.OrderID),
                GenerateInParam("@Remark",   SqlDbType.NVarChar, 200, model.Remark),
                GenerateInParam("@ShopID",   SqlDbType.Int,        4, model.ShopID)
            };

            string commandText = string.Format("update {0}Shops set ShopName=@ShopName,Address=@Address,Tel=@Tel,Fax=@Fax,ShopImg=@ShopImg,Position=@Position,Body=@Body,Area=@Area,Type=@Type,OrderID=@OrderID,Remark=@Remark where ShopID=@ShopID ",
                                               RDBSHelper.RDBSTablePre);

            if (RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
 /// <summary>
 /// 运行SQL语句
 /// </summary>
 /// <param name="sql">SQL语句</param>
 /// <returns></returns>
 public string RunSql(string sql)
 {
     if (!string.IsNullOrWhiteSpace(sql))
     {
         SqlConnection conn = new SqlConnection(RDBSHelper.ConnectionString);
         conn.Open();
         using (SqlTransaction trans = conn.BeginTransaction())
         {
             string[] sqlList = StringHelper.SplitString(sql, "-sqlseparator-");
             foreach (string item in sqlList)
             {
                 if (!string.IsNullOrWhiteSpace(item))
                 {
                     try
                     {
                         RDBSHelper.ExecuteNonQuery(CommandType.Text, item);
                         trans.Commit();
                     }
                     catch (Exception ex)
                     {
                         trans.Rollback();
                         return(ex.Message);
                     }
                 }
             }
         }
         conn.Close();
     }
     return(string.Empty);
 }
示例#4
0
        /// <summary>
        /// 更新店铺
        /// </summary>
        /// <param name="storeInfo">店铺信息</param>
        public void UpdateStore(StoreInfo storeInfo)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@state",        SqlDbType.TinyInt,    1, storeInfo.State),
                GenerateInParam("@name",         SqlDbType.NChar,     60, storeInfo.Name),
                GenerateInParam("@regionid",     SqlDbType.SmallInt,   2, storeInfo.RegionId),
                GenerateInParam("@storerid",     SqlDbType.SmallInt,   2, storeInfo.StoreRid),
                GenerateInParam("@storeiid",     SqlDbType.SmallInt,   2, storeInfo.StoreIid),
                GenerateInParam("@logo",         SqlDbType.NChar,    100, storeInfo.Logo),
                GenerateInParam("@createtime",   SqlDbType.DateTime,   8, storeInfo.CreateTime),
                GenerateInParam("@mobile",       SqlDbType.Char,      15, storeInfo.Mobile),
                GenerateInParam("@phone",        SqlDbType.Char,      12, storeInfo.Phone),
                GenerateInParam("@qq",           SqlDbType.Char,      11, storeInfo.QQ),
                GenerateInParam("@ww",           SqlDbType.Char,      50, storeInfo.WW),
                GenerateInParam("@depoint",      SqlDbType.Decimal,    4, storeInfo.DePoint),
                GenerateInParam("@sepoint",      SqlDbType.Decimal,    4, storeInfo.SePoint),
                GenerateInParam("@shpoint",      SqlDbType.Decimal,    4, storeInfo.ShPoint),
                GenerateInParam("@honesties",    SqlDbType.Int,        4, storeInfo.Honesties),
                GenerateInParam("@stateendtime", SqlDbType.DateTime,   8, storeInfo.StateEndTime),
                GenerateInParam("@theme",        SqlDbType.Char,      20, storeInfo.Theme),
                GenerateInParam("@banner",       SqlDbType.NChar,    100, storeInfo.Banner),
                GenerateInParam("@announcement", SqlDbType.NChar,    200, storeInfo.Announcement),
                GenerateInParam("@description",  SqlDbType.NChar,    300, storeInfo.Description),
                GenerateInParam("@storeid",      SqlDbType.Int,        4, storeInfo.StoreId)
            };
            string commandText = string.Format("UPDATE [{0}stores] SET [state]=@state,[name]=@name,[regionid]=@regionid,[storerid]=@storerid,[storeiid]=@storeiid,[logo]=@logo,[createtime]=@createtime,[mobile]=@mobile,[phone]=@phone,[qq]=@qq,[ww]=@ww,[depoint]=@depoint,[sepoint]=@sepoint,[shpoint]=@shpoint,[honesties]=@honesties,[stateendtime]=@stateendtime,[theme]=@theme,[banner]=@banner,[announcement]=@announcement,[description]=@description WHERE [storeid]=@storeid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#5
0
        public bool UpdateServiceEval(ServiceEvalInfo model)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@Name",          SqlDbType.NVarChar,  50, model.Name),
                GenerateInParam("@Contact",       SqlDbType.NVarChar,  50, model.Contact),
                GenerateInParam("@Province",      SqlDbType.NVarChar,  50, model.Province),
                GenerateInParam("@City",          SqlDbType.NVarChar,  50, model.City),
                GenerateInParam("@Courier",       SqlDbType.NVarChar, 250, model.Courier),
                GenerateInParam("@EvalProduct",   SqlDbType.Int,        4, model.EvalProduct),
                GenerateInParam("@EvalLogistics", SqlDbType.Int,        4, model.EvalLogistics),
                GenerateInParam("@EvalService",   SqlDbType.Int,        4, model.EvalService),
                GenerateInParam("@Body",          SqlDbType.NText,      0, model.Body),
                GenerateInParam("@CreateTime",    SqlDbType.DateTime,   8, model.CreateTime),
                GenerateInParam("@State",         SqlDbType.Int,        4, model.State),
                GenerateInParam("@WeChatName",    SqlDbType.NVarChar, 250, model.WeChatName),
                GenerateInParam("@WeChatOpenId",  SqlDbType.NVarChar,  50, model.WeChatOpenId),
                GenerateInParam("@id",            SqlDbType.Int,        4, model.Id)
            };

            string commandText = string.Format("update {0}ServiceEval set Name=@Name,Contact=@Contact,Province=@Province,Courier=@Courier,City=@City,EvalProduct=@EvalProduct,EvalLogistics=@EvalLogistics,EvalService=@EvalService,Body=@Body,CreateTime=@CreateTime,State=@State,WeChatName=@WeChatName,weChatOpenId=@weChatOpenId  where id=@id ",
                                               RDBSHelper.RDBSTablePre);

            if (RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#6
0
        public bool UpdateProductFeedbacks(ProductFeedbacksInfo model)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@CityName",     SqlDbType.NVarChar,   50, model.CityName),
                GenerateInParam("@ProductName",  SqlDbType.NVarChar,   50, model.ProductName),
                GenerateInParam("@ProductModel", SqlDbType.NVarChar,   50, model.ProductModel),
                GenerateInParam("@CustomerName", SqlDbType.NVarChar,   50, model.CustomerName),
                GenerateInParam("@Contact",      SqlDbType.NVarChar,   50, model.Contact),
                GenerateInParam("@Address",      SqlDbType.NVarChar,  250, model.Address),
                GenerateInParam("@Body",         SqlDbType.NText,       0, model.Body),
                GenerateInParam("@State",        SqlDbType.Int,         4, model.State),
                GenerateInParam("@CreateTime",   SqlDbType.DateTime,    8, model.CreateTime),
                GenerateInParam("@WeChatName",   SqlDbType.NVarChar,  250, model.WeChatName),
                GenerateInParam("@WeChatOpenId", SqlDbType.NVarChar,   50, model.WeChatOpenId),
                GenerateInParam("@Imgs",         SqlDbType.NVarChar, 1000, model.Imgs),
                GenerateInParam("@id",           SqlDbType.Int,         4, model.Id)
            };

            string commandText = string.Format("update {0}ProductFeedbacks set CityName=@CityName,ProductName=@ProductName,ProductModel=@ProductModel,CustomerName=@CustomerName,Contact=@Contact,Address=@Address,sBody=@Body,CreateTime=@CreateTime,State=@State,WeChatName=@WeChatName,weChatOpenId=@weChatOpenId,Imgs=@Imgs  where id=@id ",
                                               RDBSHelper.RDBSTablePre);

            if (RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#7
0
 /// <summary>
 /// 申请退款
 /// </summary>
 /// <param name="orderRefundInfo">订单退款信息</param>
 public void ApplyRefund(OrderRefundInfo orderRefundInfo)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@storeid",          SqlDbType.Int,       4, orderRefundInfo.StoreId),
         GenerateInParam("@storename",        SqlDbType.NVarChar, 60, orderRefundInfo.StoreName),
         GenerateInParam("@oid",              SqlDbType.Int,       4, orderRefundInfo.Oid),
         GenerateInParam("@osn",              SqlDbType.VarChar,  30, orderRefundInfo.OSN),
         GenerateInParam("@uid",              SqlDbType.Int,       4, orderRefundInfo.Uid),
         GenerateInParam("@state",            SqlDbType.TinyInt,   1, orderRefundInfo.State),
         GenerateInParam("@applytime",        SqlDbType.DateTime,  8, orderRefundInfo.ApplyTime),
         GenerateInParam("@paymoney",         SqlDbType.Decimal,   8, orderRefundInfo.PayMoney),
         GenerateInParam("@refundmoney",      SqlDbType.Decimal,   8, orderRefundInfo.RefundMoney),
         GenerateInParam("@refundsn",         SqlDbType.VarChar,  30, orderRefundInfo.RefundSN),
         GenerateInParam("@refundsystemname", SqlDbType.VarChar,  20, orderRefundInfo.RefundSystemName),
         GenerateInParam("@refundfriendname", SqlDbType.NVarChar, 30, orderRefundInfo.RefundFriendName),
         GenerateInParam("@refundtime",       SqlDbType.DateTime,  8, orderRefundInfo.RefundTime),
         GenerateInParam("@paysn",            SqlDbType.VarChar,  30, orderRefundInfo.PaySN),
         GenerateInParam("@paysystemname",    SqlDbType.VarChar,  20, orderRefundInfo.PaySystemName),
         GenerateInParam("@payfriendname",    SqlDbType.NVarChar, 30, orderRefundInfo.PayFriendName)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}applyrefund", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#8
0
 /// <summary>
 /// 清空购物车的商品
 /// </summary>
 /// <param name="sid">sid</param>
 /// <returns></returns>
 public int ClearCart(string sid)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@sid", SqlDbType.Char, 16, sid)
     };
     return(RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                       string.Format("{0}clearcartbysid", RDBSHelper.RDBSTablePre),
                                       parms));
 }
示例#9
0
        /// <summary>
        /// 更新订单商品的满减促销活动
        /// </summary>
        /// <param name="orderProductList">订单商品列表</param>
        public void UpdateOrderProductFullCut(List <OrderProductInfo> orderProductList)
        {
            StringBuilder sql = new StringBuilder();

            foreach (OrderProductInfo orderProductInfo in orderProductList)
            {
                sql.AppendFormat("UPDATE [{0}orderproducts] SET [extcode5]={1} WHERE [recordid]={2};", RDBSHelper.RDBSTablePre, orderProductInfo.ExtCode5, orderProductInfo.RecordId);
            }
            RDBSHelper.ExecuteNonQuery(CommandType.Text, sql.ToString());
        }
示例#10
0
        /// <summary>
        /// 更新订单商品的单品促销活动
        /// </summary>
        /// <param name="orderProductList">订单商品列表</param>
        public void UpdateOrderProductSingle(List <OrderProductInfo> orderProductList)
        {
            StringBuilder sql = new StringBuilder();

            foreach (OrderProductInfo orderProductInfo in orderProductList)
            {
                sql.AppendFormat("UPDATE [{0}orderproducts] SET [discountprice]={1},[paycredits]={2},[coupontypeid]={3},[extcode1]={4} WHERE [recordid]={5};", RDBSHelper.RDBSTablePre, orderProductInfo.DiscountPrice, orderProductInfo.PayCredits, orderProductInfo.CouponTypeId, orderProductInfo.ExtCode1, orderProductInfo.RecordId);
            }
            RDBSHelper.ExecuteNonQuery(CommandType.Text, sql.ToString());
        }
示例#11
0
        /// <summary>
        /// 更新订单商品的买送促销活动
        /// </summary>
        /// <param name="orderProductList">订单商品列表</param>
        public void UpdateOrderProductBuySend(List <OrderProductInfo> orderProductList)
        {
            StringBuilder sql = new StringBuilder();

            foreach (OrderProductInfo orderProductInfo in orderProductList)
            {
                sql.AppendFormat("UPDATE [{0}orderproducts] SET [realcount]={1},[buycount]={2},[extcode2]={3} WHERE [recordid]={4};", RDBSHelper.RDBSTablePre, orderProductInfo.RealCount, orderProductInfo.BuyCount, orderProductInfo.ExtCode2, orderProductInfo.RecordId);
            }
            RDBSHelper.ExecuteNonQuery(CommandType.Text, sql.ToString());
        }
示例#12
0
        public void DeleteUserById(int userID)
        {
            DbParameter[] param =
            {
                GenerateInParam("@userID", SqlDbType.Int, 4, userID)
            };
            string commandText = String.Format("DELETE FROM [{0}User] WHERE [userID]=@userID;",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, param);
        }
示例#13
0
        /// <summary>
        /// 清空过期购物车
        /// </summary>
        /// <param name="expireTime">过期时间</param>
        public void ClearExpiredCart(DateTime expireTime)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@expiretime", SqlDbType.DateTime, 8, expireTime)
            };
            string commandText = string.Format("DELETE FROM [{0}orderproducts] WHERE [oid]=0 AND [addtime]<@expiretime",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#14
0
 /// <summary>
 /// 更新购物车的用户id
 /// </summary>
 /// <param name="uid">用户id</param>
 /// <param name="sid">用户sid</param>
 public void UpdateCartUidBySid(int uid, string sid)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@uid", SqlDbType.Int,   4, uid),
         GenerateInParam("@sid", SqlDbType.Char, 16, sid)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}updatecartuidbysid", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#15
0
        /// <summary>
        /// 删除商品关键词
        /// </summary>
        /// <param name="pid">商品id</param>
        public void DeleteProductKeyword(int pid)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@pid", SqlDbType.Int, 4, pid)
            };
            string commandText = string.Format("DELETE FROM [{0}productkeywords] WHERE [pid]=@pid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#16
0
 /// <summary>
 /// 更新订单状态
 /// </summary>
 /// <param name="oid">订单id</param>
 /// <param name="orderState">订单状态</param>
 public void UpdateOrderState(int oid, OrderState orderState)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@oid",        SqlDbType.Int,     4, oid),
         GenerateInParam("@orderstate", SqlDbType.TinyInt, 1, (int)orderState)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}updateorderstate", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#17
0
        /// <summary>
        /// 删除店铺配送费用
        /// </summary>
        /// <param name="recordId">记录id</param>
        public void DeleteStoreShipFeeById(int recordId)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@recordid", SqlDbType.Int, 4, recordId)
            };
            string commandText = string.Format("DELETE FROM [{0}storeshipfees] WHERE [recordid]=@recordId",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#18
0
        /// <summary>
        /// 删除店铺配送模板
        /// </summary>
        /// <param name="storeSTid">店铺配送模板id</param>
        public void DeleteStoreShipTemplateById(int storeSTid)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@storestid", SqlDbType.Int, 4, storeSTid)
            };
            string commandText = string.Format("DELETE FROM [{0}storeshipfees] WHERE [storestid]=@storestid;DELETE FROM [{0}storeshiptemplates] WHERE [storestid]=@storestid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#19
0
 /// <summary>
 /// 更新用户密码
 /// </summary>
 /// <param name="userid"></param>
 /// <param name="password"></param>
 public void UpdateUserPasswordByUid(int userId, string password)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@UserID",   SqlDbType.Int,   4, userId),
         GenerateInParam("@password", SqlDbType.Char, 32, password)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.Text,
                                string.Format("update [{0}User] set password = @password where UserID = @UserID", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#20
0
        /// <summary>
        /// 清空过期的线下支付订单
        /// </summary>
        /// <param name="expireTime">过期时间</param>
        public void ClearExpiredOfflinePayOrder(DateTime expireTime)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@expiretime", SqlDbType.DateTime, 8, expireTime)
            };
            string commandText = string.Format("DELETE FROM [{0}orderproducts] WHERE [oid] IN (SELECT [oid] FROM [{0}orders] WHERE [paymode]=2 AND [paysn]='' AND [addtime]<@expiretime);DELETE FROM [{0}orders] WHERE [paymode]=2 AND [paysn]='' AND [addtime]<@expiretime",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#21
0
        /// <summary>
        /// 删除店铺行业
        /// </summary>
        /// <param name="storeIid">店铺行业id</param>
        public void DeleteStoreIndustryById(int storeIid)
        {
            DbParameter[] param =
            {
                GenerateInParam("@storeiid", SqlDbType.SmallInt, 2, storeIid)
            };
            string commandText = String.Format("DELETE FROM [{0}storeindustries] WHERE [storeiid]=@storeiid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, param);
        }
示例#22
0
 /// <summary>
 /// 更新订单的评价
 /// </summary>
 /// <param name="oid">订单id</param>
 /// <param name="isReview">是否评价</param>
 public void UpdateOrderIsReview(int oid, int isReview)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@oid",      SqlDbType.Int,     4, oid),
         GenerateInParam("@isreview", SqlDbType.TinyInt, 1, isReview)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}updateorderisreview", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#23
0
        /// <summary>
        /// 创建店铺行业
        /// </summary>
        public void CreateStoreIndustry(StoreIndustryInfo storeIndustryInfo)
        {
            DbParameter[] param =
            {
                GenerateInParam("@title",        SqlDbType.NChar, 150, storeIndustryInfo.Title),
                GenerateInParam("@displayorder", SqlDbType.Int,     4, storeIndustryInfo.DisplayOrder)
            };
            string commandText = String.Format("INSERT INTO [{0}storeindustries] ([title],[displayorder]) VALUES(@title,@displayorder)",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, param);
        }
示例#24
0
 /// <summary>
 /// 更新订单折扣
 /// </summary>
 /// <param name="oid">订单id</param>
 /// <param name="discount">折扣</param>
 /// <param name="surplusMoney">剩余金额</param>
 public void UpdateOrderDiscount(int oid, decimal discount, decimal surplusMoney)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@oid",          SqlDbType.Int,     4, oid),
         GenerateInParam("@discount",     SqlDbType.Decimal, 8, discount),
         GenerateInParam("@surplusmoney", SqlDbType.Decimal, 8, surplusMoney)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}updateorderdiscount", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#25
0
        /// <summary>
        /// 更新店铺状态
        /// </summary>
        /// <param name="storeId">店铺id</param>
        /// <param name="state">状态</param>
        /// <param name="stateEndTime">状态结束时间</param>
        public void UpdateStoreState(int storeId, StoreState state, DateTime stateEndTime)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@state",        SqlDbType.TinyInt,  1, (int)state),
                GenerateInParam("@stateendtime", SqlDbType.DateTime, 8, stateEndTime),
                GenerateInParam("@storeid",      SqlDbType.Int,      4, storeId)
            };
            string commandText = string.Format("UPDATE [{0}stores] SET [state]=@state,[stateendtime]=@stateendtime WHERE [storeid]=@storeid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#26
0
        /// <summary>
        /// 更新店铺行业
        /// </summary>
        public void UpdateStoreIndustry(StoreIndustryInfo storeIndustryInfo)
        {
            DbParameter[] param =
            {
                GenerateInParam("@title",        SqlDbType.NChar,    150, storeIndustryInfo.Title),
                GenerateInParam("@displayorder", SqlDbType.Int,        4, storeIndustryInfo.DisplayOrder),
                GenerateInParam("@storeiid",     SqlDbType.SmallInt,   2, storeIndustryInfo.StoreIid)
            };
            string commandText = String.Format("UPDATE [{0}storeindustries] SET [title]=@title,[displayorder]=@displayorder WHERE [storeiid]=@storeiid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, param);
        }
示例#27
0
        /// <summary>
        /// 创建商品关键词
        /// </summary>
        /// <param name="productKeywordInfo">商品关键词信息</param>
        public void CreateProductKeyword(ProductKeywordInfo productKeywordInfo)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@keyword",   SqlDbType.NChar, 40, productKeywordInfo.Keyword),
                GenerateInParam("@pid",       SqlDbType.Int,    4, productKeywordInfo.Pid),
                GenerateInParam("@relevancy", SqlDbType.Int,    4, productKeywordInfo.Relevancy)
            };
            string commandText = string.Format("INSERT INTO [{0}productkeywords]([keyword],[pid],[relevancy]) VALUES(@keyword,@pid,@relevancy)",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }
示例#28
0
 /// <summary>
 /// 付款
 /// </summary>
 /// <param name="oid">订单id</param>
 /// <param name="orderState">订单状态</param>
 /// <param name="paySN">支付单号</param>
 /// <param name="payTime">支付时间</param>
 public void PayOrder(int oid, OrderState orderState, string paySN, DateTime payTime)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@oid",        SqlDbType.Int,       4, oid),
         GenerateInParam("@orderstate", SqlDbType.TinyInt,   1, (int)orderState),
         GenerateInParam("@paysn",      SqlDbType.Char,     30, paySN),
         GenerateInParam("@paytime",    SqlDbType.DateTime,  8, payTime)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}payorder", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#29
0
 /// <summary>
 /// 发货
 /// </summary>
 /// <param name="oid">订单id</param>
 /// <param name="orderState">订单状态</param>
 /// <param name="shipSN">配送单号</param>
 /// <param name="shipTime">配送时间</param>
 public void SendOrderProduct(int oid, OrderState orderState, string shipSN, DateTime shipTime)
 {
     DbParameter[] parms =
     {
         GenerateInParam("@oid",        SqlDbType.Int,       4, oid),
         GenerateInParam("@orderstate", SqlDbType.TinyInt,   1, (int)orderState),
         GenerateInParam("@shipsn",     SqlDbType.Char,     30, shipSN),
         GenerateInParam("@shiptime",   SqlDbType.DateTime,  8, shipTime)
     };
     RDBSHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}sendorderproduct", RDBSHelper.RDBSTablePre),
                                parms);
 }
示例#30
0
        /// <summary>
        /// 更新店铺积分
        /// </summary>
        /// <param name="storeId">店铺id</param>
        /// <param name="dePoint">商品描述评分</param>
        /// <param name="sePoint">商家服务评分</param>
        /// <param name="shPoint">商家配送评分</param>
        public void UpdateStorePoint(int storeId, decimal dePoint, decimal sePoint, decimal shPoint)
        {
            DbParameter[] parms =
            {
                GenerateInParam("@depoint", SqlDbType.Decimal, 4, dePoint),
                GenerateInParam("@sepoint", SqlDbType.Decimal, 4, sePoint),
                GenerateInParam("@shpoint", SqlDbType.Decimal, 4, shPoint),
                GenerateInParam("@storeid", SqlDbType.Int,     4, storeId)
            };
            string commandText = string.Format("UPDATE [{0}stores] SET [depoint]=@depoint,[sepoint]=@sepoint,[shpoint]=@shpoint WHERE [storeid]=@storeid",
                                               RDBSHelper.RDBSTablePre);

            RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
        }