-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_lane.aspx.cs.exclude
87 lines (77 loc) · 2.66 KB
/
user_lane.aspx.cs.exclude
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
78
79
80
81
82
83
84
85
86
87
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class user_lane : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ButtonParking_Click(object sender, EventArgs e)
{
int ttid = Convert.ToInt32(Session["ttid"].ToString());
GridView1.DataSource = new user_parking_view().GetUsersOnMyParking(ttid);
GridView1.DataBind();
}
protected void ButtonCarspasked_Click(object sender, EventArgs e)
{
int ttid = Convert.ToInt32(Session["ttid"].ToString());
// GridView2.DataSource = new user_parking_view().ShowMyCarsParking(ttid);
GridView2.DataBind();
}
protected void Fine_User(object sender, EventArgs e)
{
int ttid = Convert.ToInt32(Session["ttid"].ToString());
Button btn = (Button)sender;
string[] arguments = btn.CommandArgument.ToString().Split(new char[] { ',' });
string parkingid = arguments[0];
int userid = Convert.ToInt32(arguments[1]);
string name = arguments[1];
int index = Convert.ToInt32(arguments[2]);
int parking = Convert.ToInt32(parkingid);
int user = Convert.ToInt32(userid);
if (parking == 0 || user == 0)
{
Response.Write("there is no user");
}
else if (index == 2 || index == 4)
{
Response.Write("its parking here u cannot fine the player");
}
else
{
fine fineuser = new fine();
fineuser.Finebyuser(ttid, parking, userid);
}
GridView1.DataSource = new user_parking_view().GetUsersOnMyParking(ttid);
GridView1.DataBind();
}
protected void Remove(object sender, EventArgs e)
{
int ttid = Convert.ToInt32(Session["ttid"].ToString());
Button btn = (Button)sender;
string[] arguments = btn.CommandArgument.ToString().Split(new char[] { ',' });
int carid = Convert.ToInt32(arguments[0]);
string parkingid = arguments[1];
string name = arguments[2];
int parking = Convert.ToInt32(parkingid);
if (parking == 0)
{
Response.Write("there is no car");
}
else if (name == "Public lane")
{
User tempUser = new User();
tempUser.pick_from_public(ttid, parking);
}
else
{
user_parking_view u = new user_parking_view();
// u.remove(ttid, carid);
}
// GridView2.DataSource = new user_parking_view().ShowMyCarsParking(ttid);
GridView2.DataBind();
}
}