public NotifiedAlertViolatorDetailsUserControlViewModel(SupervisorNotificationDTO supervisorNotificationDTO)
        {
            _supervisorNotificationDTO = supervisorNotificationDTO;
            _ADPUTSclient = new ADPUTSServiceClient();
            client        = new ServiceLayerClient();

            if (supervisorNotificationDTO.DangerousViolatorDetails != null && !string.IsNullOrEmpty(supervisorNotificationDTO.DangerousViolatorDetails.PlateNumber))
            {
                GetDangerousVehicleDetails(supervisorNotificationDTO.DangerousViolatorDetails.PlateNumber);
            }


            GetLicenseDetails();
            GetTrafficProfile();


            if (supervisorNotificationDTO.DangerousViolatorDetails != null && supervisorNotificationDTO.DangerousViolatorDetails.BusinessRuleId != null)
            {
                GetBusinessRuleName(Convert.ToInt32(supervisorNotificationDTO.DangerousViolatorDetails.BusinessRuleId));
            }

            if (supervisorNotificationDTO.DangerousViolatorDetails != null && !string.IsNullOrEmpty(supervisorNotificationDTO.DangerousViolatorDetails.MediaURL))
            {
                IsAttachmentAvailable = true;
            }

            GetVehicleDetails();

            _violatorDetailsExpanded = true;
        }
        private void GetAllTowersAroundPoint()
        {
            var client = new ServiceLayerClient();
            var task   = client.GetNearByTowersByLatLonAsync(Longitude, Latitude);
            var obs    = task.ToObservable();

            obs.Subscribe((x) => AddNearTowers(x == null ? new List <AssetsViewDTO>() : x.ToList()));
        }
        public AlertOperationRoomViewModel()
        {
            client = new ServiceLayerClient();

            //DangerousVehicleDetailsDTOobj = new DangerousVehicleDetailsDTO();

            //GetDangerousVehicleDetails("1234");
        }
示例#4
0
        private void GetAllTowerCameras(long TowerId)
        {
            var client = new ServiceLayerClient();
            var task   = client.GetAllTowerCamerasAsync(TowerId);
            var obs    = task.ToObservable();

            obs.Subscribe((x) => AddNearCameras(x == null ? new List <AssetsDetailsViewDTO>() : x.ToList()));
        }
 public ViolationItemDetailsViewModel()
 {
     //PlateNumber = plateNum;
     adpUTSclient = new ADPUTSServiceClient();
     _client      = new ServiceLayerClient();
     //_activeIndex = -1;
     LoadData();
 }
        private void GetAllCamerasAroundPoint()
        {
            var client = new ServiceLayerClient();
            var task   = client.GetNearByCamerasByLatLonAsync(GeneralLocation.Longitude, GeneralLocation.Latitude);
            var obs    = task.ToObservable();

            obs.Subscribe((x) => AddNearCameras(x == null ? new List <AssetsViewDTO>() : x.ToList()));
        }
        private void GetAllPatrolsAroundPoint()
        {
            var client = new ServiceLayerClient();

            var task = client.GetNearByPatrolsByLatLonAsync(Longitude, Latitude, 5);
            var obs  = task.ToObservable();

            obs.Subscribe((x) => AddNearPatrols(x == null ? new List <PatrolLastLocationDTO>() : x.ToList()));
        }
示例#8
0
        public AlertUserControlViewModel(SupervisorNotificationDTO supervisorNotificationDTO)
        {
            client = new ServiceLayerClient();
            _supervisorNotificationDTO = supervisorNotificationDTO;

            if (_supervisorNotificationDTO != null && _supervisorNotificationDTO.ResponseToId == null)
            {
                GetUserName(_supervisorNotificationDTO.SenderId);
            }
        }
        public AssignedPatrolsViewModel()
        {
            AssignedPatrols = new ObservableCollection <PatrolDTO>();

            client    = new ServiceLayerClient();
            tfmClient = new TFMIntegrationServiceClient();

            ShowVideoCommand = new Command(ShowVideo);
            ShowImageCommand = new Command(ShowImage);
        }
        private void GetAllCamerasAroundPoint()
        {
            //get values here
            var client = new ServiceLayerClient();
            var task   = client.GetNearByCamerasByLatLonAsync(Longitude, Latitude);
            var obs    = task.ToObservable();

            obs.Subscribe((x) => AddNearCameras(x == null ? new List <AssetsViewDTO>() : x.ToList()));
            //return new ObservableCollection<AssetsViewDTO>();
        }
