protected void GetMember(string memberID) { string strSQL = "select * from T_Member_Info where memberid='" + memberID + "';"; DataSet ds = adoHelper.ExecuteSqlDataset(strSQL); if (ds != null && ds.Tables.Count > 0) { lbMemberId.Text = ds.Tables[0].Rows[0]["MemberId"].ToString(); lbMemberName.Text = ds.Tables[0].Rows[0]["MemberName"].ToString(); lbTrueName.Text = ds.Tables[0].Rows[0]["TrueName"].ToString(); lbEmail.Text = ds.Tables[0].Rows[0]["Email"].ToString(); lbTel.Text = ds.Tables[0].Rows[0]["Mobile"].ToString(); lbQQ.Text = ds.Tables[0].Rows[0]["QQ"].ToString(); lbSex.Text = ds.Tables[0].Rows[0]["Sex"].ToString(); lbAddress.Text = ds.Tables[0].Rows[0]["AddressCode"].ToString() + " " + ds.Tables[0].Rows[0]["AddressDetail"].ToString() + " " + ds.Tables[0].Rows[0]["PostCode"].ToString(); lbBirthDay.Text = ds.Tables[0].Rows[0]["BirthDay"].ToString().Replace("0:00:00", ""); lbRegisterTime.Text = ds.Tables[0].Rows[0]["RegisterTiem"].ToString(); lbLastLoginTime.Text = ds.Tables[0].Rows[0]["LastLoginTime"].ToString(); lbHeadImg.Text = "<img src='" + ds.Tables[0].Rows[0]["HeadImg"].ToString() + "' width='100px' height='100px'/>"; lbIsUse.Text = ds.Tables[0].Rows[0]["IsUse"].ToString() == "1" ? "<span style='color:Green'>启用</span>" : "<span style='color:Red'>禁用</span>"; //kxm@20160610 lbPersonIDCode.Text = ds.Tables[0].Rows[0]["PersonIDCode"].ToString(); ltPersonIDCodePhoto.Text = ListPics2(memberID); lbSpecialty.Text = ds.Tables[0].Rows[0]["Specialty"].ToString(); lbSkill.Text = ds.Tables[0].Rows[0]["Skill"].ToString(); lbSelfIntroduction.Text = ds.Tables[0].Rows[0]["SelfIntroduction"].ToString(); ltPics.Text = ListPics(memberID); //age try { int age = DateTime.Now.Year - DateTime.Parse(ds.Tables[0].Rows[0]["BirthDay"].ToString()).Year; this.lbAge.Text = age.ToString(); } catch { this.lbAge.Text = "0"; } //money object objMoney = adoHelper.ExecuteSqlScalar("select isnull(account_money,0) from T_Moneybag_AccountInfo where member_id='" + memberID + "'"); this.lbMoney.Text = objMoney == null ? "0.00" : objMoney.ToString(); this.div_money.InnerHtml = ListMoney(memberID); } }
/// <summary> /// 分享获得佣金 /// </summary> /// <param name="orderId"></param> /// <returns></returns> public static int AddShareMember(string orderId) { StarTech.DBUtility.AdoHelper adoHelper = StarTech.DBUtility.AdoHelper.CreateHelper("DB_Instance"); DataTable dtOrder = adoHelper.ExecuteSqlDataset("select * from T_Order_Info where isPay=1 and orderId='" + orderId + "'").Tables[0]; if (dtOrder.Rows.Count > 0) { double money = double.Parse(dtOrder.Rows[0]["OrderAllMoney"].ToString()); string orderMemberId = dtOrder.Rows[0]["MemberId"].ToString(); DataTable dtShareMember = adoHelper.ExecuteSqlDataset("select * from V_WXQRCodeShare_Log where newFirendMemberId='" + orderMemberId + "'").Tables[0]; if (money >= 200 && dtShareMember.Rows.Count > 0) { //200奖励50,400奖励100 int CouponValue = 0; if (money < 200) { CouponValue = 1; } else if (money >= 200 && money < 400) { CouponValue = 50; } else if (money >= 400) { CouponValue = 100; } string remarks = "分享给“" + dtShareMember.Rows[0]["newFirendTrueName"].ToString() + "”获得的佣金"; if (adoHelper.ExecuteSqlScalar("select MemberId from T_Member_ShareCash where MemberId='" + dtShareMember.Rows[0]["MemberId"].ToString() + "' and ShareFirendMemberId='" + orderMemberId + "'") == null) { return(AddShareCash(dtShareMember.Rows[0]["MemberId"].ToString(), CouponValue, remarks, orderMemberId, dtShareMember.Rows[0]["newFirendTrueName"].ToString())); } } } return(0); }
protected void Button1_Click(object sender, EventArgs e) { //http://192.168.2.41:2334/ServiceInterface/Goods/OrderList.ashx?flag=create&memberid=1&key=35f864bb-2b02-4992-a903-6cbc7d7568c8&marketId=1000000001 string strSQL = "select memberId from T_Member_Info where tel='" + txtTel.Text + "';"; string member = txtMemberId.Text; if (txtMemberId.Text == "" && txtTel.Text != "") { StarTech.DBUtility.AdoHelper adoHelper = StarTech.DBUtility.AdoHelper.CreateHelper("DB_Instance"); DataSet ds = adoHelper.ExecuteSqlDataset(strSQL); member = ds.Tables[0].Rows[0][0].ToString(); } string strUrl = "http://elife2.hzst.com/ServiceInterface/Goods/OrderList.ashx?flag=create&memberid=" + member + "&key=35f864bb-2b02-4992-a903-6cbc7d7568c8&marketId=" + txtMarketId.Text + ""; Response.Redirect(strUrl); }