public bool IsValidUser() { string strQuery = "SELECT * FROM [dbo].[EmployeeDetails] WHERE UserName = '******' and Pass_word = '" + strPass_word + "'"; objSQL = new SQL(); DataTable dtUserInformation = new DataTable(); dtUserInformation = objSQL.GetData(strQuery); bool bValid = false; if (dtUserInformation != null) { if (dtUserInformation.Rows.Count > 0) { bValid = true; } } return bValid; }
public DataTable GetDataByColumn(string columnName) { string strQuery = "SELECT "+columnName+ " FROM [dbo].[EmployeeDetails]"; objSQL = new SQL(); return objSQL.GetData(strQuery); }
public DataTable GetDataWithWhere(string type, string keyword) { string strQuery = "SELECT * FROM [dbo].[EmployeeDetails] WHERE " + type + "= "+"'" + keyword + "'"; objSQL = new SQL(); return objSQL.GetData(strQuery); }
public DataTable GetData() { string strQuery = "SELECT * FROM [dbo].[EmployeeDetails]"; objSQL = new SQL(); return objSQL.GetData(strQuery); }