Ejemplo n.º 1
0
 void UCPJ_21gzbxdh_OnTQLocation(PJ_21gzbxdh obj)
 {
     if (OnTQLocation != null)
     {
         OnTQLocation(obj);
     }
 }
Ejemplo n.º 2
0
 void dlg_OnBeginLocation(PJ_21gzbxdh obj) {
     PointOverLay lay = this.Overlay as PointOverLay;
     if (lay != null) {
         frmMapCar95 frm = lay.MapControl.FindForm() as frmMapCar95;
         if (frm != null) {
             frm.OnBeginLocation(obj);
         }
     }
 }
Ejemplo n.º 3
0
        void gridViewOperation_AfterAdd(PJ_22 obj) {

            PJ_21gzbxdh dhjt = new PJ_21gzbxdh();
            dhjt.gzrjID = dhjt.CreateID();
            dhjt.OrgCode = obj.OrgCode;
            dhjt.OrgName = obj.OrgName;
            dhjt.rq = obj.bxsj;
            dhjt.lxfs = obj.lxdh;
            dhjt.yhdz = obj.bxdd;
            dhjt.gzjk = obj.bggzqc;
            dhjt.djr = obj.zbslr;
            dhjt.clr = obj.xlfzr;
            dhjt.CreateDate = DateTime.Now;
            //Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
            dhjt.CreateMan = MainHelper.User.UserName;
            Client.ClientHelper.PlatformSqlMap.Create<PJ_21gzbxdh>(dhjt);

        }
Ejemplo n.º 4
0
 private void btGzdj_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
     frm21gzbxdhEdit dlg = new frm21gzbxdhEdit();
     PJ_21gzbxdh obj = new PJ_21gzbxdh();
     obj.OrgCode = Client.Platform.MainHelper.User.OrgCode;
     obj.OrgName = Client.Platform.MainHelper.User.OrgName;
     dlg.RowData = obj;
     if (dlg.ShowDialog()== DialogResult.OK) {
         Client.ClientHelper.PlatformSqlMap.Create<PJ_21gzbxdh>(dlg.RowData);
     }
 }
Ejemplo n.º 5
0
 private void addgzMark(location loca, PJ_21gzbxdh obj) {
     //添加故障点
     obj.jd = 0;
     addgzMark(new PointLatLng(loca.lat-offPoint.Lat, loca.lng-offPoint.Lng), obj);
     
 }
Ejemplo n.º 6
0
        private void addgzMark(PJ_21gzbxdh obj) {
            GMapMarkerImage mark = new GMapMarkerGzbx(new PointLatLng(obj.wd, obj.jd));
            gzwzLay.Markers.Add(mark);
            mark.Id = obj.ID;
            mark.Tag = obj;
            mark.RefreshToolText();

        }
Ejemplo n.º 7
0
        private void addgzMark(PointLatLng pointLatLng, PJ_21gzbxdh obj) {
            if (obj.jd > 0) return;
            obj.jd = pointLatLng.Lng; obj.wd = pointLatLng.Lat;
            GMapMarkerImage mark = FindMark(obj.ID);
            if (mark == null) {
                mark = new GMapMarkerGzbx(pointLatLng);
                gzwzLay.Markers.Add(mark);
                mark.Tag = obj;
                mark.Id = obj.ID;
            } else {
                mark.Position = pointLatLng;
                mark.Tag = obj;
            }
            mark.RefreshToolText();
           mark.ToolTipMode = MarkerTooltipMode.Always;
            rMap1.Position = pointLatLng;

        }
Ejemplo n.º 8
0
        public void OnBeginLocation(PJ_21gzbxdh obj) {

            string url = gpsUrl + "/GetLocation/" + obj.yhdz;
            try {
                WebClient wc =new WebClient();
               wc.Headers.Add("content-type", "application/json;charset=utf-8");
                string loc =wc.UploadString(url,"POST","");
                location loca=Newtonsoft.Json.JsonConvert.DeserializeObject<location>(loc);
                if (loca != null && loca.lat > 0) {
                    addgzMark(loca,obj);
                    return;
                }
            } catch {
                
            }
            MsgBox.ShowWarningMessageBox("地址定位失败,需手工设置位置。");
            addgzMark(rMap1.Position, obj);
        }
Ejemplo n.º 9
0
        void bxdh_OnTQLocation(PJ_21gzbxdh obj)
        {
            //台区定位
            if (obj.tqID == string.Empty)
            {
                MessageBox.Show("请先选择台区,再定位!");
                return;
            }
            try
            {
                PS_tq tq = ClientHelper.PlatformSqlMap.GetOneByKey<PS_tq>(obj.tqID);
                PS_gt gt = ClientHelper.PlatformSqlMap.GetOneByKey<PS_gt>(tq.gtID);


                string url = gpsUrl + "/GetLocation/" + obj.yhdz;
                try
                {
                    location loca = new location();
                    loca.lat = (double)gt.gtLat;
                    loca.lng = (double)gt.gtLon;

                    //location loca = Newtonsoft.Json.JsonConvert.DeserializeObject<location>(loc);
                    if (loca != null && loca.lat > 0)
                    {
                        addgzMark(loca, obj);
                        return;
                    }
                }
                catch
                {

                }
                MsgBox.ShowWarningMessageBox("地址定位失败,需手工设置位置。");
                addgzMark(rMap1.Position, obj);

            }
            catch (Exception)
            {

                throw;
            }
           
        }
Ejemplo n.º 10
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(PJ_21gzbxdh newobj)
 {
     if (parentID == null) return;
     newobj.rq = DateTime.Today;
     newobj.OrgCode = parentID;
     newobj.OrgName = parentObj.OrgName;
     newobj.CreateDate = DateTime.Now;
     newobj.CreateMan = MainHelper.User.UserName;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(PJ_21gzbxdh newobj)
 {
     if (parentID == null) return;
     newobj.OrgCode = parentID;
     newobj.OrgName = parentObj.OrgName;
     newobj.CreateDate = DateTime.Now;
     Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
     newobj.CreateMan = m_UserBase.RealName;
 }