/// <summary> /// 找回秘密时,给用户发送验证码 /// </summary> /// <returns></returns> public string GetSms() { string ret = BaseController.Json(-1, "抱歉,当前用户设置的手机号码可能有误或网络繁忙,你可以重新发送短信!"); string MobilePhone = Request.Form["phone"]; //判断用户的手机号码是否已经注册过 if (IsUserName(MobilePhone)) { bool ok = false; string smsCaptcha = Common.CheckCode.GenerateNumber(); Session["Captcha"] = smsCaptcha; string url = "http://" + Request.Url.Host + "/include/ajax.ashx?act=updateMobilePhone&v=" + Guid.NewGuid().ToString(); var sms = new SOSOshop.MSG.Sms(); SOSOshop.BLL.Db db = new SOSOshop.BLL.Db(); object phone = db.ExecuteScalar("select OfficePhone from yxs_administrators where adminid=(select Editer from memberaccount a inner join memberinfo b on a.UID=b.UID where MobilePhone='" + MobilePhone + "')"); if (phone == null || phone.ToString().Trim() == "") { phone = "028-66321993"; } string SmsMsg = "您的账户安全验证码为:" + smsCaptcha + ",请在页面填写。如非本人操作,请致电您的专属采购顾问" + phone; string from = "系统"; string to = MobilePhone; ok = SOSOshop.BLL.Sms.SendAndSaveDataBase(MobilePhone, SmsMsg, from, to); if (ok) { ret = BaseController.Json(0, "ok"); } } return(ret); }
public void init() { int Product_ID = int.Parse(Request.QueryString["id"]); Label1.Text = db.ExecuteScalar("SELECT Product_Name FROM dbo.Product WHERE Product_ID=" + Product_ID) as string; tablist.DataSource = bll.GetList(Product_ID); tablist.DataBind(); DropDownList1.DataSource = SOSOshop.BLL.Report.Qualification.GetQualList(); DropDownList1.DataTextField = "name"; DropDownList1.DataValueField = "id"; DropDownList1.DataBind(); }
public void ProcessRequest(HttpContext context) { int UID = _101shop.v3.Controllers.BaseController.GetUserId();//账户ID if (UID > 0) { //调用ERP:wldwwdzl往来单位文档资料的图片 string wldwwdid = context.Request.QueryString["wldwwdid"]; if (!string.IsNullOrEmpty(wldwwdid)) { SOSOshop.BLL.Db bll = new SOSOshop.BLL.Db(); object Data = bll.ExecuteScalar("SELECT wldwwd_image FROM wldwwdzl WHERE wldwwdid='" + wldwwdid.Replace("'", "") + "'"); if (Data != null) { byte[] imageData = (byte[])Data; //写入图片信息到输出流中 context.Response.OutputStream.Write(imageData, 78, imageData.Length - 78); } } } }
public void init() { int Product_ID = int.Parse(Request.QueryString["id"]); Label1.Text = db.ExecuteScalar("SELECT Product_Name FROM dbo.Product WHERE Product_ID=" + Product_ID) as string; //string sql = string.Format("SELECT pihao FROM dbo.Product_Centre WHERE product_id={0} UNION ALL SELECT pihao FROM phspkc WHERE spid=(SELECT spid FROM dbo.Product WHERE Product_ID={0})", Product_ID); //foreach (System.Data.DataRow item in db.ExecuteTable(sql).Rows) //{ // if (item["pihao"].ToString().Trim() != "") // { // if (!bll.Exist(Product_ID, item["pihao"].ToString().Trim())) // { // bll.created = DateTime.Now; // bll.dowCount = 0; // bll.file = ""; // bll.pihao = item["pihao"].ToString().Trim(); // bll.Products_Id = Product_ID; // bll.Insert(); // } // } //} tablist.DataSource = bll.GetList(Product_ID); tablist.DataBind(); }