public bool Login(string login, string password) { if (IsValidUser(login, password)) { ApplicationState.CurrentUser = DbCommunication.GetUser(login); return(true); } return(false); }
public string GetPasswordByUser(string login) { if (string.IsNullOrWhiteSpace(login)) { return(string.Empty); } DataTable dataTable = DbCommunication.PullData(login); if (dataTable.Rows.Count == 0) { return(string.Empty); } int firtstRowIndex = 0; int passwordColumnIndex = 0; return(dataTable.Rows[firtstRowIndex][passwordColumnIndex].ToString()); }
private void button1_Click(object sender, EventArgs e) { DbCommunication.CreateUser(null, null); }