private void LoadData() { OrdersBiz biz = new OrdersBiz(); OrderInfo model = biz.GetOrderInfo(ViewState["OrderId"].ToString()); lOrderId.Text = model.OrderId; lCreateTime.Text = model.CreateDate.ToString() ; lState.Text = OrdersBiz.GetStateString(model.State); Address.Text = model.Address; MemberShipManager manager = new MemberShipManager(); User user = manager.GetUser(new Guid(model.UserId)); lUserName.Text = user.UserName; Contactor.Text = model.Contactor; tel.Text = model.Tel; email.Text = model.Email; GroupName.Text = user.GroupName; DataTable dt = biz.GetOrders_DetailList(-1, ViewState["OrderId"].ToString(), string.Empty, string.Empty); gvOrders_Detail.DataSource = dt; gvOrders_Detail.DataBind(); }
/// <summary> /// 更改订单状态 /// </summary> /// <param name="state"></param> private int ChangeState(string orderId, int state) { OrdersBiz biz = new OrdersBiz(); OrderInfo model = biz.GetOrderInfo(orderId); if (model == null) { return 0; } model.Operator = CurrentUser.UserId.ToString(); model.State = state; return biz.UpdateOrders(model); }