Example #1
0
        public void loadData(string status)
        {
            TradingService.TradingService tradingservice = new TradingService.TradingService();
            UserService.User user = (UserService.User)Session["currentUser"];

            if (currentTab.Value.Equals("Lending"))
            {
                tradings = tradingservice.getListLend(status, user.id).ToList();
            }
            else
            {
                tradings = tradingservice.getListBorrow(status, user.id).ToList();
            }
        }
Example #2
0
        protected void submit_Click(object sender, EventArgs e)
        {
            UserService.UserService service = new UserService.UserService();
            UserService.User        user    = service.checkLogin(Request.Form["usernameTxt"], Request.Form["passwordTxt"]);

            if (user == null)
            {
                errorTxt.Text = "Username or Password is incorrect";
            }
            else
            {
                errorTxt.Text = user.fullName;
                Session.Add("currentUser", user);
                Session.Add("username", user.userName);
                Response.Redirect("Home.aspx");
            }
        }