示例#11
0
        //internal void GetIncidentSOP(dynamic Incident)
        //{
        //    if (Incident != null && Incident.Latitude != null && Incident.Longitude != null && Incident.CreatedTime != null) {
        //        SopSource = new SOPModel {
        //            Text = Incident.MessageText,
        //            Date = Incident.CreatedTime,
        //            Latitude = Incident.Latitude,
        //            Longitude = Incident.Longitude
        //        };
        //    }
        //    else
        //        SopSource = null;

        //    ServiceLayerReference.ServiceLayerClient _client = new ServiceLayerReference.ServiceLayerClient();

        //    var lstSopAsync = _client.GetMessageTypeSOPAsync("IncidentSOPMessages");

        //    var obs = lstSopAsync.ToObservable();
        //    obs.Subscribe((x) => AddNewSOP(x == null ? null : x.ToList()));

        //}

        //internal void GetViolationSOP(dynamic Violation)
        //{
        //    if (Violation != null && Violation.Latitude != null && Violation.Longitude != null) {
        //        SopSource = new SOPModel {
        //            Text = Violation.MessageText,
        //            Date = Violation.DateTaken,
        //            Latitude = Violation.Latitude,
        //            Longitude = Violation.Longitude
        //        };
        //    }
        //    else
        //        SopSource = null;

        //    ServiceLayerReference.ServiceLayerClient _client = new ServiceLayerReference.ServiceLayerClient();

        //    var lstSopAsync = _client.GetMessageTypeSOPAsync("ViolationSOPMessages");

        //    var obs = lstSopAsync.ToObservable();
        //    obs.Subscribe((x) => AddNewSOP(x == null ? null : x.ToList()));
        //}

        public void SaveSopStep(int sopStepId, int userId)
        {
            try
            {
                var client = new ServiceLayerClient();
                client.SaveSOPNotificationLogAsync(sopStepId, _currentMessage.NotificationId, null, userId, "", "");
            }
            catch (Exception ex)
            {
            }
        }
        public void GetAssignedPatrols()
        {
            var _client = new ServiceLayerClient();

            AssignedPatrols.Clear();
            var patrols = _client.GetAssignedPatrols(NotificationId);

            foreach (var assignedPatrol in patrols)
            {
                AssignedPatrols.Add(assignedPatrol);
            }

            GetImagesAndVideosForAssignedPatrols();
        }
示例#13
0
        public UpdateAdminPageControlViewModel(BusinessRulesDTO businessRulesDto)
        {
            _businessRulesDTO = businessRulesDto;

            PriorityTypesList      = new ObservableCollection <BusinessRulePriorityDTO>();
            OverSpeedList          = new ObservableCollection <OverSpeedDTO>();
            TrafficCrossList       = new ObservableCollection <TrafficCrossDTO>();
            VehicleTypesList       = new ObservableCollection <VehicleTypeDTO>();
            _client                = new ServiceLayerClient();
            AddBusinessRuleCommand = new Command(SaveBusinessRule);
            LoadData();

            SetSelectedRuleDetails();

            IsUpdateGridEnabled = true;
            //IsRuleEnabled = true;
        }
        public AdminPageControlViewModel()
        {
            PriorityTypesList      = new ObservableCollection <BusinessRulePriorityDTO>();
            OverSpeedList          = new ObservableCollection <OverSpeedDTO>();
            TrafficCrossList       = new ObservableCollection <TrafficCrossDTO>();
            VehicleTypesList       = new ObservableCollection <VehicleTypeDTO>();
            _client                = new ServiceLayerClient();
            AddBusinessRuleCommand = new Command(SaveBusinessRule);
            IsAddGridEnabled       = true;

            NumOfViolnsInCity            = 1;
            NumOfViolnsOutCity           = 1;
            RedLgtCrosngNumOfViolnsValue = 1;
            RuleIntTimeValue             = 1;

            LoadData();
        }
示例#15
0
        public AlertNotificationMapViewModel()
        {
            LayersGraphicsDictionary = new Dictionary <string, ObservableCollection <Graphic> >();

            _client = new ServiceLayerClient();

            NotificationsListHeaderCount = " (0)";

            GetSuperVisorID();

            LoadData();


            SupervisorNotifications = new ObservableCollection <SupervisorNotificationDTO>();

            if (System.Configuration.ConfigurationSettings.AppSettings["ProcessMockData"] != null && System.Configuration.ConfigurationSettings.AppSettings["ProcessMockData"] == "Y")
            {
                LoadSampleData();
            }
        }
        public DagerousViolatorDetailsUserControlViewModel()
        {
            adpUTSclient = new ADPUTSServiceClient();
            client       = new ServiceLayerClient();

            ShowVideoCommand = new Command(ShowVideo);
            ShowImageCommand = new Command(ShowImage);

            //ImagePoupVM = new ImagePopupViewModel();

            //DangerousVehicleDetails = new DangerousVehicleDetailsDTO();
            //VehicleDetailResponse = new ADPUTSserviceReference.VehicleDetailsResponse();

            //GetDangerousVehicleDetails(vehicleResp.PlateInfo.PlateNo);
            _violatorDetailsExpanded = true;



            //ImagePoupVM = new ImagePopupViewModel();

            //this.PlateNumber="1234";
            //GetDangerousVehicleDetails(this.PlateNumber);
        }
示例#17
0
        internal void GetSOP(SOPGeneralMessage Message)
        {
            if (Message.OriginalObject == null)
            {
                IsExpanded = false;
                IsEnabled  = false;

                return;
            }

            _currentMessage = Message;

            MessageId = Message.MessageId;
            var msgId = 0;

            int.TryParse(Message.MessageId, out msgId);
            ServiceLayerClient _client = new ServiceLayerClient();

            var lstSopAsync = _client.GetMessageTypeSOPsAsync((int)Message.GeneralType, msgId);

            var obs = lstSopAsync.ToObservable();

            obs.Subscribe((x) => AddNewSOP(x == null ? null : x.ToList()));
        }
示例#18
0
        public ObservableCollection <PatrolDTO> GetAssignedPatrols(long eventId)
        {
            var _client = new ServiceLayerClient();

            return(new ObservableCollection <PatrolDTO>((_client.GetAssignedPatrols(eventId)).ToList()));
        }