Ejemplo n.º 1
0
 public string UpdateData(string policeIDs, string CIDs)
 {
     int[] pids = Strings.ParseToArray <int>(policeIDs, new char[] { ',' });
     for (int i = 0; i < pids.Length; i++)
     {
         GoupCoordinate a = new GoupCoordinate();
         a.ArraginID  = pids[i];
         a.PointArray = CIDs;
         a.GoupUseful = 1;
         a.Interval   = "";
         a.IsDisabled = true;
         GoupCoordinate.Insert(a);
     }
     return("policeIDs=" + policeIDs + " CIDs=" + CIDs);
 }
        public string UpdateData(int policeID, int culpritID, string CIDs)
        {
            GoupCoordinate a = new GoupCoordinate();

            a.ArraginID  = policeID;
            a.PrisonerID = culpritID;
            a.PointArray = GoupCoordinate.GetArrayPointsByIdandPos(culpritID, Convert.ToInt32(CIDs));
            /////////
            //HostTag host = HostTag.GetById(culpritID);
            //int roomId = CulpritRoomReference.GetRoomIdByCulpritId(culpritID);//根据hostID获取犯人所在的监舍的ID
            //IList<MapAreaCoverage> tempCoordinates = MapAreaCoverage.SelectByAreaId(roomId);
            //int stPoint = Coordinates.GetParentIdById(tempCoordinates[0].CoordinatesId);
            //int endPoint = Convert.ToInt32(CIDs);
            //IList<NeighborRoute> all = NeighborRoute.All;
            //NeighborRoute neiroute = new NeighborRoute();
            //List<int> listPoint = new List<int>();
            //List<int> listNeighPoint = new List<int>();
            //neiroute = all.SingleOrDefault(b => b.EndPoint1 == stPoint && b.EndPoint2 == endPoint);
            //if (neiroute != null)
            //{
            //    listPoint.Add(stPoint);

            //    string[] arr = neiroute.PointArray.ToString().Split(',');
            //    foreach (string item in arr)
            //    {
            //        listPoint.Add(Convert.ToInt32(item));
            //    }

            //}

            //for (int i = 0; i < listPoint.Count; i++)
            //{
            //    foreach (MapRoute t in FindoutNeighPoint(listPoint[i]))
            //    {
            //        if (!listNeighPoint.Contains(t.Endpoint1) && !listPoint.Contains(t.Endpoint1))
            //        {
            //            listNeighPoint.Add(t.Endpoint1);
            //        }
            //        if (!listNeighPoint.Contains(t.Endpoint2) && !listPoint.Contains(t.Endpoint2))
            //        {
            //            listNeighPoint.Add(t.Endpoint2);
            //        }
            //    }
            //}
            //string arr1 = "";
            //string arr2 = "";
            //int x = 0;
            //foreach (int p in listPoint)
            //{
            //    if (x == 0) arr1 = p.ToString();
            //    else
            //        arr1 += "," + p.ToString();
            //    x++;
            //}
            //int j = 0;
            //foreach (int p in listNeighPoint)
            //{
            //    if (j == 0) arr2 = p.ToString();
            //    else
            //        arr2 += "," + p.ToString();
            //    j++;
            //}
            ///////////////////
            //a.PointArray = arr1 + ',' + arr2;
            a.GoupUseful = 2;
            a.Interval   = "";
            a.IsDisabled = true;
            GoupCoordinate.Insert(a);

            return("policeID=" + policeID + " culpritID=" + culpritID + " CIDs=" + CIDs);
        }
 public static bool DeleteData(int id)
 {
     GoupCoordinate.DeleteById(id);
     return(true);
 }