Esempio n. 1
0
        private string getExcuseTypes()
        {
            string methodName = "getExcuseTypes()";

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string result = result = Retriever.getAllExcuseType();

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 2
0
        private bool getIsAllAccess(string mac)
        {
            string methodName = string.Format("getIsAllAccess({0})", mac);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            bool result = Retriever.allAccess(mac);

            LogHelper.DebugFormat("{0}.{1}:--- {2} ---", className, methodName, result.ToString());
            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 3
0
        public string getUsersMacs(string mac)
        {
            string methodName = String.Format("getUsersMacs({0})", mac);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string result = "";

            result = Retriever.getUsersMacs(mac);

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 4
0
        private string getWifiLists(string mac)
        {
            string methodName = string.Format("getWifiLists({0})", mac);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string result = "";

            result = Retriever.getWifiList(mac);

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 5
0
        private string resetPassword(string mac)
        {
            string methodName = string.Format("resetPassword({0})", mac);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string result = "";

            result = Retriever.resetPassword(mac);

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 6
0
        private string updatePaasword(string mac, string old_pass, string new_pass)
        {
            string methodName = string.Format("updatePaasword({0})", mac);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string result = "";

            result = Retriever.updatePassword(mac, old_pass, new_pass);

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 7
0
        private string Login(string ip, string mac)
        {
            string methodName = "Login()";

            log.DebugFormat("------------START---{0}-{1}-({2})-----------", className, methodName, "");

            int    res    = 0;// Absen.Login(mac, ip);
            string result = res.ToString();

            result = Retriever.RetrieveLoginData(mac, ip);

            log.DebugFormat("------------END---{0}-{1}-({2})-----------", className, methodName, result);
            return(result);
        }
Esempio n. 8
0
        private string RetrieveExcuse(string macAdds, string from_date, string to_date, string approve, string excuse_type)
        {
            string methodName = "Login()";

            log.DebugFormat("------------START---{0}-{1}-({2})-----------", className, methodName, "");

            string result = "";

            var fdate = DateTime.Parse(from_date);
            var tdate = DateTime.Parse(to_date);

            result = Retriever.pendingApproval(macAdds, fdate, tdate, approve, excuse_type);
            log.DebugFormat("------------END---{0}-{1}-({2})-----------", className, methodName, result);

            return(result);
        }
Esempio n. 9
0
        private string getExcuseTypes()
        {
            string methodName = "getExcuseTypes()";

            log.DebugFormat("------------START---{0}-{1}-({2})-----------", className, methodName, "");

            string result = "";

            try {
                result = Retriever.getAllExcuseType();
            }catch (Exception ex) {
                log.Error(ex);
            }

            log.DebugFormat("------------END---{0}-{1}-({2})-----------", className, methodName, result);
            return(result);
        }
Esempio n. 10
0
        private string getDeviceLog(string mac_list, string from_date, string to_date)
        {
            string methodName = string.Format("getMonthlyReport({0},{1},{2})", mac_list, from_date, to_date);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string   result = "";
            DateTime f_date = DateTime.MinValue;
            DateTime t_date = DateTime.MinValue;

            if (DateTime.TryParse(from_date, out f_date) && DateTime.TryParse(from_date, out t_date))
            {
                result = Retriever.getDeviceLog(mac_list, f_date, t_date);
            }

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 11
0
        private string retrieveExcuse(string mac, string from_date, string to_date, string approve, string reason_type)
        {
            string methodName = string.Format("retrieveExcuse({0},{1},{2})", mac, from_date, to_date);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            string   result = "";
            DateTime f_date = DateTime.MinValue;
            DateTime t_date = DateTime.MinValue;

            if (DateTime.TryParse(from_date, out f_date) && DateTime.TryParse(to_date, out t_date))
            {
                result = Retriever.pendingApproval(mac, f_date, t_date, approve, reason_type);
            }

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 12
0
        private string login(string ip, string mac, string longitude, string latitude)
        {
            string methodName = string.Format("login({0},{1},{2},{3})", mac, ip, longitude, latitude);

            LogHelper.DebugFormat("{0}.{1}:--- start ---", className, methodName);

            double lon = 0.0;
            double lat = 0.0;

            double.TryParse(longitude, out lon);
            double.TryParse(latitude, out lat);
            int    res    = new Absen().Login(mac, ip, lon, lat);
            string result = res.ToString();

            result = Retriever.RetrieveLoginData(mac, ip);

            LogHelper.DebugFormat("{0}.{1}:--- end ---", className, methodName);
            return(result);
        }
Esempio n. 13
0
        private string getDeviceLog(string mac_list, string from, string to)
        {
            string methodName = "getDeviceLog()";

            log.DebugFormat("------------START---{0}-{1}-({2})-----------", className, methodName, "");

            string result = "";

            try
            {
                DateTime fdate = DateTime.Parse(from);
                DateTime tdate = DateTime.Parse(to);

                result = Retriever.getDeviceLog(mac_list, fdate, tdate);
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }

            log.DebugFormat("------------END---{0}-{1}-({2})-----------", className, methodName, result);
            return(result);
        }
Esempio n. 14
0
        private string getDailyReport(string mac, string from, string to, string mac_list, string type_list, string status_list)
        {
            string methodName = "getExcuseTypes()";

            log.DebugFormat("------------START---{0}-{1}-({2})-----------", className, methodName, "");

            string result = "";

            try
            {
                DateTime fdate = DateTime.Parse(from);
                DateTime tdate = DateTime.Parse(to);

                result = Retriever.getDailyReport(mac, fdate, tdate, mac_list, type_list, status_list);
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }

            log.DebugFormat("------------END---{0}-{1}-({2})-----------", className, methodName, result);
            return(result);
        }