/// <summary> /// 提交事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click(object sender, EventArgs e) { string Phone= this.txtPhone.Text; if (!System.Text.RegularExpressions.Regex.IsMatch(Phone, @"^0?(13|15|17|18|14)[0-9]{9}$")) { Common.MessageBox.ShowAndRedirect(this, "请输入正确的手机号", ""); return; } if (string.IsNullOrEmpty(this.txtName.Text) || string.IsNullOrEmpty(this.txtPassword.Text) || string.IsNullOrEmpty(this.DDLUserType.SelectedValue)) { Common.MessageBox.ShowAndRedirect(this, "信息填写不完整", ""); return; } DTO.Business.User user = new DTO.Business.User(); if (Request.Params["ID"] != null) { user.UserID = Convert.ToInt32(Request.Params["ID"]); user = Business.Business.UserBLL.Get(user); } user.Phone = this.txtPhone.Text; user.PWD = this.txtPassword.Text; user.UserType =int.Parse( this.DDLUserType.SelectedValue); user.Name = this.txtName.Text; user.UserType = 1; //修改 if (Request.Params["ID"] != null) Business.Business.UserBLL.Save(user); else { user.RegisterTime = System.DateTime.Now; Business.Business.UserBLL.Add(user); } Common.MessageBox.ShowAndRedirect(this, "编辑成功", "CustomList.aspx"); }
protected void Page_Load(object sender, EventArgs e) { Log.Info(this.GetType().ToString(), "page load"); if (!IsPostBack) { JsApiPay jsApiPay = new JsApiPay(this); DTO.Business.View_OrderList view_order = GetOrderMess(Request.QueryString["orderid"]); DTO.Business.User user = new DTO.Business.User(); user.UserID = view_order.UserID; user = Business.Business.UserBLL.Get(user); jsApiPay.openid = user.Openid; jsApiPay.total_fee = view_order.OrderPrice * 100;//元转为分 //jsApiPay.total_fee = view_order.OrderPrice; jsApiPay.orderid = view_order.OrderID.ToString(); jsApiPay.good_name = view_order.RepairName; //JSAPI支付预处理 try { WxPayData unifiedOrderResult = jsApiPay.GetUnifiedOrderResult(); wxJsApiParam = jsApiPay.GetJsApiParameters();//获取H5调起JS API参数 Log.Debug(this.GetType().ToString(), "wxJsApiParam : " + wxJsApiParam); //在页面上显示订单信息 //Response.Write("<span style='color:#00CD00;font-size:20px'>订单详情:</span><br/>"); //Response.Write("<span style='color:#00CD00;font-size:20px'>" + unifiedOrderResult.ToPrintStr() + "</span>"); } catch (Exception ex) { Response.Write("<span style='color:#FF0000;font-size:20px'>" + "下单失败,请返回重试" + "</span>"); //submit.Visible = false; } } }
/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtnRemoveCommand(object sender, CommandEventArgs e) { DTO.Business.User user = new DTO.Business.User(); user.UserID = Convert.ToInt32(e.CommandName); Business.Business.UserBLL.Remove(user); Common.MessageBox.Show(this, "删除成功"); GetList(); }
/// <summary> /// 获取父对象 /// </summary> protected void GetDTO() { DTO.Business.User user = new DTO.Business.User(); user.UserID = Convert.ToInt32(Request.Params["ID"]); user = Business.Business.UserBLL.Get(user); customUserID = user.UserID; this.txtPhone.Text = user.Phone; this.txtName.Text = user.Name; this.txtPassword.Text = user.PWD; this.txtRegisterTime.Text = user.RegisterTime.ToString(); }
/// <summary> /// 通过 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtnSubCommand(object sender, CommandEventArgs e) { DTO.Business.User user = new DTO.Business.User(); user.UserID = Convert.ToInt32(e.CommandName); user = Business.Business.UserBLL.Get(user); user.UserType = 3; Business.Business.UserBLL.Save(user); Business.Business.OrderBLL.PostMessageApply(user.Openid); Common.MessageBox.Show(this, "审核成功"); GetList(); }