|
@@ -47,7 +47,7 @@ namespace XdCxRhDW.App.UserControl
|
|
|
public partial class CtrlHome : DevExpress.XtraEditors.XtraUserControl
|
|
|
{
|
|
|
List<TaskInfo> list = new List<TaskInfo>();
|
|
|
- public CtrlHome()
|
|
|
+ public CtrlHome()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
gridHomeTask.Init();
|
|
@@ -57,20 +57,20 @@ namespace XdCxRhDW.App.UserControl
|
|
|
{
|
|
|
mapService = db.SysSetings.FirstOrDefault().MapService;
|
|
|
}
|
|
|
- mapControl1.UseDefalutOptions()
|
|
|
- //.UseCluster()//定位点使用内置聚合
|
|
|
- .UseClearAll()
|
|
|
- .UseDistanceLine()
|
|
|
- .UseMarkDot()
|
|
|
- .UseExportImg()
|
|
|
- .UseExportXlsx()
|
|
|
- .UseExportCsv()
|
|
|
- .SetMapLayerType(mapService)
|
|
|
- //.SetMapLayerType("")
|
|
|
- .UseDrawRect(rect =>
|
|
|
- {
|
|
|
- (double startLon, double startLat, double centerLon, double centerLat, double endLon, double endLat, double lonRange, double latRange) = rect;
|
|
|
- });
|
|
|
+ mapControl1.UseDefalutOptions()
|
|
|
+ //.UseCluster()//定位点使用内置聚合
|
|
|
+ .UseClearAll()
|
|
|
+ .UseDistanceLine()
|
|
|
+ .UseMarkDot()
|
|
|
+ .UseExportImg()
|
|
|
+ .UseExportXlsx()
|
|
|
+ .UseExportCsv()
|
|
|
+ .SetMapLayerType(mapService)
|
|
|
+ //.SetMapLayerType("")
|
|
|
+ .UseDrawRect(rect =>
|
|
|
+ {
|
|
|
+ (double startLon, double startLat, double centerLon, double centerLat, double endLon, double endLat, double lonRange, double latRange) = rect;
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
private async void GridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
|
|
@@ -627,17 +627,13 @@ namespace XdCxRhDW.App.UserControl
|
|
|
var tarItem = await db.PosRes.Where(p => p.ID == item.ID).FirstOrDefaultAsync();
|
|
|
if (tarItem != null)
|
|
|
{
|
|
|
- tarItem.TargetID = tar.ID;
|
|
|
- tarItem.TarName = tar.TargetName;
|
|
|
+ item.TargetID= tarItem.TargetID = tar.ID;
|
|
|
+ item.TarName = tarItem.TarName = tar.TargetName;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
- this.Invoke(new Action(() =>
|
|
|
- {
|
|
|
- gridView2.RefreshData();
|
|
|
- }));
|
|
|
-
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|