示例#1
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            //throw new NotImplementedException();

            // 0.화면객체인스턴스화
            if (obj == null)
            {
                return;
            }

            wtrTrkHtDtlView = obj as WtrTrkHtDtlView;

            btnSave  = wtrTrkHtDtlView.btnSave;
            btnClose = wtrTrkHtDtlView.btnClose;


            //2.화면데이터객체 초기화
            InitDataBinding();


            //3.권한처리
            permissionApply();



            //4.신규/상세 모드
            if (Dtl.SEQ < 0)
            {
                //채번
                Hashtable param = new Hashtable();
                param.Add("FTR_CDE", Dtl.FTR_CDE);
                param.Add("FTR_IDN", Dtl.FTR_IDN);
                param.Add("sqlId", "selectCLN_SEQ");

                WttRsrvHtDtl res = new WttRsrvHtDtl();
                res = BizUtil.SelectObject(param) as WttRsrvHtDtl;

                //채번결과 매칭
                Dtl.SEQ = res.SEQ;

                //시설물명가져오기
                Dtl.FTR_NAM = BizUtil.GetCodeNm("Select_FTR_LIST2", Dtl.FTR_CDE);

                wtrTrkHtDtlView.btnDel.Visibility = Visibility.Collapsed;
            }
            else
            {
                Hashtable param = new Hashtable();
                param.Add("sqlId", "selectWttRsrvHt");
                param.Add("FTR_CDE", Dtl.FTR_CDE);
                param.Add("FTR_IDN", Dtl.FTR_IDN);
                param.Add("SEQ", Dtl.SEQ);

                Dtl = BizUtil.SelectObject(param) as WttRsrvHtDtl;

                wtrTrkHtDtlView.btnDel.Visibility = Visibility.Visible;
            }
        }
示例#2
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            try
            {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }
                var values = (object[])obj;

                wtrTrkAddView = values[0] as WtrTrkAddView;
                cbHJD_CDE     = wtrTrkAddView.cbHJD_CDE;   //행정동
                cbMNG_CDE     = wtrTrkAddView.cbMNG_CDE;   //관리기관
                cbBLS_CDE     = wtrTrkAddView.cbBLS_CDE;   //건물유형

                btnBack = wtrTrkAddView.btnBack;
                btnSave = wtrTrkAddView.btnSave;

                //2.화면데이터객체 초기화
                InitDataBinding();


                //3.권한처리
                permissionApply();

                // 4.초기조회 - 신규관리번호 채번
                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectWtrTrkFTR_IDN");

                WtrTrkDtl result = new WtrTrkDtl();
                result = BizUtil.SelectObject(param) as WtrTrkDtl;


                //채번결과 매칭
                this.FTR_IDN = result.FTR_IDN;
                this.FTR_CDE = "SA120";
                //시설물명  가져오기
                wtrTrkAddView.txtFTR_NAM.Text = BizUtil.GetCodeNm("Select_FTR_LIST2", FTR_CDE);


                //공통팝업창 사이즈 변경 4
                FmsUtil.popWinView.Height = 400;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#3
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            //throw new NotImplementedException();

            // 0.화면객체인스턴스화
            if (obj == null)
            {
                return;
            }

            metrChgDtlView = obj as MetrChgDtlView;
            cbGCW_CDE      = metrChgDtlView.cbGCW_CDE;
            cbOME_MOF      = metrChgDtlView.cbOME_MOF;

            btnSave  = metrChgDtlView.btnSave;
            btnDel   = metrChgDtlView.btnDel;
            btnClose = metrChgDtlView.btnClose;


            //2.화면데이터객체 초기화
            InitDataBinding();


            //3.권한처리
            permissionApply();



            //4.신규/상세 모드
            if (Dtl.META_SEQ < 0)
            {
                //채번
                Hashtable param = new Hashtable();
                param.Add("FTR_CDE", Dtl.FTR_CDE);
                param.Add("FTR_IDN", Dtl.FTR_IDN);
                param.Add("sqlId", "selectMETA_SEQ");

                WttMetaHt res = new WttMetaHt();
                res = BizUtil.SelectObject(param) as WttMetaHt;

                //채번결과 매칭
                Dtl.META_SEQ = res.META_SEQ;

                metrChgDtlView.btnDel.Visibility = Visibility.Collapsed;

                //시설물명 가져오기
                Dtl.FTR_NAM = BizUtil.GetCodeNm("Select_FTR_LIST2", Dtl.FTR_CDE);
            }
            else
            {
                Hashtable param = new Hashtable();
                param.Add("sqlId", "selectWttMetaHtList");
                param.Add("FTR_CDE", Dtl.FTR_CDE);
                param.Add("FTR_IDN", Dtl.FTR_IDN);
                param.Add("META_SEQ", Dtl.META_SEQ);

                Dtl = BizUtil.SelectObject(param) as WttMetaHt;

                metrChgDtlView.btnDel.Visibility = Visibility.Visible;
            }
        }
