예제 #1
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();
        }
예제 #2
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();
        }