예제 #1
0
        public bool AddNewClient(Client client)
        {
            DAL.Entity.Client cl = _dal.GetClientByUsername(client.Username);

            if (cl == null)
            {
                cl = new DAL.Entity.Client
                {
                    Id        = client.Id,
                    Username  = client.Username,
                    Password  = client.Password,
                    Salt      = client.Salt,
                    Status    = client.Status,
                    Sale      = client.Sale,
                    Birthday  = client.Birthday,
                    Email     = client.Email,
                    Firstname = client.Firstname,
                    Lastname  = client.Lastname,
                    RoleId    = client.RoleId
                };
                _dal.AddNewClient(cl);
                return(true);
            }
            else
            {
                return(false);
            }
        }