Esempio n. 1
0
 public bool UpdateOrderInfo(CDMAS cdmas)
 {
     try
     {
         return(orderinfobll.UpdateOrderInfo(cdmas));
     }
     catch (Exception ex)
     {
         throw new ApplicationException(ex.Message);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 商家更新订单信息(运费、运单号、物流公司)
 /// </summary>
 /// <param name="expressCompany">物流公司</param>
 /// <param name="expressCode">物流单号</param>
 /// <param name="freight">运费</param>
 /// <returns></returns>
 public JsonResult UpdateOrderInfo(string orderId, string expressCompany, string expressCode)
 {
     try
     {
         bool result = bll.UpdateOrderInfo(orderId, expressCompany, expressCode);
         if (result)
         {
             return(Json(new { result = true, msg = "更新成功!" }));
         }
         else
         {
             return(Json(new { result = true, msg = "更新失败,请重试或联系管理员。" }));
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
         return(Json(new { result = false, msg = "更新失败,请重试或联系管理员。" }));
     }
 }
Esempio n. 3
0
        private void btnAccounts_Click(object sender, EventArgs e)
        {
            //更新餐桌状态
            DeskInfoBLL dbll     = new DeskInfoBLL();
            bool        dkResult = dbll.UpdateDeskInfoStateByDeskId(Convert.ToInt32(labdkId.Text), 0);
            //订单状态改变
            OrderInfoBLL ordlbll = new OrderInfoBLL();
            OrderInfo    order   = new OrderInfo();

            order.EndTime    = System.DateTime.Now;
            order.OrderMoney = Convert.ToDouble(lblMoney.Text);
            order.OrderState = 2;
            order.OrderId    = Convert.ToInt32(labOrderId.Text);
            if (cmbMember.SelectedIndex != 0)//是会员
            {
                MemberInfo mem = (MemberInfo)cmbMember.SelectedItem;
                order.OrderMemberId = mem.MemberId;
                order.DisCount      = mem.MemDiscount;//状态

                //根据会员的id更新会员的金额
                double        money  = Convert.ToDouble(labyuMoney.Text) - Convert.ToDouble(lblMoney.Text);
                MemberInfoBLL membll = new MemberInfoBLL();
                membll.UpdateMoneyByMemId(mem.MemberId, money);
            }
            bool ordResult = ordlbll.UpdateOrderInfo(order);
            //改变订单对应订单和菜单的中间表中的菜的状态
            R_Order_ProductBLL ropbll = new R_Order_ProductBLL();
            bool ropResult            = ropbll.UpdateR_Order_ProductByOrderId(Convert.ToInt32(labOrderId.Text));

            if (dkResult && ordResult && ropResult)
            {
                md.MsgDivShow("结账成功", 1, Bind);
            }
            else
            {
                md.MsgDivShow("结账失败了", 1);
            }
        }