Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "")
        {
            double learnpt = cf.learnPart;              //学习币比例
            nID = Request.QueryString["uid"].ToString();
            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;

            hidpri.Value = canpri.ToString();
            //当前可提现资金=总金-已提现-已申请+全球分红+绩效-学习币
            CanGetPri = StringDelHTML.DoublePriceToString(canpri);
        }
        else
        {
            Response.Redirect("errors.html");
        }
    }
Ejemplo n.º 2
0
    //修改产品
    public bool UpdateProduct(string ID, string dropGroup, string title, string urlPic, string urlVideo, string tMemo, string oNew, string oTop, string pbtime, string oHide, string pri)
    {
        SqlParameter sid0 = new SqlParameter("@sid0", dropGroup);
        //SqlParameter VideoCode = new SqlParameter("@VideoCode", "0");
        SqlParameter VideoName = new SqlParameter("@VideoName", title);
        SqlParameter tPic      = new SqlParameter("@tPic", urlPic);
        SqlParameter tVideo    = new SqlParameter("@tVideo", urlVideo);
        SqlParameter tMemos    = new SqlParameter("@tMemo", tMemo);
        SqlParameter oNewest   = new SqlParameter("@oNewest", int.Parse(oNew));
        SqlParameter oTops     = new SqlParameter("@oTop", int.Parse(oTop));
        SqlParameter dtPubTime = new SqlParameter("@dtPubTime", Convert.ToDateTime(pbtime));
        SqlParameter dtAddTime = new SqlParameter("@dtAddTime", System.DateTime.Now);
        SqlParameter oHides    = new SqlParameter("@oHide", int.Parse(oHide));
        SqlParameter price     = new SqlParameter("@Price", StringDelHTML.PriceToIntUp(pri));

        SqlParameter[] count = { sid0, VideoName, tPic, tVideo, tMemos, oNewest, oTops, dtPubTime, dtAddTime, oHides, price };

        string sql = @"update ML_Video set sid0=@sid0,VideoName=@VideoName,tPic=@tPic,tVideo=@tVideo,
tMemo=@tMemo,oNewest=@oNewest,oTop=@oTop,dtPubTime=@dtPubTime,dtAddTime=@dtAddTime,oHide=@oHide,Price=@Price where nID=" + ID;

        bool success = her.ExecuteNonQuery(sql, count);

        if (success)
        {
            return(true);
        }
        return(false);
    }
Ejemplo n.º 3
0
    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 = "否";
            //}
        }
    }
Ejemplo n.º 4
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");
        }
    }
Ejemplo n.º 5
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 = "否";
            }
        }
    }
Ejemplo n.º 6
0
    /// <summary>
    /// 添加产品
    /// </summary>
    /// <param name="dropGroup"></param>
    /// <param name="title"></param>
    /// <param name="urlPic"></param>
    /// <param name="urlVideo"></param>
    /// <param name="tMemo"></param>
    /// <param name="oNewest"></param>
    /// <param name="oTop"></param>
    /// <param name="pbtime"></param>
    /// <param name="oHide"></param>
    /// <returns></returns>
    public bool InsertProduct(string dropGroup, string title, string urlPic, string urlVideo, string tMemo, string oNew, string oTop, string pbtime, string oHide, string pri)
    {
        SqlParameter sid0      = new SqlParameter("@sid0", dropGroup);
        SqlParameter VideoCode = new SqlParameter("@VideoCode", 0);
        SqlParameter VideoName = new SqlParameter("@VideoName", title);
        SqlParameter tPic      = new SqlParameter("@tPic", urlPic);
        SqlParameter tVideo    = new SqlParameter("@tVideo", urlVideo);
        SqlParameter tMemos    = new SqlParameter("@tMemo", tMemo);
        SqlParameter oNewest   = new SqlParameter("@oNewest", int.Parse(oNew));
        SqlParameter oTops     = new SqlParameter("@oTop", int.Parse(oTop));
        SqlParameter dtPubTime = new SqlParameter("@dtPubTime", Convert.ToDateTime(pbtime));
        SqlParameter dtAddTime = new SqlParameter("@dtAddTime", System.DateTime.Now);
        SqlParameter oHides    = new SqlParameter("@oHide", int.Parse(oHide));
        SqlParameter price     = new SqlParameter("@Price", StringDelHTML.PriceToIntUp(pri));

        SqlParameter[] count   = { sid0, VideoCode, VideoName, tPic, tVideo, tMemos, oNewest, oTops, dtPubTime, dtAddTime, oHides, price };
        string         sql     = @"insert into ML_Video values (@sid0,@VideoCode,@VideoName,@tPic,@tVideo,@tMemo,@oNewest,@oTop,@dtPubTime,@dtAddTime,@oHide,@Price)";
        bool           success = her.ExecuteNonQuery(sql, count);

        if (success)
        {
            return(true);
        }
        return(false);
    }
