private void Order_delete() { int id = Convert.ToInt32(Request["OrderId"]); ZwBLL.MyOrderBLL myOrder = new MyOrderBLL(); Response.Write(myOrder.Delete(id)); Response.End(); }
private void OrderList_Delete() { MyOrderBLL orderBLL = new MyOrderBLL(); MyOrderEntity orderEntity = orderBLL.list(int.Parse(Request["OrderId"])); orderEntity.OrderStatus = 5; Response.Write(orderBLL.Update(orderEntity)); Response.End(); }
private void Order_update() { int id = Convert.ToInt32(Request["OrderId"]); ZwBLL.MyOrderBLL myOrder = new MyOrderBLL(); ZwEntity.MyOrderEntity entitymyOrder = myOrder.list(id); if (entitymyOrder.OrderStatus < 4) { entitymyOrder.OrderStatus = entitymyOrder.OrderStatus + 1; } Response.Write(myOrder.Update(entitymyOrder)); Response.End(); }
private void Order_list() { MyOrderBLL orderBLL = new MyOrderBLL(); string date = ""; if (!string.IsNullOrWhiteSpace(Request["startdate"]) || !string.IsNullOrWhiteSpace(Request["enddate"])) { date = Request["startdate"] + "," + Request["enddate"]; } MyOrderEntity orderEntity = new MyOrderEntity(); int count = 0; orderEntity.OrderStatus = Convert.ToInt32(Request["OrderStatus"]); List <MyOrderEntity> list = orderBLL.list(date, orderEntity, int.Parse(Request["PageInt"]), int.Parse(Request["Pagesize"]), out count); Response.Write(count + "||" + MyJson.ToJsJson(list)); Response.End(); }
protected void lbtOrderSubmit_Click(object sender, EventArgs e) { MemberEntity member = (MemberEntity)Session["usr"]; BookCartBLL cartBLL = new BookCartBLL(); List <BookCartEntity> list = cartBLL.list(member.MemberId); MyOrderEntity orderEntity = new MyOrderEntity(); MyOrderBLL orderBLL = new MyOrderBLL(); OrderDetailEntity orderDetailEntity = new OrderDetailEntity(); orderEntity.OrderCode = DateTime.Now.ToString("yyyyMMddhhmmss") + member.MemberId; orderEntity.MemberId = member.MemberId; orderEntity.OrderPeople = txtMemberName.Text; orderEntity.OrderPhone = txtPhone.Text; orderEntity.OrderAddress = txtAddress.Text; decimal counpic = 0; foreach (BookCartEntity item in list) { if (item.IsSelect == 1) { counpic += (item.BookCount * (item.BookInfo.BookPrice * item.BookInfo.BookDisCount)); } } orderEntity.OrderAllMoney = counpic; orderEntity.OrderStatus = 1; orderBLL.Add(orderEntity); orderEntity = orderBLL.list(orderEntity.OrderCode); OrderDetailBLL orderDetailBLL = new OrderDetailBLL(); foreach (BookCartEntity item in list) { if (item.IsSelect == 1) { orderDetailEntity.OrderId = orderEntity.OrderId; orderDetailEntity.BookId = item.BookId; orderDetailEntity.BookSalePrice = (item.BookInfo.BookPrice * item.BookInfo.BookDisCount); orderDetailEntity.BookSaleCount = item.BookCount; orderDetailBLL.Add(orderDetailEntity); cartBLL.Delete(item.CartId); } } Response.Redirect("~/Member/OrderList.aspx"); }