示例#4
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            //throw new NotImplementedException();

            // 0.화면객체인스턴스화
            if (obj == null)
            {
                return;
            }

            attFacDtlView = obj as AttFacDtlView;
            cbCRE_YY      = attFacDtlView.cbCRE_YY;
            btnDelete     = attFacDtlView.btnDelete;
            btnSave       = attFacDtlView.btnSave;
            btnClose      = attFacDtlView.btnClose;


            //2.화면데이터객체 초기화
            InitDataBinding();


            //3.권한처리
            permissionApply();



            // 4.초기조회
            //DataTable dt = new DataTable();
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectCmmWttAttaDt");
            param.Add("FTR_CDE", this.FTR_CDE);
            param.Add("FTR_IDN", this.FTR_IDN);
            param.Add("ATTA_SEQ", this.ATTA_SEQ);

            WttAttaDt result = new WttAttaDt();

            result = BizUtil.SelectObject(param) as WttAttaDt;

            if (result != null)
            {
                //결과를 뷰모델멤버로 매칭
                Type dbmodel = result.GetType();
                Type model   = this.GetType();

                //모델프로퍼티 순회
                foreach (PropertyInfo prop in model.GetProperties())
                {
                    string propName = prop.Name;
                    //db프로퍼티 순회
                    foreach (PropertyInfo dbprop in dbmodel.GetProperties())
                    {
                        string colName  = dbprop.Name;
                        var    colValue = dbprop.GetValue(result, null);
                        if (colName.Equals(propName))
                        {
                            try { prop.SetValue(this, colValue); } catch (Exception) { }
                        }
                    }
                    Console.WriteLine(propName + " - " + prop.GetValue(this, null));
                }
            }


            //다큐먼트는 따로 처리
            Paragraph p = new Paragraph();

            try
            {
                p.Inlines.Add(this.ATT_DES ?? "");
                attFacDtlView.txtATT_DES.Document.Blocks.Clear();
                attFacDtlView.txtATT_DES.Document.Blocks.Add(p);
            }
            catch (Exception e) { Console.WriteLine(e.Message); }

            //버튼처리
            btnDelete.Visibility = Visibility.Visible;



            //5.신규/수정구분처리
            if (ATTA_SEQ < 0)
            {
                //채번
                param = new Hashtable();
                param.Add("FTR_CDE", FTR_CDE);
                param.Add("FTR_IDN", FTR_IDN);
                param.Add("sqlId", "selectATTA_SEQ");

                WttAttaDt res = new WttAttaDt();
                res = BizUtil.SelectObject(param) as WttAttaDt;

                //채번결과 매칭
                ATTA_SEQ = res.ATTA_SEQ;

                //시설물명  가져오기
                attFacDtlView.txtFTR_NAM.Text = BizUtil.GetCodeNm("Select_FTR_LIST2", FTR_CDE);

                //버튼처리
                btnDelete.Visibility = Visibility.Hidden;
            }
        }
示例#5
0
        private LeakDtl dtl = new LeakDtl(); //민원마스터

        #endregion



        /// <summary>
        /// 생성자
        /// </summary>
        public LekSiteAddViewModel()
        {
            this.LoadedCommand = new DelegateCommand <object>(delegate(object obj) {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }

                lekSiteAddView = obj as LekSiteAddView;

                btnSave  = lekSiteAddView.btnSave;
                btnClose = lekSiteAddView.btnClose;


                //2.화면데이터객체 초기화
                InitDataBinding();


                //3.권한처리
                permissionApply();

                //4.채번
                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectLeakNewIdn");
                LeakDtl dtl = BizUtil.SelectObject(param) as LeakDtl;
                Dtl.FTR_IDN = dtl.FTR_IDN;
                Dtl.FTR_CDE = "SA300"; //누수지점

                //시설물명  가져오기
                lekSiteAddView.txtFTR_NAM.Text = BizUtil.GetCodeNm("Select_FTR_LIST2", Dtl.FTR_CDE);
            });

            //저장
            this.SaveCommand = new DelegateCommand <object>(delegate(object obj) {
                // 필수체크 (Tag에 필수체크 표시한 EditBox, ComboBox 대상으로 수행)
                if (!BizUtil.ValidReq(lekSiteAddView))
                {
                    return;
                }


                if (Messages.ShowYesNoMsgBox("저장하시겠습니까?") != MessageBoxResult.Yes)
                {
                    return;
                }

                try
                {
                    //다큐먼트는 따로 처리
                    this.Dtl.REP_EXP = new TextRange(lekSiteAddView.richREP_EXP.Document.ContentStart, lekSiteAddView.richREP_EXP.Document.ContentEnd).Text.Trim();
                    this.Dtl.LEK_EXP = new TextRange(lekSiteAddView.richLEK_EXP.Document.ContentStart, lekSiteAddView.richLEK_EXP.Document.ContentEnd).Text.Trim();
                    BizUtil.Update2(this.Dtl, "SaveWtlLeakDtl");
                }
                catch (Exception ex)
                {
                    Messages.ShowErrMsgBox("저장 처리중 오류가 발생하였습니다." + ex.Message);
                    return;
                }

                Messages.ShowOkMsgBox();
                //화면닫기
                btnClose.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            });
        }
