Exemplo n.º 1
0
        public bool PutScheduling(int scheduleId, int ObjectId, string ScheduleTime, int CommandID)
        {
            var _object = new
            {
                ObjectId     = ObjectId,
                ScheduleTime = ScheduleTime,
                CommandID    = CommandID
            };
            var    url    = "api/Scheduling/" + scheduleId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 2
0
        public bool PutHolidayScheduling(int HolidayID, bool Enabled)
        {
            var _object = new
            {
                Enabled = Enabled
            };
            var    url    = "api/HolidayScheduling/" + HolidayID;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 3
0
        public bool PutFeature(int LoginFeatureID, bool Enable)
        {
            var _object = new
            {
                Enable = Enable
            };
            var    url    = "api/LoginFeature/" + LoginFeatureID;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
        public bool PutAlertState(int CommandHistoryId)
        {
            var _object = new
            {
                AlertState = 1
            };
            var    url    = "api/CommandHistory/" + CommandHistoryId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 5
0
        public bool PutObjectGroup(int ObjectGroupId, string ObjectId, string groupId)
        {
            var _object = new
            {
                ObjectId = ObjectId,
                GroupId  = groupId
            };
            var    url    = "api/ObjectGroup/" + ObjectGroupId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 6
0
        public bool PutLoginGroup(int LoginGroupId, string groupId, string LoginId)
        {
            var _object = new
            {
                GroupId = groupId,
                LoginId = LoginId
            };
            var    url    = "api/LoginGroup/" + LoginGroupId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 7
0
        public bool PutFeature(int FeatureID, string Name, string Description)
        {
            var _object = new
            {
                Name        = Name,
                Description = Description
            };
            var    url    = "api/Feature/" + FeatureID;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 8
0
        public bool PutGroup(int groupId, string clientId, string name, string comment)
        {
            var _object = new
            {
                ClientID = Convert.ToInt32(clientId),
                Name     = name,
                Comment  = comment
            };
            var    url    = "api/Group/" + groupId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 9
0
        public bool PutSensor(int SensorId, string SourceID, string SourceName, string Unit, bool EnableOrDisable)
        {
            var _object = new
            {
                SourceID        = SourceID,
                SourceName      = SourceName,
                Unit            = Unit,
                EnableOrDisable = EnableOrDisable
            };
            var    url    = "api/Sensor/" + SensorId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 10
0
        public bool PutLogin(int loginId, string clientId, string roleId, string username, string comments, string password)
        {
            var _object = new
            {
                ClientID = Convert.ToInt32(clientId),
                RoleID   = Convert.ToInt32(roleId),
                User     = username,
                Comment  = comments,
                Password = password
            };
            var    url    = "api/Login/" + loginId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 11
0
        public bool PutObjectSensor(int ObjectSensorId, string sensorsId, string objectId, string name, bool enabled, bool smsalert, bool emailalert, string max, string min, string categoryID)
        {
            var _object = new
            {
                SensorID   = Convert.ToInt32(sensorsId),
                ObjectID   = Convert.ToInt32(objectId),
                Name       = name,
                Enabled    = Convert.ToBoolean(enabled),
                SMSAlert   = Convert.ToBoolean(smsalert),
                EmailAlert = Convert.ToBoolean(emailalert),
                MAX        = Convert.ToInt32(max),
                MIN        = Convert.ToInt32(min),
                CategoryID = Convert.ToInt32(categoryID)
            };
            var    url    = "api/ObjectSensors/" + ObjectSensorId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 12
0
        public bool PutClient(int ClientId, string name, string address, int operatorId, string contact, string code, bool enabled, string email, string expireDate, bool deleted)
        {
            var _object = new
            {
                Name       = name,
                Address    = address,
                OperatorID = operatorId,
                Contact    = contact,
                Code       = code,
                Enabled    = enabled,
                Email      = email,
                ExpireDate = expireDate,
                Deleted    = deleted
            };
            var    url    = "api/Client/" + ClientId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
        public bool PutEventConfiguration(int ECId, int ObjectSensorID, int ObjectID, double Min, double Max, int Condition, string Source, string Source2, string Source3, bool EnableOrDisable)
        {
            var _object = new
            {
                ObjectSensorID  = ObjectSensorID,
                ObjectID        = ObjectID,
                Min             = Min,
                MAX             = Max,
                Condition       = Condition,
                Source          = Source,
                Source2         = Source2,
                Source3         = Source3,
                EnableOrDisable = EnableOrDisable
            };
            var    url    = "api/EventConfiguration/" + ECId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }
Exemplo n.º 14
0
        public bool PutObject(int ObjectId, string name, string address, string lat, string lon, string imei, string simnumber, string firmwareversion, string hardwareversion, bool enabdisab, string clientid, string contact1, bool chkRelaySt)
        {
            var _object = new
            {
                Name            = name,
                Address         = address,
                LAT             = Convert.ToDecimal(lat),
                LONG            = Convert.ToDecimal(lon),
                IMEI            = Convert.ToInt64(imei),
                SimNumber       = Convert.ToInt64(simnumber),
                FirmWareVersion = firmwareversion,
                HardwareVersion = hardwareversion,
                EnableOrDisable = enabdisab,
                ClientID        = Convert.ToInt32(clientid),

                RelayStatus = chkRelaySt,
            };
            var    url    = "api/Object/" + ObjectId;
            string result = SC.PutCaller(url, _object);
            bool   Status = Convert.ToBoolean(result);

            return(Status);
        }