The second problem is obvious:
Operator '==' cannot be applied to operands of type 'bool?' and 'string'
else if (loginEmp.Emp_FirstLog == "true")
Emp_FirstLog is declared as Nullable<bool>, not string.
So try:
else if (loginEmp.Emp_FirstLog == true)
And that error should go away.
The first one is trickier: it's not obvious from your code exactly what is going on in terms of the declarations.
But basically, something in the containing classes for the All class (or possibly the LoginAcuteController class, but that's less likely) is
protected
,
internal
, or
private
, and that isn't compatible with the public declaration of the LoginAttempt method - which means that some code which can call the method can't access the class it needs to pass to it. Hence the error message.
I'd suggest a good close look at all your container classes and evaluate exactly what access modifier you are using and which you need: who does really need access to the method?
Sorry - but we can't do that for you!