public static bool checkApplicationLogin(string loginName, string loginPassword)
        {
            int userId = 0;

            // open db..
            cData db = new cData();

            db.openDB();

            userId = db.getUserIDFromLogin(loginName, loginPassword, "application");
            loadUser(userId);

            // audit trail..
            if (userId == 0)
            {
                db.auditEvent(cConstants.eventUserLoginFailed, 0, loginName);  // login failed..
            }
            else
            {
                db.auditEvent(cConstants.eventUserLogin, 0, "Application Login"); // login successful
            }
            db.closeDB();                                                         // cleanup

            return(userId != 0);
        }
        public static int checkMobileLogin(string loginName, string loginPassword)
        {
            int userId = 0;

            // open db..
            cData db = new cData();

            db.openDB();

            userId = db.getUserIDFromLogin(loginName, loginPassword, "application");



            db.closeDB();   // cleanup

            return(userId);
        }