private void AddNewUser() { User user = new User(); user.Full_Name = txtUserName.Value; user.Email_Address = txtEmailAddress.Value; user.Password = Common.GetHash(txtPassword.Value); user.Role_Code = int.Parse(ddlRole.SelectedValue); user.Package_Id = int.Parse(ddlPackage.SelectedValue); user.Created_Date = DateTime.Now; user.Is_Active = true; DataModelEntities entities = new DataModelEntities(); entities.AddToUsers(user); entities.SaveChanges(); BindUsers(); }