コード例 #1
0
    private void BindLookOrderDetails()
    {
        string orderID = WebUnitily.CheckStr(Request["orderID"]);

        if (orderID != "")
        {
            DataSet set = new OrderListInfo().GetOrderDetails(orderID);
            if (set.Tables.Count > 0)
            {
                if (set.Tables[0].Rows.Count > 0)
                {
                    gvMinuterOrderList.DataSource   = set.Tables[0];
                    gvMinuterOrderList.DataKeyNames = new string[] { "ID" };
                    gvMinuterOrderList.DataBind();
                }
                else
                {
                    gvMinuterOrderList.DataBind();
                }
            }
            else
            {
                gvMinuterOrderList.DataBind();
            }
        }
    }
コード例 #2
0
ファイル: OrderDao.cs プロジェクト: server-llwell/o3o-s4p-n3w
        /// <summary>
        /// 我的订单列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public OrderListInfo GetOrderList(string userId)
        {
            OrderListInfo orderListInfo = new OrderListInfo();


            StringBuilder builder1 = new StringBuilder();

            builder1.AppendFormat(OrderListSql.SELECT_ORDERLIST_BY_USERID, userId);
            string    sql1 = builder1.ToString();
            DataTable dt1  = DatabaseOperationWeb.ExecuteSelectDS(sql1, "T1").Tables[0];

            if (dt1.Rows.Count > 0)
            {
                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    OrderListMsg orderListMsg = new OrderListMsg();

                    StringBuilder builder = new StringBuilder();
                    builder.AppendFormat(OrderListMsgSql.SELECT_ORDER_BY_USERID, userId, dt1.Rows[i]["ORDER_CODE"].ToString());
                    string    sql = builder.ToString();
                    DataTable dt  = DatabaseOperationWeb.ExecuteSelectDS(sql, "T").Tables[0];

                    if (dt.Rows[0]["ORDER_TYPE"].ToString() == "1")
                    {
                        orderListMsg.ordertitle = dt.Rows[0]["SHOP_NAME"].ToString() + "-O2O订单";
                    }
                    else
                    {
                        orderListMsg.ordertitle = dt.Rows[0]["SHOP_NAME"].ToString() + "-零售订单";
                    }

                    orderListMsg.allprice = "¥" + dt.Rows[0]["ORDER_TOTAL"].ToString();

                    if (dt.Rows[0]["FREIGHT"].ToString() != "" && dt.Rows[0]["FREIGHT"].ToString() != null)
                    {
                        orderListMsg.freight = "¥" + dt.Rows[0]["FREIGHT"].ToString();
                    }
                    else
                    {
                        orderListMsg.freight = "¥0.00";
                    }
                    orderListMsg.ordercode = dt.Rows[0]["ORDER_CODE"].ToString();
                    foreach (DataRow dr in dt.Rows)
                    {
                        OrderGoodsMsg orderGoodsMsg = new OrderGoodsMsg();
                        orderGoodsMsg.goodsName  = dr["GOODSNAME"].ToString();
                        orderGoodsMsg.goodsImg   = dr["GOODS_IMG"].ToString();
                        orderGoodsMsg.goodsPrice = "¥" + dr["SKUUNITPRICE"].ToString();
                        orderGoodsMsg.num        = dr["QUANTITY"].ToString();
                        orderListMsg.orderGoods.Add(orderGoodsMsg);
                        orderListMsg.allnum += Convert.ToInt16(dr["QUANTITY"].ToString());
                    }
                    switch (dt.Rows[0]["STATUS"].ToString())
                    {
                    case "0":
                        orderListMsg.state = "待付款";
                        orderListInfo.orderlistDpay.Add(orderListMsg);
                        break;

                    case "1":
                        orderListMsg.state = "已付款";
                        orderListInfo.orderlistPayed.Add(orderListMsg);
                        break;

                    case "3":
                        orderListMsg.state = "已发货";
                        orderListInfo.orderlistDeliver.Add(orderListMsg);
                        break;

                    case "4":
                        orderListMsg.state = "已完成";
                        orderListInfo.orderlistOver.Add(orderListMsg);
                        break;
                    }
                }
            }

            return(orderListInfo);
        }
コード例 #3
0
ファイル: Orders.cs プロジェクト: imbkj/Yannyo_SQT_ERP_V1.0-
 public static void UpdateOrderListInfo(OrderListInfo model)
 {
     DatabaseProvider.GetInstance().UpdateOrderListInfo(model);
 }
コード例 #4
0
ファイル: Orders.cs プロジェクト: imbkj/Yannyo_SQT_ERP_V1.0-
 public static int AddOrderListInfo(OrderListInfo model)
 {
     return(DatabaseProvider.GetInstance().AddOrderListInfo(model));
 }