Example #1
0
        protected void bt_all_Click(object sender, EventArgs e)
        {
            int j = 0;

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    try
                    {
                        string seller    = Convert.ToString(dt.Rows[i]["sellerNick"]);
                        string seller_id = SellersBLL.GetSellerIdByNick(seller);
                        if (!string.IsNullOrEmpty(seller_id))
                        {
                            long count = Convert.ToInt32(BuyerBLL.GetBuyerCount("1", seller));
                            if (count > 0)
                            {
                            }
                            else
                            {
                                SellersDAL sellerdl = new SellersDAL();
                                sellerdl.addBuyerData(seller_id);
                                j++;
                            }
                        }
                    }
                    catch
                    {
                        continue;
                    }
                    lb_num.Text = j.ToString();
                }
            }
        }
Example #2
0
 /// <summary>
 /// 后台设置卖家不可用,同时将其短信账户清0:对于卖家退款的情况比较有用
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public static bool UpdateSellerStatus(string sellerID)
 {
     if (SellersDAL.UpdateSellerStatus(sellerID))
     {
         string sellerNick = SellersDAL.GetSellerNickById(sellerID);
         return(SellersDAL.UpdateSellerMsgStatus(sellerNick));
     }
     return(false);
 }
Example #3
0
        public static string getSellerAppID(string nick)
        {
            DataTable tb = SellersDAL.getSellerAppID(nick);

            if (tb != null && tb.Rows.Count > 0)
            {
                return(tb.Rows[0]["Appendid"].ToString());
            }
            return("");
        }
Example #4
0
        /// <summary>
        /// 获取卖家上次同步数据的时间
        /// </summary>
        /// <param name="sellerNick"></param>
        /// <returns></returns>
        public static string GetSellerSynDate(string sellerNick)
        {
            DataTable tb = SellersDAL.GetSellerSynDate(sellerNick);

            if (tb != null && tb.Rows.Count > 0)
            {
                return(tb.Rows[0]["synDate"].ToString());
            }
            return("");
        }
Example #5
0
        public static string GetSignName(string nick)
        {
            string name = SellersDAL.GetShopName(nick);

            if (string.IsNullOrEmpty(name) || name.Equals("undefined"))
            {
                return(nick);
            }
            return(name);
        }
Example #6
0
        //读取会员api
        protected void Button2_Click(object sender, EventArgs e)
        {
            string sellerNick = TextBox2.Text.Trim();
            string session    = txtSession.Text.Trim();
            //如果没有会员,则尝试建立会员列表  20160704 yao
            string memberNum = BuyerBLL.GetBuyerCount("1", sellerNick);

            if (memberNum.Equals("0") == true)
            {
                if (string.IsNullOrEmpty(sellerNick) == true)
                {
                    lbError.Text = "请输入昵称!"; return;
                }
                ;
                string seller_id = SellersBLL.GetSellerIdByNick(sellerNick);
                if (string.IsNullOrEmpty(seller_id) == false)
                {
                    SellersDAL sellerdl = new SellersDAL();
                    sellerdl.addBuyerData(seller_id);
                }
            }

            try
            {
                //下载淘宝数据到本地
                //初始化系统分组
                InitGroup(sellerNick);
                BuyerBLL buyerObj = new BuyerBLL();
                if (buyerObj.SynicBuyersInformation(sellerNick, session))
                {
                    //将最新同步数据时间更新写入DB
                    Sellers objSeller = new Sellers();
                    objSeller.Nick = sellerNick;
                    SellersBLL.UpdateSellerSynDate(objSeller);
                }
                lbError.Text      = "会员同步完成!";
                lbError.ForeColor = Color.Blue;
            }
            catch (Exception err)
            {
                ExceptionReporter.WriteLog(err, ExceptionPostion.TBApply_Data);
                lbError.Text = "会员同步完成,但出现异常,详情请看日志!";
            }
        }
Example #7
0
 public string SyncMemDele(string strUserName, string strSession, string strTime)
 {
     try
     {
         Console.WriteLine("开始同步,卖家:" + strUserName);
         //初始化系统分组
         InitGroup(strUserName);
         //同步系统订单,全部同步
         if (string.IsNullOrEmpty(strTime))
         {
             //获取会员数据量
             string memberNum = BuyerBLL.GetBuyerCount("1", strUserName);
             if (memberNum.Equals("0") == true)
             {//如果会员数量为0则添加一个表
                 //获取id
                 string seller_id = SellersBLL.GetSellerIdByNick(strUserName);
                 if (string.IsNullOrEmpty(seller_id) == false)
                 {//如果seller_id不为空则创建一个新表
                     SellersDAL.addBuyer(seller_id);
                 }
             }
             BuyerBLL buyerObj = new BuyerBLL();
             if (buyerObj.SynicBuyersInformation(strUserName, strSession))
             {
                 //将最新同步数据时间更新写入DB
                 Sellers objSeller = new Sellers();
                 objSeller.Nick = strUserName;
                 SellersBLL.UpdateSellerSynDate(objSeller);
                 SellersBLL.SetSyncProcess(strUserName, 0);
             }
         }
     }
     catch (Exception err)
     {
         ExceptionReporter.WriteLog(err, ExceptionPostion.TBApply_Data);
     }
     return(strUserName);
 }
