private void ShowInfo(string _order_no) { PanelOrder.Visible = true; ax_orders model = new ax_orders(); model.GetModel(_order_no); contact_address.Text = model.address; contact_name.Text = model.user_name; contact_tel.Text = model.user_tel; message.Text = model.message; remark.Text = model.remark; if (Convert.ToInt32(model.depot_category_id) != 0) { //depot_category.Text = new ax_depot_category().GetTitle(Convert.ToInt32(model.depot_category_id)); depot_category.Text = "<font color=red>已发货</font>"; } else { depot_category.Text = "<font color=red>未发货</font>"; } //绑定商品列表 ax_order_goods bll = new ax_order_goods(); string sql = " order_id =" + model.id; DataTable dt = bll.GetList(sql).Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); }
// 单个删除 protected void lbtnDelCa_Click(object sender, EventArgs e) { //检查权限 if (ChkAdminLevel(this.Page, 27, "Delete")) { // 当前点击的按钮 LinkButton lb = (LinkButton)sender; int caId = int.Parse(lb.CommandArgument); ax_depot_category bll = new ax_depot_category(); bll.GetModel(caId); string title = bll.title; ax_orders bllpp = new ax_orders(); if (!bllpp.ExistsBM(caId))//查找是否存在该仓库已经有发货记录 { bll.Delete(caId); AddAdminLog("删除", "删除发货仓库:" + title + ""); //记录日志 JscriptMsg(this.Page, " 成功删除发货仓库:" + title + "", Utils.CombUrlTxt("depot_category_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success"); } else { JscriptMsg(this.Page, "该仓库已经有发货记录,不能删除!", "", "Error"); return; } } }
private void RptBind(string _strWhere, string _orderby) { this.page = AXRequest.GetQueryInt("page", 1); if (this.depot_category_id > 0) { this.ddldepot_category_id.SelectedValue = this.depot_category_id.ToString(); } if (this.depot_id > 0) { this.ddldepot_id.SelectedValue = this.depot_id.ToString(); } if (this.status > 0) { this.ddlStatus.SelectedValue = this.status.ToString(); } txtNote_no.Text = this.note_no; txtstart_time.Value = this.start_time; txtstop_time.Value = this.stop_time; ax_orders bll = new ax_orders(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("order_list.aspx", "depot_category_id={0}&depot_id={1}&status={2}&start_time={3}&stop_time={4}¬e_no={5}&page={6}", this.depot_category_id.ToString(), this.depot_id.ToString(), this.status.ToString(), this.txtstart_time.Value, this.txtstop_time.Value, txtNote_no.Text, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void ShowInfo(string _order_no) { ax_orders model = new ax_orders(); model.GetModel(_order_no); ax_product_category bll2 = new ax_product_category(); DataTable dt = bll2.GetList("1=1").Tables[0]; ddlExpressId.Items.Clear(); ddlExpressId.Items.Add(new ListItem("请选择快递公司", "")); foreach (DataRow dr in dt.Rows) { ddlExpressId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString())); } ax_depot_category bll3 = new ax_depot_category(); DataTable dt3 = bll3.GetList("1=1").Tables[0]; ddlDepotId.Items.Clear(); ddlDepotId.Items.Add(new ListItem("请选择发货仓库", "")); foreach (DataRow dr in dt3.Rows) { ddlDepotId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString())); } txtExpressNo.Text = model.product_no; ddlDepotId.SelectedValue = model.depot_category_id.ToString(); ddlExpressId.SelectedValue = model.product_category_id.ToString(); }
protected void Bind() { ax_orders bll = new ax_orders(); this.rptList.DataSource = bll.GetList(13, " status=1", " add_time desc"); this.rptList.DataBind(); }
//绑定记录 public void binddr() { ax_orders bll = new ax_orders(); string sqlstr = "id>0 "; sqlstr = sqlstr + CombSqlTxt(this.depot_category_id, this.depot_id, this.status, this.note_no, this.start_time, this.stop_time); sqlstr = sqlstr + " order by add_time desc,id desc"; DataView dv = bll.GetList(sqlstr).Tables[0].DefaultView; repCategory.DataSource = dv; repCategory.DataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { ax_orders model = new ax_orders(); if (!model.Exists(orderno.Value.Trim(), recvmobile.Value.Trim())) { this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>对不起!没有找到您输入的信息的相关订单记录,请检查是否输入有误!</div>\").time(5000);</script>"); } else { ShowInfo(orderno.Value.Trim()); } }
protected void btnSubmit_Click(object sender, EventArgs e) { //检查商品 IList <cart_items> iList = ShopCart.GetList(); //保存订单======================================================================= ax_orders model = new ax_orders(); model.order_no = Utils.GetOrderNumber(); //订单号 model.user_name = user_name.Value.Trim(); model.user_tel = user_tel.Value.Trim(); string province = AXRequest.GetFormString("province"); string city = AXRequest.GetFormString("city"); string area = AXRequest.GetFormString("area"); model.area = province + "," + city + "," + area; model.address = address.Value.Trim(); model.message = message.Value.Trim(); string goods_title = ""; //商品详细列表 List <ax_order_goods> gls = new List <ax_order_goods>(); foreach (cart_items item in iList) { ax_ticket myt = new ax_ticket(); myt.GetModel(item.id); goods_title = new ax_article().GetTitle(Convert.ToInt32(myt.pid)); gls.Add(new ax_order_goods { ticket_id = item.id, goods_id = myt.pid, goods_title = goods_title, ticket_no = item.ticket_no }); } model.order_goods = gls; if (model.Add() == 0) { this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>订单保存过程中发生错误,请重新提交!</div>\").time(5000);</script>"); return; } #region 发送短信并入库 ax_syssetting mySysSetting = new ax_syssetting(); mySysSetting.GetModel(1); if (mySysSetting.MsgNum > 0 && mySysSetting.MsgOn == 1) { string user = mySysSetting.MsgName; string pass = FormsAuthentication.HashPasswordForStoringInConfigFile(FormsAuthentication.HashPasswordForStoringInConfigFile(mySysSetting.MsgPwd, "MD5").ToLower(), "MD5").ToLower(); string mobile = user_tel.Value.Trim(); string content = "尊敬的" + user_name.Value.Trim() + "客户,您的" + goods_title + "订单号:" + model.order_no + "提交成功!我们会尽快给您安排发货,请注意查收!发货信息将会发送到您的手机上!请您留意!【AH水产】"; string contentEncode = HttpUtility.UrlEncode(content, System.Text.Encoding.GetEncoding("utf-8")); string sms_url = " http://210.5.152.50:7100/submit?userName="******"&body={'content':'" + contentEncode + "','passWord':'******','expId':'','phones':['" + mobile + "'],'productId':'21','sendTime':''}&isEncrypt=0"; SMS mysms = new SMS(); mysms.GetHtmlFromUrl(sms_url); ax_msglist my = new ax_msglist(); my.CardNum = model.order_no; my.MemberName = user_name.Value.Trim(); my.MemberTel = mobile; my.Message = content; my.SendTime = System.DateTime.Now; my.OP = "提货短信"; my.Add(); mySysSetting.MsgNum = mySysSetting.MsgNum - 1; mySysSetting.UpdateMsgNum(); } #endregion //清空购物车 ShopCart.Clear("0"); PanelOrder.Visible = false; this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>恭喜您!订单提交成功!我们会尽快给您安排发货,请注意查收!发货信息将会发送到您的手机上!请您留意!</div>\").time(5000);</script>"); }