示例#6
0
        //해당 영역에 존재하는 레이어 피처찾아서 활성화, 팝업창
        private void findFtrByRegion(IFeatureLayer layer, IGeometry region)
        {
            ISpatialFilter pSF = new SpatialFilter();

            pSF.Geometry      = region;
            pSF.GeometryField = "Shape";
            pSF.SpatialRel    = esriSpatialRelEnum.esriSpatialRelIntersects;
            //pSF.SpatialRel = esriSpatialRelEnum.esriSpatialRelOverlaps;
            //pSF.SpatialRel = esriSpatialRelEnum.esriSpatialRelContains;
            //pSF.SpatialRel = esriSpatialRelEnum.esriSpatialRelEnvelopeIntersects;



            IFeatureCursor pDestCur = layer.Search(pSF, false);
            IFeature       pFeat    = pDestCur.NextFeature();

            while (pFeat != null)
            {
                // do something with pFeat
                //var ftr_cde = pFeat.Value[2];
                //var ftr_idn = pFeat.Value[0];
                string ftr_cde = "";
                string ftr_idn = "";

                //피처의 시설물코드,관리번호 알아내기
                for (int i = 0; i < pFeat.Fields.FieldCount; i++)
                {
                    if ("ftr_cde".Equals(pFeat.Fields.Field[i].Name.ToLower()))
                    {
                        ftr_cde = pFeat.Value[i];
                        break;
                    }
                }
                for (int i = 0; i < pFeat.Fields.FieldCount; i++)
                {
                    if ("ftr_idn".Equals(pFeat.Fields.Field[i].Name.ToLower()))
                    {
                        ftr_idn = Convert.ToString(pFeat.Value[i]);
                        break;
                    }
                }

                if (FmsUtil.IsNull(ftr_cde) || FmsUtil.IsNull(ftr_idn))
                {
                    MessageBox.Show("시설물정보가 없습니다.");
                    return;
                }



                //1.셀렉트처리 필터링
                IQueryFilter qfltr = new QueryFilter();
                qfltr.WhereClause = " FTR_CDE = '" + ftr_cde + "' AND FTR_IDN = " + ftr_idn;
                IFeatureSelection fsel = layer as IFeatureSelection;
                fsel.Clear();
                fsel.SelectFeatures(qfltr, esriSelectionResultEnum.esriSelectionResultAdd, true);
                mapControl.Refresh();


                //0.시설물팝업호출
                int ftr_cde_len = 0;
                try
                {
                    ftr_cde_len = (Convert.ToString(ftr_cde) as string).Length;
                }
                catch (Exception) {}

                if (ftr_cde_len == 5 && !FmsUtil.IsNull(ftr_idn)) //시설물코드,번호가 유효한경우만
                {
                    FtrPopView ftrPopView = new FtrPopView(ftr_cde, ftr_idn);
                    try
                    {
                        //타이틀
                        ftrPopView.lbTitle.Content = BizUtil.GetCodeNm("Select_FTR_LIST2", ftr_cde);
                    }
                    catch (Exception)
                    {
                        ftrPopView.lbTitle.Content = "시설물정보";
                    }
                    if (ftrPopView.ShowDialog() is bool)
                    {
                        //재조회
                        fsel.Clear();
                        mapControl.Refresh();
                    }
                }
                break;
                //pFeat = pDestCur.NextFeature(); //첫번째 걸린 시설물만 팝업띄우자
            }
        }