示例#1
0
    private void TongJi()
    {
        DataTable     dtdl = dl.MemberSelectTongJi(); //代理商申请
        DataTable     dtor = or.GetOrderTongji();     //待发货
        StringBuilder sb   = new StringBuilder();

        StringBuilder sb1 = new StringBuilder();

        StringBuilder sb2 = new StringBuilder();

        sb.AppendLine("<li><i><a href='../Members/MemberMain.aspx'>用户总数:</a></i>" + dl.MakSelectTongJi() + "人</li>");
        sb.AppendLine("<li><i><a href='../Pruduct/ServceMain.aspx'>会员总数:</a></i>" + dl.ProductSelectTongJi() + "人</li>");
        sb.AppendLine("<li><i><a href='../Order/OrderMain.aspx'>视频个数:</a></i>" + or.videoCount() + "部</li>");
        sb.AppendLine("<li><i><a href='../Order/OrderMainFaHuo.aspx'>总成交额:</a></i>" + or.momeycount() + "元</li>");
        sb.AppendLine("<li><i><a href='../Order/OrderMain.aspx'>日成交额:</a></i>" + or.momeycountDate() + "元</li>");
        sb.AppendLine("<li><i><a href='../Order/OrderMainTuiHuo.aspx'>总订单量:</a></i>" + or.OrderCount() + "个</li>");
        strTongJ = sb.ToString();
        foreach (DataRow dr in dtdl.Rows)
        {
            string time    = Convert.ToDateTime(dr["dtAddTime"]).ToString("yyyy-MM-dd HH:mm:ss");
            string nicname = StringDelHTML.Centers(dr["nickname"].ToString(), 15);
            sb1.AppendLine("<li><a href='../Members/Member_Main.aspx'>" + nicname + "</a><b>" + time + "</b></li>");
        }
        foreach (DataRow dr in dtor.Rows)
        {
            string time = Convert.ToDateTime(dr["CreateTime"]).ToString("yyyy-MM-dd HH:mm:ss");
            sb2.AppendLine("<li><a href='../Order/OrderMain.aspx'>" + dr["OrderCode"].ToString() + "</a><b>" + time + "</b></li>");
        }

        strDaiLiList = sb1.ToString();
        strQr        = sb2.ToString();
    }
示例#2
0
    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");
        }
    }
示例#3
0
    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());
    }
示例#4
0
    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 = "否";
            }
        }
    }
示例#5
0
 protected void gridField_DataBound(object sender, EventArgs e)
 {
     for (int i = 0; i < gridField.Rows.Count; i++)
     {
         Label tMemo = gridField.Rows[i].FindControl("tMemo") as Label;
         tMemo.Text = StringDelHTML.Centers(StringDelHTML.DelHTML(tMemo.Text), 70);
     }
 }
示例#6
0
    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");
        }
    }
示例#7
0
    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/TeacherImg/" + img.ImageUrl;

            Label lbtMemo = gridField.Rows[i].FindControl("lbvMemo") as Label;
            lbtMemo.Text = StringDelHTML.Centers(StringDelHTML.DelHTML(lbtMemo.Text), 30);
        }
    }
示例#8
0
    private void GetClassVideo()
    {
        StringBuilder sb  = new StringBuilder();
        string        sql = "select  * from  ML_Video where sid0='" + pID + "' order by oTop ";
        DataTable     dt  = her.ExecuteDataTable(sql);

        sb.AppendLine(" <dt>" + title + "(共" + dt.Rows.Count + "段视频)</dt>");
        foreach (DataRow dr in dt.Rows)
        {
            var    ctPic = dr["tPic"].ToString();//每部视频独立图片,图片在upload_Img/Video/文件目录下
            string vname = StringDelHTML.Centers(dr["VideoName"].ToString(), 12);
            //sb.AppendLine("<dd><a style='color:#f9b025;text-decoration:underline' href='VideoShow.aspx?pid=" + pID + "&cid=" + dr["nID"].ToString() + "'>");
            sb.AppendLine("<dd><a href='VideoShow.aspx?pid=" + pID + "&cid=" + dr["nID"].ToString() + "'>");
            sb.AppendLine("<img src='../upload_Img/VideoImg/" + vpic + "' />" + vname + "</a></dd>");
        }
        nearVideo = sb.ToString();
    }
