public bool ValidateBeforeAssignPatrol(long notificationId, long patrolId) { var patrols = new PatrolsDAL().GetAssignedPatrolsByNotificationId(notificationId); if (patrols == null) { return(true); } var patrol = patrols.Where(x => x.PatrolId == patrolId).FirstOrDefault(); if (patrol == null) { return(true); } return(false); }
private List <PatrolLastLocationDTO> GetUpdated() { try { PatrolsDAL patrolsDAL = new PatrolsDAL(); return(patrolsDAL.GetUpdatedPatrolsList(false)); } catch (Exception ex) { string lines = "Getting Data Exc:" + ex.Message; // Write the string to a file. // System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\test.txt"); //file.WriteLine(lines); //file.Close(); // Use Elmah To Record Exception Here } return(null); }