예제 #1
0
    protected void btnSendOrder_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(this.txtOrderID.Text))
        {
            ProductOrder po = new ProductOrder(this.txtOrderID.Text);

            if (po != null && !string.IsNullOrEmpty(po.OrderID))
            {
                DaDaOrder dadaOrder = new DaDaOrder();
                //在测试环境,使用统一商户和门店进行发单。其中,商户id:73753,门店编号:11047059
                dadaOrder.ShopNo            = "11047059";
                dadaOrder.ProductOrder      = po;
                dadaOrder.CityCode          = this.ddlCityCode.SelectedValue;
                dadaOrder.CreateTime        = DateTime.Now;
                dadaOrder.Info              = po.OrderMemo;
                dadaOrder.CargoType         = 2;
                dadaOrder.CargoWeight       = 1;
                dadaOrder.CargoPrice        = po.OrderPrice;
                dadaOrder.CargoNum          = po.OrderDetailCount;
                dadaOrder.IsPrepay          = false;
                dadaOrder.ExpectedFetchTime = DateTime.Now.AddHours(1);
                dadaOrder.InvoiceTitle      = "xx公司";
                dadaOrder.ReceiverName      = po.DeliverName;
                dadaOrder.ReceiverAddress   = po.DeliverAddress;
                dadaOrder.ReceiverPhone     = po.DeliverPhone;
                dadaOrder.ReceiverLat       = 31.191142;
                dadaOrder.ReceiverLng       = 121.453541;

                JObject jDaDaOrder = DaDaBiz.AddOrder(dadaOrder, int.Parse(this.rblAddOrderType.SelectedValue));
                this.lblMsg.Text = jDaDaOrder.ToString();
            }
        }
    }
예제 #2
0
    protected void btnGetCityCode_Click(object sender, EventArgs e)
    {
        JObject jCityCode = DaDaBiz.GetCityCode();

        if (jCityCode["code"] != null && jCityCode["code"].ToString() == "0" && jCityCode["result"] != null)
        {
            this.ddlCityCode.Items.Clear();
            foreach (var city in jCityCode["result"])
            {
                ListItem li = new ListItem(city["cityName"].ToString(), city["cityCode"].ToString());
                li.Selected = (li.Value == "021") ? true : false;
                this.ddlCityCode.Items.Add(li);
            }
        }
    }
예제 #3
0
 protected void btnFinish_Click(object sender, EventArgs e)
 {
     this.lblMsg.Text = DaDaBiz.FinishOrder(this.txtOrderID.Text);
 }
예제 #4
0
 protected void btnAccept_Click(object sender, EventArgs e)
 {
     this.lblMsg.Text = DaDaBiz.AcceptOrder(this.txtOrderID.Text);
 }
예제 #5
0
 protected void btnExpire_Click(object sender, EventArgs e)
 {
     this.lblMsg.Text = DaDaBiz.ExpireOrder(this.txtOrderID.Text);
 }
예제 #6
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     this.lblMsg.Text = DaDaBiz.CancelOrder(this.txtOrderID.Text, "测试取消订单");
 }