コード例 #1
0
        public bool SignInToClass(string studentNumber, int classID, decimal longitude, decimal latitude)
        {
            var login = new GPS_Login()
            {
                GPS_LoginID      = 0,
                Longitude        = longitude,
                Latitude         = latitude,
                LoginDateAndTime = DateTime.Now
            };
            bool result;
            bool specified;

            _studentClient.StudentAttendedClass(studentNumber, classID, true, Serializers <GPS_Login> .Serialize(login), out result, out specified);

            return(result);
        }
コード例 #2
0
        public bool StudentAttendedClass(string studentNumber, int classID, decimal longitude, decimal latitiude)
        {
            bool result = false;
            bool status = false;

            try
            {
                GPS_Login login = new GPS_Login()
                {
                    LoginDateAndTime = DateTime.Now.Date,
                    Longitude        = longitude,
                    Latitude         = latitiude,
                };

                var loginStr = Serializers <GPS_Login> .Serialize(login);

                _client.StudentAttendedClass(studentNumber, classID, true, loginStr, out result, out status);
            }
            catch (Exception ex)
            {
                //TODO add log4net and
            }
            return(result);
        }