Ejemplo n.º 7
0
    //修改产品系列
    public bool UpdateProduct(string ID, string title, string urlPic, string urlVideo, string tMemo, string pbtime, string oHide, string pri
                              , string vd, string tid, string oFree)
    {
        SqlParameter sid       = new SqlParameter("@sid0", Convert.ToInt32(0));
        SqlParameter VideoName = new SqlParameter("@vName", title);
        SqlParameter tPic      = new SqlParameter("@vPic", urlPic);
        SqlParameter tVideo    = new SqlParameter("@vUrl", urlVideo);
        SqlParameter tMemos    = new SqlParameter("@vMemo", tMemo);
        SqlParameter dtAddTime = new SqlParameter("@addTime", Convert.ToDateTime(pbtime));
        SqlParameter oHides    = new SqlParameter("@oHide", int.Parse(oHide));
        SqlParameter price     = new SqlParameter("@Price", StringDelHTML.PriceToIntUp(pri));
        SqlParameter vdiscrib  = new SqlParameter("@vdiscrib", vd);
        SqlParameter teacherID = new SqlParameter("@teacherID", tid);
        SqlParameter ofree     = new SqlParameter("@oFree", int.Parse(oFree));

        SqlParameter[] count = { sid,      VideoName, tPic, tVideo, tMemos, dtAddTime, oHides, price,
                                 vdiscrib, teacherID, ofree };

        string sql = @"update ML_VideoComment set sid0=@sid0,vMemo=@vMemo,Price=@Price,vName=@vName,
vPic=@vPic,vUrl=@vUrl,oHide=@oHide,addTime=@addTime,vdiscrib=@vdiscrib,teacherID=@teacherID,oFree=@oFree where nID=" + ID;

        bool success = her.ExecuteNonQuery(sql, count);

        if (success)
        {
            return(true);
        }
        return(false);
    }
Ejemplo n.º 8
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);


            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");
        }
    }
Ejemplo n.º 9
0
    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);
    }
Ejemplo n.º 10
0
    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);
    }
Ejemplo n.º 11
0
    protected void ImgSrs_Click(object sender, EventArgs e)
    {
        int money = StringDelHTML.PriceToIntUp(price.Text.Trim());
        //插入全球分红,每日
        DateTime dt = System.DateTime.Now;

        if (dt.Hour > 10)//每天10点以后的数据
        {
            DataTable table = tj.GetUserByLevel(_level);
            if (table.Rows.Count > 0)
            {
                if (tj.InsertFenHongLastDay(table, _level, money, true))
                {
                    ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('分红成功')</script>");
                }
                else
                {
                    ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('您已提交过昨日的分红')</script>");
                }
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('无可分红对象')</script>");
            }
        }
        else
        {
            ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('每日10点后才能提交分红')</script>");
        }
    }
