|
|
|
ช่วยอธิบายโค้ดนี้หน่อยนะคะ ว่าทำงานยังไงกำลังฝึกเขียนจะเอามาแก้แต่ไม่เข้าใจค่ะ |
|
|
|
|
|
|
|
Code (C#)
protected void cbpCalculateTime_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
{
String[] param= e.Parameter.Split(new char[] { '/' });
String[] place = new String[]{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"};
String[] temp = param[0].Split(new char[] { ',' });
List<TourPlanLib.PlaceVO> places1 = (List<TourPlanLib.PlaceVO>)Session["plan_place"];
List<TourPlanLib.PlaceVO> placesSorted = new List<TourPlanLib.PlaceVO>();
String[] latLOns = param[1].Split(new char[] { ',' });
for (int ii = 0; ii < latLOns.Length; ii++)
{
if (latLOns[ii].Length == 0) continue;
String[] lat_Lon = latLOns[ii].Split(new char[] { '-' });
for (int j = 0;j < places1.Count; j++)
{
if (lat_Lon[0].Equals(places1[j].Place.Lat.ToString()) && lat_Lon[1].Equals(places1[j].Place.Lon.ToString()))
{
placesSorted.Add(places1[j]);
break;
}
}
}
Tag : .NET, Web (ASP.NET), C#
|
|
|
|
|
|
Date :
2011-05-23 10:40:52 |
By :
หมูแดง |
View :
987 |
Reply :
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|