public MainUI(string username) { InitializeComponent(); LoadImageForAllButtonMenu(); controller = new AccountBLL(); user = new AccountDTO(); user = controller.GetAccountByUsername(username); ShowInfo(); }
public ActionResult RegisterAccount(FormCollection form) { var username = form["username"]; var password = form["password"]; var usercode = form["usercode"] == ""?AccountBLL.GenerateOrderNumber(): form["usercode"]; var rows = AccountBLL.GetAccountByUsername(username); var msg = string.Empty; if (!"0".Equals(rows)) { msg = "用户名已存在"; } else { var row = AccountBLL.Register(username, password, usercode); if (row > 0) { msg = "用户注册成功"; } } return(JavaScript("alert('" + msg + "')")); }