温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:网博直销系统软件源码
当前文件:
WangBoDirect/admin/webhww_yeji.aspx.cs,打开代码结构图
WangBoDirect/admin/webhww_yeji.aspx.cs,打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
12
public partial class admin_webhww_yeji : System.Web.UI.Page 13
{ 14
protected void Page_Load(object sender, EventArgs e) 15
{ 16
if (Session["aid"] == null) 17
{ Response.Write("<script language=javascript>top.location.href='login.aspx';alert('您未登录!');</script>"); } 18
else 19
{ 20
if (!IsPostBack) 21
{ 22
bind(); 23
} 24
} 25
} 26
void bind() 27
{ 28
string sql = "select * from webhww_hy where webhww_sort=0"; 29
DataTable dt = new DataTable(); 30
dt = access.GreatDs(sql).Tables[0]; 31
DataRow[] row = dt.Select("webhww_sh=true"); 32
Label1.Text = dt.Rows.Count.ToString(); 33
Label2.Text = row.Length.ToString() ; 34
Label3.Text = access.GreatDs("select sum (webhww_xgje) as b from webhww_hy where webhww_sh=true and webhww_sort=0").Tables[0].Rows[0]["b"].ToString(); 35
36
string str = "select * from webhww_tqsq where webhww_sfcl="+true+""; 37
DataTable dt1 = new DataTable(); 38
dt1 = access.GreatDs(str).Tables[0]; 39
double zs = 0; 40
if (dt1.Rows.Count > 0) 41
{ 42
for (int i = 0; i < dt1.Rows.Count; i++) 43
{ 44
zs += int.Parse(dt1.Rows[i]["webhww_tkje"].ToString()); 45
} 46
} 47
Label4.Text = zs.ToString(); 48
49
50
string str2 = "select *from webhww_hy where webhww_sort=0 and webhww_sh=true"; 51
DataTable dt2 = new DataTable(); 52
dt2 = access.GreatDs(str2).Tables[0]; 53
double zs2 = 0; 54
55
if (dt2.Rows.Count > 0) 56
{ 57
for (int i2 = 0; i2 < dt2.Rows.Count; i2++) 58
{ 59
zs2 += int.Parse(dt2.Rows[i2]["webhww_xgje"].ToString()); 60
61
double lv = 100 * (zs / zs2); 62
Label5.Text = lv.ToString(); 63
} 64
} 65
66
67
} 68
} 69





}
}