protected void Page_Load(object sender, EventArgs e) { Response.Write("Hello World New to test constr"); PMDIApi di = new PMDIApi(); OdbcConnection con = new OdbcConnection(); con.ConnectionString = di.constr; try { con.Open(); } catch (Exception ex) { Response.Write(ex.Message); } finally { ////if (con.State == ConnectionState.Open) con.Close(); } DataTable dt = di.DataService.getDataTable("SELECT * FROM \"@ACPM_INT_USR\" where \"Code\" = 'ExternApp' AND \"U_APIKey\" ='Xui==sx908sx!='"); if (dt != null && dt.Rows.Count > 0) { Response.Write("User FOund"); } else { Response.Write("User not found"); } Response.Write(di.constr); }
// TODO: Here is where you would validate the username and password. private static bool CheckPassword(string username, string password) { bool result = false; PMDIApi DIApi = new PMDIApi(); string clientIP = HttpContext.Current.Request.UserHostAddress; DataTable dt = DIApi.DataService.getDataTable("SELECT * FROM \"@ACPM_INT_USR\" where \"Code\" = '" + username + "' AND \"U_APIKey\" ='" + password + "'"); if (dt.Rows.Count > 0) { result = true; } return(result); }