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(); } } }
/// <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); }
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(""); }
/// <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(""); }
public static string GetSignName(string nick) { string name = SellersDAL.GetShopName(nick); if (string.IsNullOrEmpty(name) || name.Equals("undefined")) { return(nick); } return(name); }
//读取会员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 = "会员同步完成,但出现异常,详情请看日志!"; } }
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); }
/// <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)); }
public static DataTable GetSellerRecords(string sellernick, string startDate, string endDate) { return(SellersDAL.GetSellerRecords(sellernick, startDate, endDate)); }
public static string GetSellerPhone(string nick) { return(SellersDAL.GetSellerPhone(nick)); }
/// <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)); }
public static Boolean UpdateTradeFlag(string strNick) { return(SellersDAL.UpdateTradeFlag(strNick)); }
public static bool UpdateSellerSYNData(string SELLER_ID) { return(SellersDAL.UpdateSellerSYNData(SELLER_ID)); }
public static DataTable GetSellersAppendID(string sellerNick, string startDate, string endDate) { return(SellersDAL.GetSellersAppendID(sellerNick, startDate, endDate)); }
public static DataTable GetSellerCountHavePhone(string sellerNick) { return(SellersDAL.GetSellerCountHavePhone(sellerNick)); }
public static bool UpdateAppID(Sellers obj) { return(SellersDAL.UpdateAppID(obj)); }
public static bool SetShopName(Sellers obj) { return(SellersDAL.SetShopName(obj)); }
public static Boolean CheckSellerIsExit(string sellerNick) { return(SellersDAL.CheckSellerIsExit(sellerNick)); }
public static DataTable getAppID() { return(SellersDAL.getAppID()); }
public static string GetMAXAppendID() { return(SellersDAL.GetMAXAppendID()); }
public static bool AddSellerExportAuth(string sellerNick) { return(SellersDAL.AddSellerExportAuth(sellerNick)); }
public static DataTable GetSellers() { return(SellersDAL.GetSellers()); }
public static bool DeleteSeller(string strNick) { return(SellersDAL.DeleteSeller(strNick)); }
/// <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)); }
public static bool SetSyncTradeFlag(string strNick, int flag) { return(SellersDAL.SetSyncTradeFlag(strNick, flag)); }
public static string GetSellerIdByNick(string strNick) { return(SellersDAL.GetSellerIdByNick(strNick)); }
public static string GetSellerSessionKey(string SELLER_ID) { return(SellersDAL.GetSellerSessionKey(SELLER_ID)); }
/// <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)); }
/// <summary> /// 获取卖家code /// </summary> /// <param name="nick"></param> /// <returns></returns> public static DataTable GetSellersCode(string nick) { return(SellersDAL.GetSellersCode(nick)); }
public static string GetMAXAppendID(Sellers entity) { return(SellersDAL.GetMAXAppendID(entity)); }