Example #1
0
 public static Boolean DeleteDataByDateTime(string datetime)
 {
     try
     {
         string         query = @"delete from NotifyTrade where CONVERT(varchar, createDate, 112 ) = @datetime";
         SqlParameter[] param = new SqlParameter[] {
             new SqlParameter("@datetime", datetime)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #2
0
 public static Boolean DeleteDataByNick(string nick)
 {
     try
     {
         string         query = @"delete from NotifyTrade where nick = @nick";
         SqlParameter[] param = new SqlParameter[] {
             new SqlParameter("@nick", nick)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #3
0
 /// <summary>
 /// 设置卖家的主动通知为不可用
 /// </summary>
 /// <param name="sellerID"></param>
 /// <returns></returns>
 public static bool UpdateSellerNifty(String sellerID)
 {
     try
     {
         string         query = @"update CusPermitConfig set status = 0 where id = @id";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@id", sellerID)
         };
         return(DataBase.ExecuteSql(query, param) > 0);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #4
0
 /// <summary>
 /// 删除卖家的主动通知消息
 /// </summary>
 /// <param name="sellerID"></param>
 /// <returns></returns>
 public static bool DeleteSellerNifty(String sellerID)
 {
     try
     {
         string         query = @"delete from CusPermitConfig where nick = @nick";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@nick", sellerID)
         };
         return(DataBase.ExecuteSql(query, param) > 0);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #5
0
 //删除msg
 public static bool deleteMsg(string id)
 {
     try
     {
         string         query = "delete from  tab_msgTemp where id=@id";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@id", id)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #6
0
        public static bool Add(Buyers o, string strNick, string groupNo, string Seller_Id)
        {
            try
            {
                string query = @"insert into Buyer_" + Seller_Id + @"(buyer_id,SELLER_ID,buyer_nick,avg_price,status,close_trade_count,close_trade_amount,
item_close_count,last_trade_time,item_num,trade_amount,grade,city,trade_count,createDate,groupNo,buyerType,
buyer_reallName,cellPhone,province,buyer_credit,address)
   values(@buyer_id,@SELLER_ID,@buyer_nick,@avg_price,@status,@close_trade_count,@close_trade_amount,
@item_close_count,@last_trade_time,@item_num,@trade_amount,@grade,@city,@trade_count,@createDate,@groupNo,@buyerType,
@buyer_reallName,@cellPhone,@province,@buyer_credit,@address)";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@buyer_id", o.BuyerId),
                    new SqlParameter("@SELLER_ID", strNick),
                    new SqlParameter("@buyer_nick", o.Buyer_nick),
                    new SqlParameter("@avg_price", string.IsNullOrEmpty(o.AvgPrice)?"0":o.AvgPrice),
                    new SqlParameter("@status", string.IsNullOrEmpty(o.Status)?"":o.Status),
                    new SqlParameter("@close_trade_count", o.CloseTradeCount),
                    new SqlParameter("@close_trade_amount", string.IsNullOrEmpty(o.CloseTradeAmount)?"0":o.CloseTradeAmount),
                    new SqlParameter("@item_close_count", o.ItemCloseCount),
                    new SqlParameter("@last_trade_time", string.IsNullOrEmpty(o.LastTradeTime)?"":o.LastTradeTime),
                    new SqlParameter("@item_num", o.ItemNum),
                    new SqlParameter("@trade_amount", string.IsNullOrEmpty(o.TradeAmount)?"0":o.TradeAmount),
                    new SqlParameter("@grade", o.Grade),
                    new SqlParameter("@city", o.City == null?"":o.City),
                    new SqlParameter("@trade_count", o.TradeCount),
                    new SqlParameter("@createDate", DateTime.Now),
                    new SqlParameter("@groupNo", int.Parse(groupNo)),
                    new SqlParameter("@buyerType", "0"),//0表示自己店铺的会员
                    new SqlParameter("@buyer_reallName", string.IsNullOrEmpty(o.Buyer_reallName)?"":o.Buyer_reallName),
                    new SqlParameter("@cellPhone", string.IsNullOrEmpty(o.CellPhone)?"":o.CellPhone),
                    new SqlParameter("@province", string.IsNullOrEmpty(o.BuyerProvince)?"":o.BuyerProvince),
                    new SqlParameter("@buyer_credit", "1"),
                    new SqlParameter("@email", string.IsNullOrEmpty(o.Email)?"":o.Email),
                    new SqlParameter("@address", string.IsNullOrEmpty(o.Address)?"":o.Address)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #7
0
 public static bool AddOPENID(string openID)
 {
     try
     {
         string         query = @"insert TuiGuangIDs(openid,status)values(@openid,0)";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@openid", openID)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #8
0
 /// <summary>
 /// 更新买家到黑名单
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public static bool UpdateBuyerToBlackList(string buyerId)
 {
     try
     {
         string         query = @"update Buyer set status = 'black' where buyer_id = @buyer_id";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@buyer_id", buyerId)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #9
0
 public static bool DeleteTuiPro(string itemNo)
 {
     try
     {
         string         query = @"delete from TuiguangPro where itemNo = @itemNo";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@itemNo", itemNo)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #10
0
 public static bool ClearUnusedOrder(string sellerNick)
 {
     try
     {
         string         query = @"delete from BatchShipping where sellerNick = @sellerNick and status='无效'";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sellerNick", sellerNick)
         };
         int val = DataBase.ExecuteSql(query, param);
         return(val > 0);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #11
0
 /// <summary>
 /// 标记分配的OPENID
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public static bool UpdateOpenStatus(string openID)
 {
     try
     {
         string         query = @"update TuiGuangIDs set status = 1 where openid = @openid";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@openid", openID)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #12
0
        /// <summary>
        /// IP 代理
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        public static bool AddIPProxy(string ip)
        {
            try
            {
                string query = "insert into IPProxy(ip,createTime)values(@ip,getdate())";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@ip", ip)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #13
0
        public static bool Delete(string SystemMsgID)
        {
            try
            {
                string query = @"delete from  SystemMessages where SystemMsgID = @SystemMsgID";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@SystemMsgID", SystemMsgID),
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #14
0
 public static String AddTuiGuangLog(string sellerNick, string accessNum)
 {
     try
     {
         string         query = @"insert into TuiguangLog(sellerNick,accessNum,createTime)values(@sellerNick,@accessNum,getdate())";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sellerNick", sellerNick),
             new SqlParameter("@accessNum", accessNum)
         };
         DataBase.ExecuteSql(query, param);
         return("1");
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return("0");
     }
 }
Example #15
0
 public bool DeleteAllCloseOrderBlaklist(string sellerNick)
 {
     try
     {
         string query = "delete from BlakListCloseOrder where sellerNick = @sellerNick";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sellerNick", sellerNick)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #16
0
        public static bool DeleteWhitelist(string sellerNick)
        {
            try
            {
                string query = "delete from WhiteList where sellerNick = @sellerNick";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@sellerNick", sellerNick)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #17
0
        public static bool AddWhitelist(WhiteList obj)
        {
            try
            {
                string query = "insert into WhiteList(sellerNick,createDate)values(@sellerNick,getdate())";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@sellerNick", obj.SellerNick)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #18
0
        public static bool DeleteBlaklist(string blakListID)
        {
            try
            {
                string query = "delete from BlakList where blakListID = @blakListID";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@blakListID", blakListID)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #19
0
        public static bool DeleteIPProxy(string ip)
        {
            try
            {
                string query = "delete from IPProxy where ip = @ip";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@ip", ip)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #20
0
        public static bool DeleteOrderByID(string id)
        {
            try
            {
                string query = @"delete from BatchShipping where id = @id";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@id", id)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #21
0
        public static bool AddBuyerGroup(string groupID, string buyerID)
        {
            try
            {
                string query = @"insert into BuyerGroup (groupID,buyerID)values(@groupID,@buyerID)";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@groupID", groupID),
                    new SqlParameter("@buyerID", buyerID)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #22
0
        /// <summary>
        /// 同步物流公司
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public static bool AddLogisticCompany(LogisticCompany o)
        {
            try
            {
                string query = @"insert into LogisticCompany(code,companyName)values(@code,@companyName)";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@code", o.Code),
                    new SqlParameter("@companyName", o.CompanyName)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #23
0
        /// <summary>
        /// 构建卖家测试号码池
        /// </summary>
        /// <param name="sellerNick"></param>
        /// <param name="phone"></param>
        /// <returns></returns>
        public static bool AddMsgSendHisIntoTestTable(string sellerNick, string phone)
        {
            try
            {
                string query = @"insert into SellerTestPhone(sellerNick,testPhone,createDate)values(@sellerNick,@testPhone,getdate())";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@sellerNick", sellerNick),
                    new SqlParameter("@testPhone", phone)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                //ExceptionReporter.WriteLog(ex, CHENGTUAN.Entity.ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #24
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static bool updateMsg(string id, string pageType, string msg, int use)
 {
     try
     {
         string         query = "update tab_msgTemp set page_type=@pageTtype,msg_content=@msg_content,msg_use=@msg_use  where id=@id";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@id", id),
             new SqlParameter("@pageTtype", pageType),
             new SqlParameter("@msg_content", msg),
             new SqlParameter("@msg_use", use)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #25
0
 public int UpdateExport(string sellerId, int status)
 {
     try
     {
         string query = "update Buyer_export set  export_status = @export_status where buyer_SellerId = @buyer_SellerId";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@buyer_SellerId", sellerId),
             new SqlParameter("@export_status", status)
         };
         int count = DataBase.ExecuteSql(query, param);
         return(count);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(0);
     }
 }
Example #26
0
 //插入导出语句
 public static int InsertBuyer_ExportSql(string sellerId, string sqlString)
 {
     try
     {
         string query = "insert into Buyer_ExportSql(buyer_SellerId,sqlString) values(@buyer_SellerId,@sqlString)";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sqlString", sqlString),
             new SqlParameter("@buyer_SellerId", sellerId),
         };
         int count = DataBase.ExecuteSql(query, param);
         return(count);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(0);
     }
 }
Example #27
0
 /// <summary>
 /// 更新自动评价状态
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public Boolean UpdateAutoRatingStatus(string sellerNick, int openStatus)
 {
     try
     {
         string query = "update RateConfig set isAutoRating = @isAutoRating where sellerNick = @sellerNick";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sellerNick", sellerNick),
             new SqlParameter("@isAutoRating", openStatus)
         };
         int i = DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #28
0
        public static Boolean UpdateSendStatus(string status, string transNumber)
        {
            try
            {
                string query = @"update MsgSendHis set sendStatus = @sendStatus where transNumber = @transNumber";

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@transNumber", transNumber),
                    new SqlParameter("@sendStatus", status)
                };
                DataBase.ExecuteSql(query, param);
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, CHENGTUAN.Entity.ExceptionPostion.TBApply_Data);
                return(false);
            }
        }
Example #29
0
 /// <summary>
 /// 下架/上架推广位
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public static bool UpdateTuiPro(TuiguangPro o)
 {
     try
     {
         string         query = @"update TuiguangPro set tuiStatus = @tuiStatus where itemNo = @itemNo and sellerNick = @sellerNick";
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@tuiStatus", o.TuiStatus),
             new SqlParameter("@itemNo", o.ItemNo),
             new SqlParameter("@sellerNick", o.SellerNick),
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
Example #30
0
 public bool AddBlaklistCloseOrder(BlakList obj)
 {
     try
     {
         string query = "insert into AddBlaklist(sellerNick,blakName,createDate)values(@sellerNick,@blakName,getdate())";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@sellerNick", obj.SellerNick),
             new SqlParameter("@blakName", obj.BlakName)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }