Web/Admin/IncomesList.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RentHouseBLL;

public partial class Admin_IncomesList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Databind(DateTime.Now.ToString().Substring(0,4).Trim());
        }
    }
    private void Databind(string year)
    {
        double sum=TopupManager.GetTotalByYear(year.Trim());
        lblSumAll.Text = sum.ToString();
        lblYear.Text = year;
        #region i1-12
        double i1 = TopupManager.GetTotalByYearMonth(year, 1);
        double i2 = TopupManager.GetTotalByYearMonth(year, 2);
        double i3 = TopupManager.GetTotalByYearMonth(year, 3);
        double i4 = TopupManager.GetTotalByYearMonth(year, 4);
        double i5 = TopupManager.GetTotalByYearMonth(year, 5);
        double i6 = TopupManager.GetTotalByYearMonth(year, 6);
        double i7 = TopupManager.GetTotalByYearMonth(year, 7);
        double i8 = TopupManager.GetTotalByYearMonth(year, 8);
        double i9 = TopupManager.GetTotalByYearMonth(year, 9);
        double i10 = TopupManager.GetTotalByYearMonth(year, 10);
        double i11 = TopupManager.GetTotalByYearMonth(year, 11);
        double i12 = TopupManager.GetTotalByYearMonth(year, 12); 
        #endregion

        #region lblSum1-12
        lblSum1.Text = i1.ToString();
        lblSum2.Text = i2.ToString();
        lblSum3.Text = i3.ToString();
        lblSum4.Text = i4.ToString();
        lblSum5.Text = i5.ToString();
        lblSum6.Text = i6.ToString();
        lblSum7.Text = i7.ToString();
        lblSum8.Text = i8.ToString();
        lblSum9.Text = i9.ToString();
        lblSum10.Text = i10.ToString();
        lblSum11.Text = i11.ToString();
        lblSum12.Text = i12.ToString(); 
        #endregion

        string per = "<img alt='' src='Imgs/percent.jpg' height='12px' width='";

        #region cent1-12
        string cent1 = Math.Round((100 * (i1 / sum)),2,MidpointRounding.AwayFromZero).ToString();
        string cent2 = Math.Round((100 * (i2 / sum)), 2, MidpointRounding.AwayFromZero).ToString();
        string cent3 = Math.Round((100 * (i3 / sum)), 2, MidpointRounding.AwayFromZero).ToString();
        string cent4 = Math.Round((100 * (i4 / sum)), 2, MidpointRounding.AwayFromZero).ToString();
        string cent5 = Math.Round((100 * (i5 / sum)), 2, MidpointRounding.AwayFromZero).ToString();
后面还有 31 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。