private void SetDataToForm() { if (gridVietTatTenDuong.SelectedItems != null && gridVietTatTenDuong.SelectedItems.Count > 0 && gridVietTatTenDuong.SelectedItems[0].RowType == Janus.Windows.GridEX.RowType.Record) { objRoad = (clsPOIEntity)((GridEXSelectedItem)gridVietTatTenDuong.SelectedItems[0]).GetRow().DataRow; txtNameVN.Text = objRoad.NameVN; txtVietTat.Text = objRoad.VietTat; MainMap.AddMarkerBlueCircle(objRoad.ViDo, objRoad.KinhDo); } }
private clsPOIEntity SelectPOI(IDataReader dr, bool firstLoad) { clsPOIEntity obj = new clsPOIEntity(); obj.ID = (dr["ID"] == DBNull.Value) ? 0 : int.Parse(dr["ID"].ToString()); obj.NameVN = dr["NameVN"].ToString(); obj.VietTat = dr["VietTat"].ToString(); obj.Type = (dr["Type"] == DBNull.Value) ? 0 : int.Parse(dr["Type"].ToString()); obj.KinhDo = float.Parse(dr["KinhDo"].ToString()); obj.ViDo = float.Parse(dr["ViDo"].ToString()); return(obj); }