forked from PandaSun/HeRun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.aspx.cs
77 lines (72 loc) · 2.12 KB
/
Main.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;
using System.Data.Linq;
public partial class Main : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
/*
ggbangding();
fybangding();
ywbangding();
*/
}
/*
public void ggbangding() {
linqGongGaoDataContext gg = new linqGongGaoDataContext();
Table<GongGao> gonggaolist = gg.GetTable<GongGao>();
var query =
from gonggao in gonggaolist
orderby gonggao.Gg_TianJiaShiJian descending
select gonggao;
grvGG.DataSource = query;
grvGG.DataKeyNames = new string[] { "Gg_Id" };
grvGG.DataBind();
}
public void fybangding()
{
linqFangYuanDataContext fy = new linqFangYuanDataContext();
Table<FangYuan> fangyuanlist = fy.GetTable<FangYuan>();
var query =
from fangyuan in fangyuanlist
orderby fangyuan.Fy_TianJiaRiQi descending
select fangyuan;
grvFY.DataSource = query;
grvFY.DataKeyNames = new string[] { "FY_Id" };
grvFY.DataBind();
}
public void ywbangding() {
linqYeWuDataContext yw = new linqYeWuDataContext();
Table<YeWu> yewulist = yw.GetTable<YeWu>();
var query =
from yewu in yewulist
orderby yewu.Yw_TianJiaShiJian descending
select yewu;
grvYW.DataSource = query;
grvYW.DataKeyNames = new string[] { "Yw_Id" };
grvYW.DataBind();
}
protected void grvFY_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = -1; i < grvFY.Rows.Count; i++)
{
string lbl = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "Fy_LeiXing"));
if (lbl == "1")
{
lbl = "出租";
}
}
}
*/
}