Ejemplo n.º 12
0
    /// <summary>
    /// 添加产品系列
    /// </summary>
    /// <param name="title"></param>
    /// <param name="urlPic"></param>
    /// <param name="urlVideo"></param>
    /// <param name="tMemo"></param>
    /// <param name="pbtime"></param>
    /// <param name="oHide"></param>
    /// <param name="pri"></param>
    /// <returns></returns>
    public bool InsertProduct(string title, string urlPic, string urlVideo, string tMemo, string pbtime, string oHide, string pri
                              , string vd, string tid, string oFree)
    {
        SqlParameter sid       = new SqlParameter("@sid0", Convert.ToInt32(0));
        SqlParameter VideoName = new SqlParameter("@vName", title);
        SqlParameter tPic      = new SqlParameter("@vPic", urlPic);
        SqlParameter tVideo    = new SqlParameter("@vUrl", "");
        SqlParameter tMemos    = new SqlParameter("@vMemo", tMemo);
        SqlParameter dtAddTime = new SqlParameter("@addTime", Convert.ToDateTime(pbtime));
        SqlParameter oHides    = new SqlParameter("@oHide", int.Parse(oHide));
        SqlParameter price     = new SqlParameter("@Price", StringDelHTML.PriceToIntUp(pri));
        SqlParameter vdiscrib  = new SqlParameter("@vdiscrib", vd);
        SqlParameter teacherID = new SqlParameter("@teacherID", tid);
        SqlParameter ofree     = new SqlParameter("@oFree", int.Parse(oFree));

        SqlParameter[] count = { sid,      VideoName, tPic, tVideo, tMemos, dtAddTime, oHides, price,
                                 vdiscrib, teacherID, ofree };
        string         sql     = @"insert into ML_VideoComment values (@sid0,@vMemo,@Price,@vName,@vPic,@vUrl,@oHide,@addTime
                    ,@vdiscrib,@teacherID,@oFree)";
        bool           success = her.ExecuteNonQuery(sql, count);

        if (success)
        {
            return(true);
        }
        return(false);
    }
Ejemplo n.º 13
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();
            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");
        }
    }
Ejemplo n.º 14
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();
    }
Ejemplo n.º 15
0
    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 = "否";
            //}
        }
    }
Ejemplo n.º 16
0
    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);
    }
Ejemplo n.º 17
0
    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"]));
        }
    }
Ejemplo n.º 18
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());
    }
Ejemplo n.º 19
0
    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;
            }
        }
    }
Ejemplo n.º 20
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);
     }
 }
Ejemplo n.º 21
0
 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));
     }
 }
Ejemplo n.º 22
0
    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))));
    }
Ejemplo n.º 23
0
    //根据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>");
        }
    }
Ejemplo n.º 24
0
    /// <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);
    }
Ejemplo n.º 25
0
    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();
    }
Ejemplo n.º 26
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");
        }
    }
Ejemplo n.º 27
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);
        }
    }
Ejemplo n.º 28
0
    private double learnpt = Convert.ToDouble(ConfigurationManager.AppSettings["learnPart"]);//学习币比例
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["pid"] != null && Request.QueryString["pid"].ToString() != "")
            {
                pID = Request.QueryString["pid"].ToString();
                if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "")
                {
                    nID = Request.QueryString["uid"].ToString();
                    LogUtil.WriteLog("支付页面,用户=" + nID);
                    //获取用户openId
                    //GetUserOpenId();
                    GetOpenID(nID);
                    //生成欲支付订单
                    GetProductPrice();
                    PayMoney();

                    //下面这些是求 “可使用学习币”
                    int PayMoneyNO = sh.getPayMoneyNO(nID);     //申请中
                    int FenXiangYJ = tj.GetFenXiangYJ(nID);     //分享佣金
                    int PayMoneys  = 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 - PayMoneys - PayMoneyNO;
                    //总学习币=总金的一定比例
                    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;

                    //学习币
                    xuexibi   = StringDelHTML.DoublePriceToString(canxxb);
                    Gwb.Value = xuexibi;
                }
                else
                {
                    LogUtil.WriteLog("用户ID丢失");

                    Response.Redirect("errors.html");
                }
            }
            else
            {
                LogUtil.WriteLog("产品ID丢失");

                Response.Redirect("errors.html");
            }
        }
    }
Ejemplo n.º 29
0
    private void getUser1()
    {
        StringBuilder sb = new StringBuilder();
        Dictionary <string, UserInfo> dicPri = HttpRuntime.Cache["Ranking"] as Dictionary <string, UserInfo>;

        if (HttpRuntime.Cache["Ranking"] == null)
        {
            HttpRuntime.Cache.Insert("Ranking", mp.getRadnking());
            dicPri = HttpRuntime.Cache["Ranking"] as Dictionary <string, UserInfo>;
            //HttpRuntime.Cache与HttpContext.Current.Cache是同一对象,建议使用HttpRuntime.Cache
        }


        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>");
        }
        class1 = sb.ToString();
    }
Ejemplo n.º 30
0
    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);
        }
    }