示例#9
0
    private void GetNearVideo()
    {
        StringBuilder sb  = new StringBuilder();
        string        sql = "select top 3 * from  ML_Video where sid0='" + classid + "' order by dtAddTime desc ";
        DataTable     dt  = her.ExecuteDataTable(sql);

        foreach (DataRow dr in dt.Rows)
        {
            string tmemo = StringDelHTML.Centers(StringDelHTML.DelHTML(dr["tmemo"].ToString()), 50);
            sb.AppendLine("<dd><a href='ProductShow.aspx?pid=" + dr["nID"].ToString() + "'>");
            sb.AppendLine("<img src='../upload_Img/VideoImg/" + dr["tPic"].ToString() + "' />");
            sb.AppendLine("<h1>" + dr["VideoName"].ToString() + "</h1>");
            sb.AppendLine("<h3>" + tmemo + "</h3>");
            sb.AppendLine("<h4>" + dr["VideoCode"].ToString() + "次播放</h4>");
            sb.AppendLine("</a></dd>");
        }
        nearVideo = sb.ToString();
    }
示例#10
0
    protected void gridField_DataBound(object sender, EventArgs e)
    {
        for (int i = 0; i < gridField.Rows.Count; i++)
        {
            Label lblState = (Label)gridField.Rows[i].FindControl("lblzhiding");
            if (lblState.Text == "True")
            {
                lblState.Text = "已发布";
            }
            else
            {
                lblState.Text = "未发布";
            }

            Label lbtMemo = (Label)gridField.Rows[i].FindControl("lbtMemo");
            lbtMemo.Text = StringDelHTML.Centers(StringDelHTML.DelHTML(lbtMemo.Text), 80);
        }
    }
示例#11
0
    protected void gridField_DataBound(object sender, EventArgs e)
    {
        for (int i = 0; i < gridField.Rows.Count; i++)
        {
            Label lbMethods = (Label)gridField.Rows[i].FindControl("dtMethods");

            lbMethods.Text = StringDelHTML.Centers(StringDelHTML.DelHTML(lbMethods.Text), 50);
            //Label lblState = (Label)gridField.Rows[i].FindControl("lblzhiding");
            //if (lblState.Text == "True")
            //{
            //    lblState.Text = "是";
            //}
            //else
            //{
            //    lblState.Text = "否";
            //}
        }
    }
示例#12
0
    private void GetSource()
    {
        StringBuilder sb  = new StringBuilder();
        string        sql = "select * from ML_News order by oTop desc,dtAddTime desc";
        DataTable     dt  = sh.ExecuteDataTable(sql);

        foreach (DataRow dr in dt.Rows)
        {
            string time  = Convert.ToDateTime(dr["dtAddTime"]).ToString("yyyy-MM-dd HH:mm");
            string tMemo = StringDelHTML.Centers(StringDelHTML.DelHTML(dr["tMemo"].ToString()), 40);
            //string title = dr["nID"].ToString();
            sb.AppendLine("<li class='list-item NewsList'><a href='NewsShow.aspx?id=" + dr["nID"].ToString() + "'>");
            sb.AppendLine("<img src='../Admin/upload_Img/News/" + dr["tPic"].ToString() + "' width='250' height='160' /></a>");
            sb.AppendLine("<h1><a href='NewsShow.aspx?id=" + dr["nID"].ToString() + "'>" + dr["tTitle"].ToString() + "</a></h1>");
            sb.AppendLine("<h2>" + time + "</h2>");
            sb.AppendLine("<h3>" + tMemo + "</h3>");
            sb.AppendLine("<div class='cls'>");
            sb.AppendLine("</div>");
            sb.AppendLine("</li>");
        }
        activityStr = sb.ToString();
    }
