-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcashOut.aspx.cs
39 lines (33 loc) · 960 Bytes
/
cashOut.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class cashOut : System.Web.UI.Page
{
public String vis = "";
public bool sucess = false, on = false;
protected void Page_Load(object sender, EventArgs e)
{
on = false;
sucess = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
String uid = Request.QueryString["id"];
UserDao userdao = new UserDao();
if(bkash.Text != null && cash.Text != null)
{
String Cs = userdao.getcash(uid);
int incash = Convert.ToInt32(Cs);
int outcash = Convert.ToInt32(cash.Text);
on = true;
if( outcash <= incash)
{
userdao.addcash(uid, -outcash );
sucess = true;
}
}
}
}