예제 #1
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            try
            {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }

                uC_GAIN_PS = obj as UC_GAIN_PS;

                btnSave = uC_GAIN_PS.btnSave;

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


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

                // 4.초기조회
                InitModel();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
예제 #2
0
        /// <summary>
        /// UserControl 시설물페이지 로딩
        /// </summary>
        /// <param name="CBO_FTR_CDE"></param>
        /// <param name="_FTR_CDE"></param>
        /// <param name="_FTR_IDN"></param>
        private void InitPage(string _FTR_CDE, string _FTR_IDN)
        {
            switch (_FTR_CDE)
            {
            case "SA001":     //상수관로
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_PIPE_LM uc = new UC_PIPE_LM(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA002":     //급수관로
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_SPLY_LS uc = new UC_SPLY_LS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA003":     //스탠파이프
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_STPI_PS uc = new UC_STPI_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA100":     //상수맨홀
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_MANH_PS uc = new UC_MANH_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA110":     //수원지
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_HEAD_PS uc = new UC_HEAD_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA112":     //취수장
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_GAIN_PS uc = new UC_GAIN_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;


            case "SA113":     //정수장
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_PURI_AS uc = new UC_PURI_AS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA114":     //배수지
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_SERV_PS uc = new UC_SERV_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;



            case "SA117":     //유량계
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_FLOW_PS uc = new UC_FLOW_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA118":
            case "SA119":     //급수탑,소화전
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_FIRE_PS uc = new UC_FIRE_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA120":     //저수조
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_RSRV_PS uc = new UC_RSRV_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA121":     //수압계
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_PRGA_PS uc = new UC_PRGA_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA122":     //급수전계량기
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_META_PS uc = new UC_META_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content = uc;
                }
                break;

            case "SA200":
            case "SA201":
            case "SA202":
            case "SA203":
            case "SA204":
            case "SA205":
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_VALV_PS uc = new UC_VALV_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "SA206":     //가압펌프장
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_PRES_PS uc = new UC_PRES_PS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                    uc.btnSel.Visibility  = Visibility.Hidden;
                }
                break;

            case "BZ001":     //대블록
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_BLKL_AS uc = new UC_BLKL_AS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                }
                break;

            case "BZ002":     //중블록
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_BLKM_AS uc = new UC_BLKM_AS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                }
                break;

            case "BZ003":     //소블록
                if (FmsUtil.IsNull(_FTR_CDE) && FmsUtil.IsNull(_FTR_IDN))
                {
                    this.cctl.Content = null;
                }
                else
                {
                    UC_BLKS_AS uc = new UC_BLKS_AS(_FTR_CDE, _FTR_IDN);
                    this.cctl.Content     = uc;
                    uc.btnDel.Visibility  = Visibility.Hidden;
                    uc.btnSave.Visibility = Visibility.Hidden;
                }
                break;


            default:
                this.cctl.Content = new UC_FLOW_PS(_FTR_CDE, _FTR_IDN);
                break;
            }
        }