protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { StringBuilder sb = new StringBuilder(); nID = Request.QueryString["uid"].ToString(); DataTable dt = tj.GetFenXiangJL(nID); foreach (DataRow dr in dt.Rows) { string pri = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["price"].ToString())); string nickname = StringDelHTML.Centers(dr["nickname"].ToString(), 6); //(" + dr["part"].ToString() + "%) sb.AppendLine("<dd>" + nickname + "(" + pri + ")<span>" + dr["CreateTime"].ToString() + "</span></dd>"); } if (string.IsNullOrEmpty(sb.ToString())) { sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>"); } liststr = sb.ToString(); } else { Response.Redirect("errors.html"); } }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbSex = (Label)gridField.Rows[i].FindControl("lbSex"); if (lbSex.Text == "1") { lbSex.Text = "男"; } else if (lbSex.Text == "2") { lbSex.Text = "女"; } else { lbSex.Text = "未确定"; } Label lbAllMoney = (Label)gridField.Rows[i].FindControl("lbAllMoney"); lbAllMoney.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbAllMoney.Text)); //Label lbisJXS = (Label)gridField.Rows[i].FindControl("lbisJXS"); //if (lbisJXS.Text.ToLower() == "true") //{ // lbisJXS.Text = "是"; //} //else //{ // lbisJXS.Text = "否"; //} } }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbSex = (Label)gridField.Rows[i].FindControl("lbSex"); lbSex.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbSex.Text)); Label lbPhone = (Label)gridField.Rows[i].FindControl("lbPhone"); lbPhone.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbPhone.Text)); Label lbMemberPass = (Label)gridField.Rows[i].FindControl("lbMemberPass"); lbMemberPass.Text = (Convert.ToDouble(lbMemberPass.Text)) * 100 + "%"; //Label lbisJXS = (Label)gridField.Rows[i].FindControl("lbisJXS"); //if (lbisJXS.Text.ToLower() == "true") //{ // lbisJXS.Text = "是"; //} //else //{ // lbisJXS.Text = "否"; //} } }
private void MoneyRequest() { string sql = "select AllPrice from MoneyOrder where nID=" + nID; oprice = her.ExecuteScalar(sql) == DBNull.Value ? 0 : Convert.ToInt32(her.ExecuteScalar(sql).ToString()); allprice = Price = StringDelHTML.PriceToStringLow(oprice); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { StringBuilder sb = new StringBuilder(); nID = Request.QueryString["uid"].ToString(); uid = nID; DataTable dt = tj.GetMoneyOrderList(nID); foreach (DataRow dr in dt.Rows) { string pri = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["AllPrice"])); if (dr["OrderState"].ToString().ToLower().Equals("true")) { sb.AppendLine("<dd>完成(" + pri + ")<span>" + dr["UpdateTime"].ToString() + "</span></dd>"); } else { sb.AppendLine("<dd>处理中(" + pri + ")<span>" + dr["CreateTime"].ToString() + "</span></dd>"); } } if (string.IsNullOrEmpty(sb.ToString())) { sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>"); } liststr = sb.ToString(); } else { Response.Redirect("errors.html"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { StringBuilder sb = new StringBuilder(); nID = Request.QueryString["uid"].ToString(); //DataTable dt = tj.GetFenXiangJL(nID); string sql = @"select a.OcType,a.CreateTime,a.OrderPrice,b.vName from ML_Order a left join ML_VideoComment b on a.OcID=b.nID where a.OrderUserid=" + nID + " and a.OcType='学习币支付' order by a.CreateTime desc "; DataTable dt = her.ExecuteDataTable(sql); foreach (DataRow dr in dt.Rows) { string pri = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["OrderPrice"].ToString())); sb.AppendLine("<dd>" + dr["vName"].ToString() + "(" + pri + ")<span>" + dr["CreateTime"].ToString() + "</span></dd>"); } if (string.IsNullOrEmpty(sb.ToString())) { sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>"); } liststr = sb.ToString(); } else { Response.Redirect("errors.html"); } }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Image img = gridField.Rows[i].FindControl("img1") as Image; img.ImageUrl = "../../upload_Img/VideoImg/" + img.ImageUrl; Label lbtMemo = gridField.Rows[i].FindControl("lbvMemo") as Label; lbtMemo.Text = StringDelHTML.Centers(StringDelHTML.DelHTML(lbtMemo.Text), 30); Label lbprice = gridField.Rows[i].FindControl("lbprice") as Label; lbprice.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbprice.Text)); Label lballpri = gridField.Rows[i].FindControl("lballpri") as Label; lballpri.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lballpri.Text)); Label lblth = gridField.Rows[i].FindControl("lblth") as Label; if (lblth.Text == "True") { lblth.Text = "是"; } else { lblth.Text = "否"; } } }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbuptime = gridField.Rows[i].FindControl("lbuptime") as Label; Label lbprice = gridField.Rows[i].FindControl("lbprice") as Label; lbprice.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbprice.Text)); Label lblName = gridField.Rows[i].FindControl("lbstate") as Label; Button btnUpdate = gridField.Rows[i].FindControl("btnUpdate") as Button; if (lblName.Text == "False") { lblName.Text = "未处理"; btnUpdate.Visible = true; lbuptime.Text = ""; } else { lblName.Text = "已处理"; btnUpdate.Visible = false; //lbuptime.Text = lbuptime.Text; } } }
public DataTable GetSource(int level) { DataTable dt = new DataTable(); SqlHelper her = new SqlHelper(); string sql = string.Empty; switch (level) { case 3: sql = @"select a.*,b.levelName from ML_Member a left join ML_MemberLevel b on a.fxslevel=b.nID where datediff(day,a.fxsTimeBegin,getdate()-1)>=0 and a.fxslevel=3 or datediff(day,a.fxsTimeEnd,getdate())=0 and a.fxslevel=4 or datediff(day,a.level3Time,getdate())=0 and a.fxslevel=5 order by a.fxsTimeBegin desc"; break; case 4: sql = @"select a.*,b.levelName from ML_Member a left join ML_MemberLevel b on a.fxslevel=b.nID where datediff(day,a.fxsTimeEnd,getdate()-1)>=0 and a.fxslevel=4 or datediff(day,a.level3Time,getdate())=0 and a.fxslevel=5 order by a.fxsTimeBegin desc"; break; case 5: sql = @" select a.*,b.levelName from ML_Member a left join ML_MemberLevel b on a.fxslevel=b.nID where datediff(day,a.level3Time,getdate()-1)>=0 and a.fxslevel=5 order by a.level3Time desc"; break; default: break; } if (!string.IsNullOrEmpty(sql)) { dt = her.ExecuteDataTable(sql); userCount = dt.Rows.Count.ToString(); yingyee = StringDelHTML.PriceToStringLow(tj.AllMoneyToday()); } return(dt); }
private void GetSumFenhong() { string sql = "select isnull( sum(AvgMoney),0) from T_AvgMoneyLastDay"; int allmoney = her.ExecuteScalar(sql) == null ? 0 : Convert.ToInt32(her.ExecuteScalar(sql)); Fenhong = StringDelHTML.PriceToStringLow(allmoney); }
private void tongji(DateTime dt) { DataTable table3 = GetFenhong(dt, 3); if (table3.Rows.Count > 0) { banzhangrenshu = table3.Rows[0]["UserCount"].ToString(); banzhangfenhong = StringDelHTML.PriceToStringLow(Convert.ToInt32(table3.Rows[0]["AvgMoney"])); banzhangAllmoney = StringDelHTML.PriceToStringLow(Convert.ToInt32(table3.Rows[0]["UserCount"]) * Convert.ToInt32(table3.Rows[0]["AvgMoney"])); } DataTable table4 = GetFenhong(dt, 4); if (table4.Rows.Count > 0) { zhurenrenshu = table4.Rows[0]["UserCount"].ToString(); zhurenfenhong = StringDelHTML.PriceToStringLow(Convert.ToInt32(table4.Rows[0]["AvgMoney"])); zhurenAllmoney = StringDelHTML.PriceToStringLow(Convert.ToInt32(table4.Rows[0]["UserCount"]) * Convert.ToInt32(table4.Rows[0]["AvgMoney"])); } DataTable table5 = GetFenhong(dt, 5); if (table5.Rows.Count > 0) { xiaozhangrenshu = table5.Rows[0]["UserCount"].ToString(); xiaozhangfenhong = StringDelHTML.PriceToStringLow(Convert.ToInt32(table5.Rows[0]["AvgMoney"])); xiaozhangAllmoney = StringDelHTML.PriceToStringLow(Convert.ToInt32(table5.Rows[0]["UserCount"]) * Convert.ToInt32(table5.Rows[0]["AvgMoney"])); } }
private string getFreeVideo() { StringBuilder sb = new StringBuilder(); string sql = @"select * from ML_VideoComment where oHide=1 and oFree=1 order by addTime desc ";//where oHide=1 DataTable dt = her.ExecuteDataTable(sql); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { string vname = StringDelHTML.Centers(dr["vName"].ToString(), 6); string price = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["Price"])); sb.AppendLine("<dd><a href='VideoShow.aspx?pid=" + dr["nID"].ToString() + "'>"); sb.AppendLine("<img src='../upload_Img/VideoImg/" + dr["vPic"].ToString() + "' />"); //sb.AppendLine("<h1>¥ " + price + " </h1>"); sb.AppendLine("<p>" + vname + "</p></a></dd>"); } } else { sb.Append("<h1 style='text-align: center'>敬请期待! </h1>"); } return(sb.ToString()); }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbprice = gridField.Rows[i].FindControl("lbprice") as Label; lbprice.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbprice.Text)); } }
//根据ID查询信息并加载到界面 public void Interface(string id) { StringBuilder sb = new StringBuilder(); //sb.Append("<img id='viewImg" + i + "' src='../../upload_Img/" + arrPic[i].ToString() + "' style='width: 80px; height: 80px; float: left;'>"); DataTable dt = pc.GetProductByID(id);; if (dt.Rows.Count > 0) { hidPurl.Value = dt.Rows[0]["tPic"].ToString(); //图片地址 picUrl = "<img id='viewImg' src='../../upload_Img/VideoImg/" + hidPurl.Value + "' style='width: 124px; height: 100px; float: left;'>"; hidVurl.Value = dt.Rows[0]["tVideo"].ToString(); //视频地址 //videoName = hidVurl.Value; videoname.Text = hidVurl.Value; DropGroup.SelectedValue = dt.Rows[0]["sid0"].ToString(); txtTlitle.Text = dt.Rows[0]["VideoName"].ToString(); //标题内容 content1.InnerText = dt.Rows[0]["tMemo"].ToString(); txtPubtime.Text = dt.Rows[0]["dtPubTime"].ToString(); txtPrice.Text = StringDelHTML.PriceToStringLow(dt.Rows[0]["Price"] == null ? 0 : Convert.ToInt32(dt.Rows[0]["Price"])); if (dt.Rows[0]["oNewest"].ToString() == "1") //日韩 { RadioState.SelectedValue = "1"; } else { RadioState.SelectedValue = "0"; } if (dt.Rows[0]["oTop"].ToString() == "1") //选购 { RadioTh.SelectedValue = "1"; } else { RadioTh.SelectedValue = "0"; } if (dt.Rows[0]["oHide"].ToString() == "1") //上架 { redioUPDown.SelectedValue = "1"; } else { redioUPDown.SelectedValue = "0"; } } else { ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('获取数据失败!')</script>"); } }
/// <summary> /// 插入上一日的全球分红 /// </summary> /// <param name="dtuser"></param> /// <param name="level"></param> /// <returns></returns> public bool InsertFenHongLastDay(DataTable dtuser, int level, int rmoney, bool shoudong) { bool flag = false; int allmoney = AllMoneyToday(); int ucount = dtuser.Rows.Count; int avg = 0; double levellv = 0.0; switch (level) { case 3: levellv = cf.leave_1; break; case 4: levellv = cf.leave_2; break; case 5: levellv = cf.leave_3; break; } if (ucount > 0) //有人分,才插入 { if (shoudong) //是否手动分红 { avg = rmoney; } else { avg = Convert.ToInt32(Round(Convert.ToDouble(allmoney * levellv / ucount), 0));//四舍五入取2位小数 } //判断今日是否已经进行过分红操作,未分红,插入 if (!isFengHongToday(level)) { InsertAllMoneyToday(level, ucount, allmoney, avg); StringBuilder sql = new StringBuilder(); sql.Append("insert into T_AvgMoneyLastDay (userID,userlevel,AvgMoney,CreateTime) values "); DateTime dt = System.DateTime.Now; string dtDate = dt.ToLongDateString().ToString(); TemplateMsg tm = new TemplateMsg(); for (int i = 0; i < ucount; i++) { int uid = Convert.ToInt32(dtuser.Rows[i]["nID"]); string opendid = dtuser.Rows[i]["openid"].ToString(); string url = "http://tv.gongxue168.com/wap/Global.aspx?uid=" + uid; if (i == ucount - 1)//最后一个 { sql.AppendLine("(" + uid + "," + level + "," + avg + ",'" + dt.ToString() + "')"); } else { sql.AppendLine("(" + uid + "," + level + "," + avg + ",'" + dt.ToString() + "'),"); } //微信模板,每日分红 tm.CommissionRemind(opendid, url, StringDelHTML.PriceToStringLow(avg), dtDate); } flag = her.ExecuteNonQuery(sql.ToString()); } //昨日已分红 } //没人分 return(flag); }
public string momeycountDate() { DateTime dt = DateTime.Now; string dateb = dt.ToString("yyyy-MM-dd"); string datee = dt.AddDays(1).ToString("yyyy-MM-dd"); string sql = string.Format(@" select ISNULL(sum(OrderPrice),0) from [ML_Order] where CreateTime>'{0}' and CreateTime<='{1}' ", dateb, datee); return(hp.ExecuteScalar(sql) == DBNull.Value ? "0" : StringDelHTML.PriceToStringLow(Convert.ToInt32(hp.ExecuteScalar(sql)))); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { uID = Request.QueryString["uid"].ToString(); int userid = Convert.ToInt32(uID); string sql = string.Format(@"select a.*,b.nickname fromname,b.MemberCode fromcode,c.MemberCode tocode,c.nickname toname from ML_ZhuanBi a join ML_Member b on a.fromUser=b.nID join ML_Member c on a.toUser=c.nID where a.fromUser={0} or a.toUser={0} order by a.CreateTime desc", userid); DataTable dt = her.ExecuteDataTable(sql); StringBuilder sb = new StringBuilder(); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { string money = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["zrMoney"])); if (dr["fromUser"].ToString().Equals(uID))//转出 { string nickname = StringDelHTML.Centers(dr["toname"].ToString(), 5); sb.AppendLine("<dd>"); sb.AppendLine("<h1>转让编号:" + dr["zrCode"].ToString() + "<span>转出</span></h1>"); sb.AppendLine("<h3>转给好友:" + nickname + " <span>共学ID:" + dr["tocode"].ToString() + "</span></h3>"); sb.AppendLine("<h4>转出金额:<span>¥ " + money + "</span></h4>"); sb.AppendLine("<h5>转出时间:<span>" + dr["CreateTime"].ToString() + "</span></h5>"); sb.AppendLine("<h5>备注:<span>" + dr["tMemo"].ToString() + "</span></h5>"); sb.AppendLine("<h2>转让状态:<span>已完成</span></h2>"); sb.AppendLine("</dd>"); } else { string nickname = StringDelHTML.Centers(dr["fromname"].ToString(), 5); sb.AppendLine("<dd>"); sb.AppendLine("<h1>转让编号:" + dr["zrCode"].ToString() + "<span class='cur'>转入</span></h1>"); sb.AppendLine("<h3>转入人:" + nickname + " <span>共学ID:" + dr["fromcode"].ToString() + "</span></h3>"); sb.AppendLine("<h4>转入金额:<span class='cur'>¥ " + money + "</span></h4>"); sb.AppendLine("<h5>转入时间:<span>" + dr["CreateTime"].ToString() + "</span></h5>"); sb.AppendLine("<h5>备注:<span>" + dr["tMemo"].ToString() + "</span></h5>"); sb.AppendLine("<h2>转让状态:<span class='cur'>已完成</span></h2>"); sb.AppendLine("</dd>"); } } } else { sb.Append("<dd><h1 style='text-align: center'>这里什么也没留下 </h1></dd>"); } fromstr = sb.ToString(); } else { Response.Redirect("errors.html"); } }
protected void gridField_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "apply") { string sql = " select sum(price) from T_UserJiXiao where bid= " + e.CommandArgument.ToString(); int pri = her.ExecuteScalar(sql) == null ? 0 : Convert.ToInt32(her.ExecuteScalar(sql)); string sql2 = " select tRealName from ML_Member where nID=" + e.CommandArgument.ToString();; allJinTie = her.ExecuteScalar(sql2) + "_累计津贴:" + StringDelHTML.PriceToStringLow(pri); // Response.Redirect("../Members/MyBranchMain.aspx?uid=" + + "&&ceid=" + gridField.PageIndex); } }
/// <summary> /// 推荐奖励提醒 /// </summary> /// <param name="uid"></param> /// <param name="fid"></param> /// <param name="money"></param> /// <param name="time"></param> public void YongJinMouban(int uid, int fid, int money, DateTime time) { TemplateMsg tm = new TemplateMsg(); string url = "http://tv.gongxue168.com/wap/Sales.aspx?uid=" + fid; string sql1 = "select nickname from ML_Member where nID=" + uid; string nickname = her.ExecuteScalar(sql1) == null ? "" : her.ExecuteScalar(sql1).ToString(); string sql2 = "select openid from ML_Member where nID=" + fid; string openid = her.ExecuteScalar(sql2) == null ? "" : her.ExecuteScalar(sql2).ToString(); string longdate = time.ToLongDateString().ToString(); string shorttime = time.ToShortTimeString().ToString(); string my = StringDelHTML.PriceToStringLow(money); tm.NominateReward(openid, nickname, url, my, longdate + " " + shorttime); }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbhomeMak = gridField.Rows[i].FindControl("lbhomeMak") as Label; if (string.IsNullOrEmpty(lbhomeMak.Text)) { lbhomeMak.Text = "佳奥"; } Label lbprice = gridField.Rows[i].FindControl("lbprice") as Label; lbprice.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbprice.Text)); } }
//根据ID查询信息并加载到界面 public void Interface(string id) { StringBuilder sb = new StringBuilder(); DataTable dt = pc.GetProductByID(id);; if (dt.Rows.Count > 0) { purl = dt.Rows[0]["vPic"].ToString(); //图片地址 hidPurl.Value = dt.Rows[0]["vPic"].ToString(); //图片地址 // hidTou.Value = dt.Rows[0]["teacherImg"].ToString();//老师头像 picUrl = "<img id='viewImg1' src='../../upload_Img/VideoImg/" + hidPurl.Value + "' style='width: 124px; height: 100px; float: left;'>"; txtmulu.Text = dt.Rows[0]["vUrl"].ToString();//视频地址 //picTou = "<img id='viewImg2' src='../../upload_Img/VideoImg/" + hidTou.Value + "' style='width: 124px; height: 100px; float: left;'>"; txtTlitle.Text = dt.Rows[0]["vName"].ToString(); //标题内容 content1.InnerText = dt.Rows[0]["vMemo"].ToString(); txtPubtime.Text = dt.Rows[0]["addTime"].ToString(); txtPrice.Text = StringDelHTML.PriceToStringLow(dt.Rows[0]["Price"] == null ? 0 : Convert.ToInt32(dt.Rows[0]["Price"])); DropGroup.SelectedValue = dt.Rows[0]["teacherID"].ToString(); txtcx.Text = dt.Rows[0]["vdiscrib"] == null ? "" : dt.Rows[0]["vdiscrib"].ToString(); if (dt.Rows[0]["oHide"].ToString() == "True") //上架 { redioUPDown.SelectedValue = "1"; } else { redioUPDown.SelectedValue = "0"; } if (dt.Rows[0]["oFree"].ToString() == "True") //免费 { radioFree.SelectedValue = "1"; } else { radioFree.SelectedValue = "0"; } } else { ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('获取数据失败!')</script>"); } }
protected void gridField_DataBound(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { Label lbprice = gridField.Rows[i].FindControl("lbMemberNum") as Label; if (lbprice.Text != null && lbprice.Text != "") { lbprice.Text = StringDelHTML.PriceToStringLow(Convert.ToInt32(lbprice.Text)); } else { lbprice.Text = "0"; } } }
protected void ImgSrs_Click1(object sender, EventArgs e) { TemplateMsg tm = new TemplateMsg(); DateTime dt = System.DateTime.Now; string dtDate = dt.ToLongDateString().ToString(); for (int i = 0; i < 50; i++) { int avg = 1000 + i; DataTable table = tj.GetUserByLevel(6); string opendid = table.Rows[0]["openid"].ToString(); string url = "http://tv.gongxue168.com/wap/Global.aspx?uid=" + table.Rows[0]["nID"].ToString(); //微信模板,每日分红 tm.CommissionRemind(opendid, url, StringDelHTML.PriceToStringLow(avg), dtDate); } }
private void GetList() { StringBuilder sb = new StringBuilder(); DataTable dt = tj.GetAvgMoneyListByUser(uID); foreach (DataRow dr in dt.Rows) { string money = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["AvgMoney"])); sb.AppendLine("<dd>" + money + "<span>" + dr["CreateTime"].ToString() + "</span></dd>"); } if (string.IsNullOrEmpty(sb.ToString())) { sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>"); } liststr = sb.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { nID = Request.QueryString["uid"].ToString(); nid = nID; OneLeaveUser = sh.getOneLeaveUser(nID); TwoLeaveUser = sh.getTwoLeaveUser(nID); ThreeLeaveUser = sh.getThreeLeaveUser(nID); leave1Pri = sh.getOneLeavePrice(nID); leave2Pri = sh.getTwoLeavePrice(nID); leave3Pri = sh.getThreeLeavePrice(nID); leave1OrderCount = sh.getOneLeaveOrderCount(nID); leave2OrderCount = sh.getTwoLeaveOrderCount(nID); leave3OrderCount = sh.getThreeLeaveOrderCount(nID); allUser = (int.Parse(OneLeaveUser) + int.Parse(TwoLeaveUser) + int.Parse(ThreeLeaveUser)).ToString(); allOrder = (int.Parse(leave1OrderCount) + int.Parse(leave2OrderCount) + int.Parse(leave3OrderCount)).ToString(); soldPri = StringDelHTML.PriceToStringLow(int.Parse(leave1Pri) + int.Parse(leave2Pri) + int.Parse(leave3Pri)); double price1 = leave1 * (double.Parse(leave1Pri)); double price2 = leave2 * (double.Parse(leave2Pri)); double price3 = leave3 * (double.Parse(leave3Pri)); leave1Pri = StringDelHTML.DoublePriceToString(price1); leave2Pri = StringDelHTML.DoublePriceToString(price2); leave3Pri = StringDelHTML.DoublePriceToString(price3); getingPri = StringDelHTML.PriceToStringLow(sh.getPayMoneyNO(nID)); //申请中 allMypri = StringDelHTML.DoublePriceToString(price3 + price2 + price1); //累计佣金 getPri = StringDelHTML.PriceToStringLow(sh.getPayMoney(nID)); //已提现 //当前可提现资金=总金-已提现-已申请 CanGetPri = StringDelHTML.DoublePriceToString((price3 + price2 + price1) - sh.getPayMoney(nID) - sh.getPayMoneyNO(nID)); hidpri.Value = CanGetPri; } else { Response.Redirect("errors.html"); } } }
public string momeycount() { string sql = " select isnull( sum(OrderPrice),0) OrderPrice from [ML_Order]"; return(hp.ExecuteScalar(sql) == DBNull.Value ? "0" : StringDelHTML.PriceToStringLow(Convert.ToInt32(hp.ExecuteScalar(sql)))); }
private void GetVideo() { StringBuilder sb = new StringBuilder(); string sql = "select * from ML_Video where nID=" + pID; DataTable dt = her.ExecuteDataTable(sql); if (dt.Rows.Count > 0) { price = dt.Rows[0]["Price"] == null ? "0.01" : dt.Rows[0]["Price"].ToString() == "" ? "0.01" : StringDelHTML.PriceToStringLow(Convert.ToInt32(dt.Rows[0]["Price"])); sb.AppendLine("<dd>" + dt.Rows[0]["VideoName"].ToString() + "[" + price + "元]<span>"); sb.AppendLine("<img src='Img/sub_03.jpg' onclick=\"document.getElementById('mcover').style.display = 'block'; \" /></span></dd>"); sb.AppendLine("<dt>" + dt.Rows[0]["tMemo"].ToString() + "</dt>"); tmemo = sb.ToString(); didcount = dt.Rows[0]["VideoCode"].ToString(); classid = dt.Rows[0]["sid0"].ToString(); title = dt.Rows[0]["VideoName"].ToString() == "" ? "共学视频" : dt.Rows[0]["VideoName"].ToString(); Url = "../upload_Img/" + dt.Rows[0]["tVideo"].ToString(); //Url = "http://v.chinesecom.cn/1.mp4"; } else { //未找到相关视频 } }
/// <summary> /// 技术累计打款 /// </summary> private void GetLeijiTixian() { string sql = " select ISNULL( SUM(AllPrice),0) from MoneyOrder where OrderState=1"; tixian = StringDelHTML.PriceToStringLow(Convert.ToInt32(her.ExecuteScalar(sql))); }
private void GetProductPrice() { string sql = "select Price from ML_Video where nID=" + pID; string price = her.ExecuteScalar(sql) == null ? "0.01" : her.ExecuteScalar(sql).ToString() == "" ? "0.01" : StringDelHTML.PriceToStringLow(Convert.ToInt32(her.ExecuteScalar(sql))); LogUtil.WriteLog("产品价格=" + price); this.proPrice = price; orderprice.Value = StringDelHTML.PriceToIntUp(proPrice).ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { nID = Request.QueryString["uid"].ToString(); nid = nID; OneLeaveUser = sh.getOneLeaveUser(nID); TwoLeaveUser = sh.getTwoLeaveUser(nID); ThreeLeaveUser = sh.getThreeLeaveUser(nID); //leave1Pri = sh.getOneLeavePrice(nID); //leave2Pri = sh.getTwoLeavePrice(nID); //leave3Pri = sh.getThreeLeavePrice(nID); //leave1OrderCount = sh.getOneLeaveOrderCount(nID); // leave2OrderCount = sh.getTwoLeaveOrderCount(nID); //leave3OrderCount = sh.getThreeLeaveOrderCount(nID); allUser = (int.Parse(OneLeaveUser) + int.Parse(TwoLeaveUser) + int.Parse(ThreeLeaveUser)).ToString(); //allOrder = (int.Parse(leave1OrderCount) + int.Parse(leave2OrderCount) + int.Parse(leave3OrderCount)).ToString(); soldPri = StringDelHTML.PriceToStringLow(tj.GetFenXiangYJZJ(nID)); //soldPri = StringDelHTML.PriceToStringLow(int.Parse(leave1Pri) + int.Parse(leave2Pri) + int.Parse(leave3Pri)); //double price1 = leave1 * (double.Parse(leave1Pri)); //double price2 = leave2 * (double.Parse(leave2Pri)); //double price3 = leave3 * (double.Parse(leave3Pri)); //leave1Pri = StringDelHTML.DoublePriceToString(price1); //leave2Pri = StringDelHTML.DoublePriceToString(price2); //leave3Pri = StringDelHTML.DoublePriceToString(price3); double learnpt = cf.learnPart; //学习币比例 int PayMoneyNO = sh.getPayMoneyNO(nID); //申请中 int FenXiangYJ = tj.GetFenXiangYJ(nID); //分享佣金 int PayMoney = sh.getPayMoney(nID); //已提现 int jiangxj = tj.GetSumMoneyByUser(nID); //累计奖学金,分红 int jintie = tj.GetJx(nID); //绩效 //总金=分享佣金+全球分红+绩效+邀请关注(2016/3/30) double allmakemoney = FenXiangYJ + jiangxj + jintie + tj.GetAttentionXF(nID); //当前剩余资金=总金-已提现-已申请-转学习币 double allpri = allmakemoney - PayMoney - PayMoneyNO - tj.GetMoneyToXueBi(nID); //总学习币=总金的一定比例 double allxxb = tj.Round((allmakemoney) * learnpt, 0); //可用学习币=总学习币-已使用学习币+转入学习币+首次关注赠送(2016/3/30) double canxxb = allxxb - sh.getUsedXueXb(nID) + tj.GetXueXibi(nID) + tj.GetAttentionXXB(nID); //可提现资金=当前剩余资金-总学习币 double canpri = allpri - allxxb; getingPri = StringDelHTML.PriceToStringLow(PayMoneyNO); //allMypri = StringDelHTML.DoublePriceToString(FenXiangYJ); allMypri = StringDelHTML.DoublePriceToString(allmakemoney); getPri = StringDelHTML.PriceToStringLow(PayMoney); //当前可提现资金=总金-已提现-已申请+全球分红+绩效-金币 CanGetPri = StringDelHTML.DoublePriceToString(canpri); hidpri.Value = CanGetPri; } else { Response.Redirect("errors.html"); } } }