Example #8
0
 /// <summary>
 /// 更新卖家的到期时间
 /// </summary>
 /// <param name="time"></param>
 /// <param name="userNick"></param>
 /// <returns></returns>
 public static Boolean UpdateUnUseDate(string time, string userNick)
 {
     return(SellersDAL.UpdateUnUseDate(time, userNick));
 }
Example #9
0
 public static DataTable GetSellerRecords(string sellernick, string startDate, string endDate)
 {
     return(SellersDAL.GetSellerRecords(sellernick, startDate, endDate));
 }
Example #10
0
 public static string GetSellerPhone(string nick)
 {
     return(SellersDAL.GetSellerPhone(nick));
 }
Example #11
0
 /// <summary>
 /// 更新卖家营销短信发送百分比
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <param name="sendPrecent"></param>
 /// <returns></returns>
 public static int UpdateSellerMsgsendPrecent(string sellerNick, int sendPrecent)
 {
     return(SellersDAL.UpdateSellerMsgsendPrecent(sellerNick, sendPrecent));
 }
Example #12
0
 public static Boolean UpdateTradeFlag(string strNick)
 {
     return(SellersDAL.UpdateTradeFlag(strNick));
 }
Example #13
0
 public static bool UpdateSellerSYNData(string SELLER_ID)
 {
     return(SellersDAL.UpdateSellerSYNData(SELLER_ID));
 }
Example #14
0
 public static DataTable GetSellersAppendID(string sellerNick, string startDate, string endDate)
 {
     return(SellersDAL.GetSellersAppendID(sellerNick, startDate, endDate));
 }
Example #15
0
 public static DataTable GetSellerCountHavePhone(string sellerNick)
 {
     return(SellersDAL.GetSellerCountHavePhone(sellerNick));
 }
Example #16
0
 public static bool UpdateAppID(Sellers obj)
 {
     return(SellersDAL.UpdateAppID(obj));
 }
Example #17
0
 public static bool SetShopName(Sellers obj)
 {
     return(SellersDAL.SetShopName(obj));
 }
Example #18
0
 public static Boolean CheckSellerIsExit(string sellerNick)
 {
     return(SellersDAL.CheckSellerIsExit(sellerNick));
 }
Example #19
0
 public static DataTable getAppID()
 {
     return(SellersDAL.getAppID());
 }
Example #20
0
 public static string GetMAXAppendID()
 {
     return(SellersDAL.GetMAXAppendID());
 }
Example #21
0
 public static bool AddSellerExportAuth(string sellerNick)
 {
     return(SellersDAL.AddSellerExportAuth(sellerNick));
 }
Example #22
0
 public static DataTable GetSellers()
 {
     return(SellersDAL.GetSellers());
 }
Example #23
0
 public static bool DeleteSeller(string strNick)
 {
     return(SellersDAL.DeleteSeller(strNick));
 }
Example #24
0
 /// <summary>
 /// 添加卖家code
 /// </summary>
 /// <param name="nick"></param>
 /// <param name="code"></param>
 /// <returns></returns>
 public static bool AddSellersCode(string nick, string code)
 {
     return(SellersDAL.AddSellersCode(nick, code));
 }
Example #25
0
 public static bool SetSyncTradeFlag(string strNick, int flag)
 {
     return(SellersDAL.SetSyncTradeFlag(strNick, flag));
 }
Example #26
0
 public static string GetSellerIdByNick(string strNick)
 {
     return(SellersDAL.GetSellerIdByNick(strNick));
 }
Example #27
0
 public static string GetSellerSessionKey(string SELLER_ID)
 {
     return(SellersDAL.GetSellerSessionKey(SELLER_ID));
 }
Example #28
0
 /// <summary>
 /// 更新卖家code
 /// </summary>
 /// <param name="nick"></param>
 /// <param name="code"></param>
 /// <returns></returns>
 public static bool UpdateSellersCode(string nick, string code)
 {
     return(SellersDAL.UpdateSellersCode(nick, code));
 }
Example #29
0
 /// <summary>
 /// 获取卖家code
 /// </summary>
 /// <param name="nick"></param>
 /// <returns></returns>
 public static DataTable GetSellersCode(string nick)
 {
     return(SellersDAL.GetSellersCode(nick));
 }
Example #30
0
 public static string GetMAXAppendID(Sellers entity)
 {
     return(SellersDAL.GetMAXAppendID(entity));
 }