Files
cs-oo-project/Online Gokkantoor/Gui/addBalance.aspx.cs
Beppe df39b0392c yup
2019-07-04 01:05:11 +02:00

28 lines
659 B
C#

using System;
using System.Web;
using System.Web.UI;
using Globals.classes;
namespace Gui
{
public partial class addBalance : System.Web.UI.Page
{
public void add(Object o, EventArgs e)
{
try
{
double bal = double.Parse(balans.Text);
((Person)HttpContext.Current.Application["user"]).balance += bal;
Response.Redirect("mainForm.aspx");
}
catch (Exception ex)
{
statusLabel.Text = "There was a problem parsing the balance, try again. (format 0.00)";
return;
}
}
}
}