Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public DataTable GetDataByColumn(string columnName)
 {
     string strQuery = "SELECT "+columnName+ " FROM [dbo].[EmployeeDetails]";
     objSQL = new SQL();
     return objSQL.GetData(strQuery);
 }
Esempio n. 3
0
 public DataTable GetDataWithWhere(string type, string keyword)
 {
     string strQuery = "SELECT * FROM [dbo].[EmployeeDetails] WHERE " + type + "= "+"'" + keyword + "'";
     objSQL = new SQL();
     return objSQL.GetData(strQuery);
 }
Esempio n. 4
0
 public DataTable GetData()
 {
     string strQuery = "SELECT * FROM [dbo].[EmployeeDetails]";
     objSQL = new SQL();
     return objSQL.GetData(strQuery);
 }