public static List <object> AuthResult(Authenticates.CriteriaInfo criteriaInfo) { Authenticates authenticate = Authenticates.GetData(criteriaInfo); List <object> res = new List <object>((IEnumerable <object>)authenticate); return(res); }
private void btnLogin_Click(object sender, EventArgs e) { Authenticates.CriteriaInfo authParams = new Authenticates.CriteriaInfo(); string username = txt_uname.Text, password = txt_pword.Text; if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) { authParams.Username = username; authParams.Password = password; if (Account.AuthenticateUser(authParams)) { Authenticate aut = new Authenticate(); Object resObj = new Object(); List <object> auth = new List <object>(); auth = Account.AuthResult(authParams); //((WritersWeb.Data.Authenticate)new System.Collections.Generic.Mscorlib_CollectionDebugView<object>(auth).Items[0]).Fullname resObj = Account.AuthResult(authParams); frmMain open = new frmMain(); open.ShowDialog(); } else { MessageBox.Show("Invalid user!!!"); } } else { MessageBox.Show("Fields missing!!!"); } }
public static bool AuthenticateUser(Authenticates.CriteriaInfo criteriaInfo) { Authenticates authenticate = Authenticates.GetData(criteriaInfo); if (authenticate.Count > 0) { return(true); } else { return(false); } }
public static int AuthenticateUser(Authenticates.CriteriaInfo criteriaInfo) { Authenticates authenticate = Authenticates.GetData(criteriaInfo); List <object> res = new List <object>((IEnumerable <object>)authenticate); if (authenticate.Count > 0) { return(authenticate.Count); } else { return(0); } }
private void btnLogin_Click(object sender, EventArgs e) { Authenticates.CriteriaInfo authParams = new Authenticates.CriteriaInfo(); string username = txt_uname.Text, password = txt_pword.Text; if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) { authParams.Username = username; authParams.Password = password; if (Account.AuthenticateUser(authParams) > 0) { Object resObj = new Object(); resObj = Account.Result(authParams); frmMain open = new frmMain(); open.ShowDialog(); } } else { MessageBox.Show("Fields missing!!!"); } }
public static Authenticates Result(Authenticates.CriteriaInfo criteriaInfo) { Authenticates authenticate = Authenticates.GetData(criteriaInfo); return(authenticate); }