public BLSystemUser ChargeUser(string code) { DAOSystemUser dv = new DAOSystemUser(); if (!dv.checkNameUser(code)) { SystemUser user = dv.ChargeUser(code); return(new BLSystemUser(user.SystemUserName, user.SystemUserPassword, user.SystemUserRole)); } else { return(null); } }
public bool addUser(BLSystemUser user) { DAOSystemUser dv = new DAOSystemUser(); SystemUser toUser = new SystemUser() { SystemUserName = user.SystemUserName, SystemUserPassword = user.SystemUserPassword, SystemUserRole = user.SystemUserRole }; if (dv.checkNameUser(toUser.SystemUserName)) { dv.addUser(toUser); return(true); } return(false); }