Пример #1
0
        private void tsb_GenMap_Click(object sender, EventArgs e)
        {
            CoScheduling.Core.Model.SatelliteResault        satelliteResault        = new CoScheduling.Core.Model.SatelliteResault();
            CoScheduling.Core.Model.ImgLayoutTempTimewindow imgLayoutTempTimewindow = new CoScheduling.Core.Model.ImgLayoutTempTimewindow();
            CoScheduling.Core.DAL.DisaAreaInfo dal_disAreaInfo = new CoScheduling.Core.DAL.DisaAreaInfo();


            List <CoScheduling.Core.Model.ImgLayoutTempTimewindow> list = dal_imgLayoutTempTimewindow.GetListByCondition(strwhere);

            if (dal_satelliteResault.ExistsResault(schemeidInt))//先判断是已经存在,如果结果已经存在就不需要再做了
            {
                dal_satelliteResault.DeleteBySchemeID(schemeidInt);
            }

            //转存到SQL Server中
            for (int i = 0; i < list.Count; i++)
            {
                imgLayoutTempTimewindow        = list[i];
                satelliteResault.LSTR_SEQID    = Convert.ToInt32(imgLayoutTempTimewindow.LSTR_SEQID);
                satelliteResault.SCHEMEID      = Convert.ToInt32(imgLayoutTempTimewindow.SCHEMEID);
                satelliteResault.TASKID        = Convert.ToInt32(imgLayoutTempTimewindow.TASKID);
                satelliteResault.PID           = dal_disAreaInfo.GetMaxId();
                satelliteResault.POLYGONSTRING = imgLayoutTempTimewindow.IMAGEREGION;
                satelliteResault.STARTTIME     = imgLayoutTempTimewindow.STARTTIME;
                satelliteResault.ENDTIME       = imgLayoutTempTimewindow.ENDTIME;
                #region c++程序问题处理

                #endregion
                dal_satelliteResault.Add(satelliteResault);
            }
            Main.Program.ShowFormSatelliteResault();        //加载卫星观测结果列表
            MessageBox.Show("地图生成成功!在左侧卫星规划结果选择查看");
            dataRefresh();
        }
Пример #2
0
        /// <summary>
        /// 加载单个任务区 根据任务区实体类加载
        /// </summary>
        /// <param name="map"></param>
        /// <param name="model"></param>
        public static void LoadSatelliteResaultArea(Core.Map.MapHelper map, Core.Model.SatelliteResault model)
        {
            CoScheduling.Core.Model.ImgLayoutTempTimewindow img     = new CoScheduling.Core.Model.ImgLayoutTempTimewindow();
            CoScheduling.Core.DAL.ImgLayoutTempTimewindow   dal_img = new CoScheduling.Core.DAL.ImgLayoutTempTimewindow();
            img = dal_img.GetModel(model.LSTR_SEQID.ToString());
            ISymbol  symbol   = map.CreateSimpleFillSymbol(Color.Blue, 1, esriSimpleFillStyle.esriSFSHollow);
            IPolygon pPolygon = Core.Generic.Convertor.ToPolygon(model.POLYGONSTRING);

            SatelliteResaultAreas = new List <IPolygon>();
            SatelliteResaultAreas.Add(pPolygon);
            //添加任务区多边形
            map.AddElement(pPolygon, symbol, "TaskArea");
            map.AddElement(pPolygon, symbol, "SatResaultInfo|" + img.LSTR_SEQID);
            //map.AddTextElement(pPolygon, getTextElement(img.SAT_STKNAME+"/"+img.SENSOR_STKNAME), "TaskAreaMark");
        }
Пример #3
0
        /// <summary>
        /// 根据LSTR_SEQID获取卫星观测结果实体类
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public CoScheduling.Core.Model.ImgLayoutTempTimewindow GetModel(string id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from LHF.IMG_LAYOUT_TEMPTIMEWINDOW ");
            strSql.Append(" where LSTR_SEQID=" + id);
            using (DbDataReader dr = DbHelperSQL.ExecuteReader(strSql.ToString()))
            {
                CoScheduling.Core.Model.ImgLayoutTempTimewindow model = new CoScheduling.Core.Model.ImgLayoutTempTimewindow();
                if (dr.Read())
                {
                    model = GetModel(dr);
                }
                dr.Close();
                return(model);
            }
        }