Exemplo n.º 1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtNickName.Text.Trim()))
     {
         lbSessionKey.Text = SellersBLL.GetSellerSessionKey(txtNickName.Text.Trim());
     }
 }
Exemplo n.º 2
0
 //授权开通物流提醒
 public static void OpenLogistics(string sellerNick)
 {
     string               key    = SellersBLL.GetSellerSessionKey(sellerNick);
     ITopClient           client = TBManager.GetClient();
     TmcUserPermitRequest req    = new TmcUserPermitRequest();
     //req.Topics = "taobao_trade_TradeCreate,taobao_refund_RefundCreate"; 不需要设置
     TmcUserPermitResponse rsp = client.Execute(req, key);
     //Console.WriteLine(rsp.Body);
 }
Exemplo n.º 3
0
        protected void BindData()
        {
            DataTable  dt   = new DataTable();
            DataColumn dc   = null;
            string     nick = Users.Nick;

            dc = dt.Columns.Add("reciverName", Type.GetType("System.String"));
            dc = dt.Columns.Add("cellPhone", Type.GetType("System.String"));
            if (string.IsNullOrEmpty(nick) == true)
            {
                return;
            }
            DataTable trade  = null;
            string    select = drpSType.SelectedValue.ToString();

            switch (select)
            {
            case "sign_notSure":
                trade = TradeBLL.GetTradeData(nick, "taobao_trade_TradeSellerShip");
                break;

            case "sure_notSign":
                trade = TradeBLL.GetTradeDataNosign(nick, "taobao_trade_TradeSellerShip");
                break;

            case "sure_notSucce":
                trade = TradeBLL.GetTradeDataNoSuccess(nick, "taobao_trade_TradeSellerShip");
                break;
            }
            Trade tradeInfo = null;

            if (trade != null && trade.Rows.Count > 0)
            {
                string key = SellersBLL.GetSellerSessionKey(nick);
                foreach (DataRow row in trade.Rows)//轮训订单
                {
                    //获取订单id
                    string tid = row["tid"].ToString();
                    //调用淘宝接口获取订单详细交易信息
                    tradeInfo = TBTrade.GetTradeContact(Convert.ToInt64(tid), key);
                    string  cellPhone   = tradeInfo == null ? "" : tradeInfo.ReceiverMobile;
                    string  reciverName = tradeInfo == null ? "" : tradeInfo.ReceiverName;
                    DataRow drow        = dt.NewRow();
                    drow["reciverName"] = reciverName;
                    drow["cellPhone"]   = cellPhone;
                    dt.Rows.Add(drow);
                }
            }
            tb_member           = dt;
            grdBuyer.DataSource = trade;
            grdBuyer.DataBind();
        }
Exemplo n.º 4
0
        protected void BindData()
        {
            DataTable  dt   = new DataTable();
            DataColumn dc   = null;
            string     nick = TextBox4.Text.Trim();

            string startDate = txt_StartTime.Value;
            string endDate   = txt_EndTime.Value;
            string startPay  = TextBox2.Text.Trim();
            string endDPay   = TextBox3.Text.Trim();

            try
            {
                if (!string.IsNullOrEmpty(startPay))
                {
                    Convert.ToInt32(startPay);
                }
                if (!string.IsNullOrEmpty(endDPay))
                {
                    Convert.ToInt32(endDPay);
                }
            }
            catch (Exception e)
            {
                Response.Write("<script language='javascript'>alert('输入正确格式的金额!');</script>");
                return;
            }

            dc = dt.Columns.Add("reciverName", Type.GetType("System.String"));
            dc = dt.Columns.Add("cellPhone", Type.GetType("System.String"));
            if (string.IsNullOrEmpty(nick) == true)
            {
                return;
            }
            DataTable trade  = null;
            string    select = drpSType.SelectedValue.ToString();

            switch (select)
            {
            case "sign_notSure":
                trade = TradeBLL.GetTradeData(nick, startDate, endDate, startPay, endDPay, "taobao_trade_TradeSellerShip");
                break;

            case "sure_notSign":
                trade = TradeBLL.GetTradeDataNosign(nick, startDate, endDate, startPay, endDPay, "taobao_trade_TradeSellerShip");
                break;

            case "sure_notSucce":
                trade = TradeBLL.GetTradeDataNoSuccess(nick, startDate, endDate, startPay, endDPay, "taobao_trade_TradeSellerShip");
                break;
            }
            Trade tradeInfo = null;

            if (trade != null && trade.Rows.Count > 0)
            {
                string key = SellersBLL.GetSellerSessionKey(nick);
                foreach (DataRow row in trade.Rows)//轮训订单
                {
                    //获取订单id
                    string tid = row["tid"].ToString();
                    //调用淘宝接口获取订单详细交易信息
                    tradeInfo = TBTrade.GetTradeContact(Convert.ToInt64(tid), key);
                    string  cellPhone   = tradeInfo == null ? "" : tradeInfo.ReceiverMobile;
                    string  reciverName = tradeInfo == null ? "" : tradeInfo.ReceiverName;
                    DataRow drow        = dt.NewRow();
                    drow["reciverName"] = reciverName;
                    drow["cellPhone"]   = cellPhone;
                    dt.Rows.Add(drow);
                }
            }
            tb_member           = dt;
            grdBuyer.DataSource = trade;
            grdBuyer.DataBind();
        }
Exemplo n.º 5
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     //从数据库中查询出sessionkey
     lbSession.Text = SellersBLL.GetSellerSessionKey(TextBox1.Text.Trim());
 }