示例#13
0
    public string getMonthRadnking(DateTime dtime)
    {
        string sql = @"select a.nID,a.nickname,a.headimgurl,b.levelName,a.fxslevel from ML_Member a join ML_MemberLevel b 
                    on a.fxslevel=b.nID where a.fxslevel>=3";  //至少得班长级别

        DataTable     dt = her.ExecuteDataTable(sql);
        StringBuilder sb = new StringBuilder();
        Dictionary <string, UserInfo> dicPri = new Dictionary <string, UserInfo>();

        foreach (DataRow dr in dt.Rows)
        {
            var id = dr["nID"].ToString();
            // leave1Pri = sh.getOneLeavePriceOneMonth(id);
            //leave2Pri = sh.getTwoLeavePrice(id);
            //leave3Pri = sh.getThreeLeavePrice(id);
            double price1 = (double.Parse(sh.getOneLeavePriceOneWeek(id, dtime)));
            // double price2 = leave2 * (double.Parse(leave2Pri));
            //double price3 = leave3 * (double.Parse(leave3Pri));
            allMypri = StringDelHTML.DoublePriceToString(price1);// 当月 1级分销销售累计佣金
            UserInfo ui = new UserInfo()
            {
                nID       = dr["nID"].ToString(),
                nickname  = StringDelHTML.Centers(dr["nickname"].ToString(), 10),
                levelname = dr["levelName"].ToString(),
                price     = price1,
                pic       = dr["headimgurl"].ToString(),
                fxslevel  = Convert.ToInt32(dr["fxslevel"])
            };
            dicPri.Add(id, ui);
        }
        dicPri = dicPri.OrderByDescending(d => d.Value.price).Where(d => d.Value.price > 0).ToDictionary(d => d.Key, d => d.Value);



        int rows = 0;

        foreach (KeyValuePair <string, UserInfo> dic in dicPri)
        {
            rows++;
            while (rows <= 15)//100以内排名
            {
                string pri = StringDelHTML.DoublePriceToString(dic.Value.price);
                string img = dic.Value.pic == "" ? "img/Styl_01.png" : dic.Value.pic;
                sb.AppendLine("<dd><a><img src='" + img + "' />");
                sb.AppendLine("<h1>昵称:" + dic.Value.nickname + "</h1>");
                sb.AppendLine("<h2>" + dic.Value.levelname + "</h2>");
                sb.AppendLine("<h2>学分:¥" + pri + "</h2>");
                if (rows <= cf.xuebaCount)//前30有奖励
                {
                    sb.AppendLine("<span style='color:red'>" + rows + "</span></a></dd>");
                }
                else
                {
                    sb.AppendLine("<span style='color:black'>" + rows + "</span></a></dd>");
                }
                break;
            }
        }
        if (string.IsNullOrEmpty(sb.ToString()))
        {
            sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>");
        }
        return(sb.ToString());
    }
示例#14
0
    public Dictionary <string, UserInfo> getRadnking()
    {
        string    sql = @"select a.nID,a.nickname,a.headimgurl,b.levelName,a.fxslevel from ML_Member a join ML_MemberLevel b 
                    on a.fxslevel=b.nID  where isJXS=1 ";
        DataTable dt  = her.ExecuteDataTable(sql);
        Dictionary <string, UserInfo> dicPri = new Dictionary <string, UserInfo>();

        foreach (DataRow dr in dt.Rows)
        {
            var id         = dr["nID"].ToString();
            int FenXiangYJ = tj.GetFenXiangYJ(id);     //分享佣金
            int jiangxj    = tj.GetSumMoneyByUser(id); //累计奖学金,分红
            int jintie     = tj.GetJx(id);             //绩效,津贴
            //总金=分享佣金+全球分红+绩效
            double allmakemoney = FenXiangYJ + jiangxj + jintie;
            allMypri = StringDelHTML.DoublePriceToString(allmakemoney);//累计佣金
            UserInfo ui = new UserInfo()
            {
                nID       = dr["nID"].ToString(),
                nickname  = StringDelHTML.Centers(dr["nickname"].ToString(), 8),
                levelname = dr["levelName"].ToString(),
                price     = allmakemoney,
                pic       = dr["headimgurl"].ToString(),
                fxslevel  = Convert.ToInt32(dr["fxslevel"])
            };
            dicPri.Add(id, ui);
        }
        dicPri = dicPri.OrderByDescending(d => d.Value.price).ToDictionary(d => d.Key, d => d.Value);

        return(dicPri);
        //int rows = 0;
        //foreach (KeyValuePair<string, UserInfo> dic in dicPri)
        //{
        //    rows++;
        //    while (rows <= 100)//100以内排名
        //    {
        //        string pri = StringDelHTML.DoublePriceToString(dic.Value.price);
        //        string img = dic.Value.pic == "" ? "img/Styl_01.png" : dic.Value.pic;
        //        sb.AppendLine("<dd><a><img src='" + img + "' />");
        //        sb.AppendLine("<h1>昵称:" + dic.Value.nickname + "</h1>");
        //        sb.AppendLine("<h2>" + dic.Value.levelname + "</h2>");
        //        sb.AppendLine("<h2>学分:¥" + pri + "</h2>");
        //        // sb.AppendLine("<span>" + rows + "</span></a></dd>");
        //        if (!string.IsNullOrEmpty(uID))
        //        {
        //            if (uID.Equals(dic.Key))
        //            {
        //                sb.AppendLine("<span style='color:red;'>我</span></a></dd>");
        //                MyTop = rows.ToString();
        //            }
        //            else
        //            {
        //                sb.AppendLine("<span>" + rows + "</span></a></dd>");
        //            }
        //        }
        //        else
        //        {
        //            sb.AppendLine("<span>" + rows + "</span></a></dd>");
        //        }
        //        break;
        //    }
        //}
        //if (string.IsNullOrEmpty(sb.ToString()))
        //{
        //    sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>");
        //}
        //return sb.ToString();
    }