public void showDetailInfo(string orderId) { var orderBLL = new LVWEIBA.BLL.order_list(); var order = orderBLL.GetModel(orderId); string sql = ""; if (!string.IsNullOrEmpty(orderId)) { sql += " and order_id='" + orderId + "'"; } var bll = new LVWEIBA.DAL.order_Mx(); DataTable list = bll.GetDataMixedWithSpot(" 1=1 " + sql).Tables[0]; foreach (DataRow dr in list.Rows) { //状态 orderStateDB = order.order_zt; orderState = DealState(order.order_zt); //商品Id if (dr["productNum"] != null) { goodId = dr["productNum"].ToString(); } //sDate if (dr["BeginTime"] != null) { startDate = Convert.ToDateTime(dr["BeginTime"]).ToString("yyyy年MM月dd号"); } else { endDate = Convert.ToDateTime(dr["EndTime"]).ToString("yyyy年MM月dd号"); } if (orderStateDB != "DZF") { //线路负责人 if (dr["Master"] != null) { ticketMaster = dr["Master"].ToString() + " " + dr["MasterTel"].ToString(); } } //票数 ticketCount = dr["ProCount"].ToString(); marketPrice = dr["market_price"].ToString(); transferPrice = dr["Transaction_price"].ToString(); } }
public void showDetailInfo(string orderId) { var orderBLL = new LVWEIBA.BLL.order_list(); var order = orderBLL.GetModel(orderId); string sql = ""; if (!string.IsNullOrEmpty(orderId)) { sql += " and order_id='" + orderId + "'"; } var bll = new LVWEIBA.DAL.order_Mx(); DataTable list = bll.GetList(" 1=1 " + sql).Tables[0]; foreach (DataRow dr in list.Rows) { //状态 orderStateDB = order.order_zt; orderState = DealState(order.order_zt); //商品Id if (dr["productNum"] != null) { goodId = dr["productNum"].ToString(); } //sDate if (dr["Sdate"] != null) { startDate = dr["Sdate"].ToString(); } if (orderStateDB != "DZF") { //供应商 if (dr["Provider"] != null) { provider = dr["Provider"].ToString(); } //线路负责人 if (dr["LineMaster"] != null) { lineMaster = dr["LineMaster"].ToString() + " " + dr["LineMasterMoble"].ToString(); } //导游 if (dr["Leader"] != null) { leader = dr["Leader"].ToString() + " " + dr["LeaderMobil"].ToString(); } //集合时间 if (dr["JIheTime"] != null) { jeHeTime = dr["JIheTime"].ToString(); } if (dr["JiHePlace"] != null) { jeHePlace = dr["JiHePlace"].ToString(); } } //人数 member = dr["adultCount"].ToString() + "成人" + dr["puppyCount"] + "儿童"; marketPrice = dr["market_price"].ToString(); transferPrice = dr["Transaction_price"].ToString(); } }
protected void btn_submit_Click(object sender, EventArgs e) { decimal order_Price = int.Parse(hid_price_yh.Value); string order_id = DateTime.Now.ToString("yyyyMMdd") + "0000" + "MP" + BaseClass.Common.Common.getSuijiString(2); //明细 LVWEIBA.Model.order_Mx modelMx = null; LVWEIBA.BLL.order_Mx bllMx = new LVWEIBA.BLL.order_Mx(); modelMx = new LVWEIBA.Model.order_Mx(); modelMx.order_id = order_id; modelMx.productNum = hid_ticket_id.Value; modelMx.market_price = int.Parse(hid_price_sc.Value); //市场价 modelMx.Transaction_price = int.Parse(hid_price_yh.Value); //优惠价 modelMx.Transfer_price = int.Parse(hid_price_jj.Value); //交接价 modelMx.ProCount = int.Parse(this.hid_count.Value); //商品类型(电子票) modelMx.ProType = "DZP"; //成人和小孩数量(门票默认为0) modelMx.adultCount = 0; modelMx.puppyCount = 0; bllMx.Add(modelMx); //订单 LVWEIBA.Model.order_list model = new LVWEIBA.Model.order_list(); model.order_id = order_id; model.user_id = member; model.order_sj = DateTime.Now; model.order_zt = "DZF";//待支付 model.order_Price = order_Price; model.bz = HiddenFieldBZ.Value; LVWEIBA.BLL.order_list bll = new LVWEIBA.BLL.order_list(); if (bll.Add(model)) { //给订单添加旅客信息 System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form); string[] arrhotel = nc.GetValues("hotel"); LVWEIBA.BLL.MemberHotelMx bllhotel = new LVWEIBA.BLL.MemberHotelMx(); if (arrhotel != null && arrhotel.Length > 0) { for (int i = 0; i < arrhotel.Length; i++) { if (arrhotel[i] == "") { break; } MemberHotelMx m = new MemberHotelMx(); m.Member = member; m.OrderID = order_id; m.Hotel = int.Parse(arrhotel[i]); m.Sj = DateTime.Now; bllhotel.Add(m); } } else { Jscript.NorefLocation(this.Page, "请选择联系用户!", "showTicket.aspx"); } //1代表门票0代表尾单 Response.Redirect("indent_pay.aspx?ddbm=" + order_id + "&lineid=" + ViewState["ticketId"] + "&type='mp'"); } }