private int _SaveTrackPoints(DataTable _dtTrkpts, int studentuploadid) { _dtTrkpts.Columns.Add("StudId"); _dtTrkpts.Columns.Add("StudUploadId"); _dtTrkpts.Columns["time"].ColumnName = "TrackTime"; for (int i = 0; i < _dtTrkpts.Rows.Count; i++) { _dtTrkpts.Rows[i]["StudId"] = Convert.ToInt32(Session["UserId"]); _dtTrkpts.Rows[i]["StudUploadId"] = studentuploadid; } _dtTrkpts.Columns["StudId"].SetOrdinal(0); _dtTrkpts.Columns["StudUploadId"].SetOrdinal(1); _dtTrkpts.Columns["ele"].SetOrdinal(2); _dtTrkpts.Columns["TrackTime"].SetOrdinal(3); _dtTrkpts.Columns["lat"].SetOrdinal(4); _dtTrkpts.Columns["lon"].SetOrdinal(5); _dtTrkpts.Columns["TrkSeg_Id"].SetOrdinal(6); DataTable _newTable; _newTable = CloneDataTableForGPXUpload(_dtTrkpts); return(objStudent.InsertGpxTrackPoints(_newTable)); }