コード例 #1
0
        /// <summary>
        /// 데이터 초기화
        /// </summary>
        private void InitializeData()
        {
            try
            {
                htconditions.Clear();
                htconditions.Add("SYS_CD", FmsUtil.sysCd);
                htconditions.Add("USER_ID", Logs.strLogin_ID);


                htconditions.Add("sqlId", "Select_BASE_FLOW_CALC_INFO_L");
                gcQuickL.ItemsSource  = QuickMNUGridLoad(BizUtil.SelectList(htconditions));
                htconditions["sqlId"] = "Select_BASE_FLOW_CALC_INFO_R";
                gcQuickR.ItemsSource  = QuickMNUGridLoad(BizUtil.SelectList(htconditions));

                dtcbdata = null;
                dtcbdata = new DataTable();
                dtcbdata.Columns.Add("CD");
                dtcbdata.Columns.Add("NM");

                DataRow dradd;

                for (int i = 1; i < 13; i++)
                {
                    dradd       = dtcbdata.NewRow();
                    dradd["CD"] = "F" + i.ToString();
                    dradd["NM"] = "F" + i.ToString();
                    dtcbdata.Rows.Add(dradd.ItemArray);
                }
            }
            catch (Exception e)
            {
                Messages.ShowErrMsgBoxLog(e);
            }
        }
コード例 #2
0
        /// <summary>
        /// 엑셀다운로드
        /// </summary>
        /// <param name="obj"></param>
        private void ExcelDownAction(object obj)
        {
            try
            {
                /// 데이터조회
                Hashtable conditions = new Hashtable();
                conditions.Add("FTR_IDN", txtFTR_IDN.Text.Trim());
                conditions.Add("PRS_NAM", txtPRS_NAM.Text.Trim());
                conditions.Add("ATT_NAM", txtATT_NAM.Text.Trim());

                conditions.Add("page", 0);
                conditions.Add("rows", 1000000);

                conditions.Add("sqlId", "SelectOldMngList");


                exceldt = BizUtil.SelectList(conditions);


                //그리드헤더정보 추출
                columnList = new GridColumn[grid.Columns.Count];
                grid.Columns.CopyTo(columnList, 0);
                listCols = new List <string>(); //컬럼헤더정보 가져오기
                foreach (GridColumn gcol in columnList)
                {
                    try
                    {
                        if ("PrintN".Equals(gcol.Tag.ToString()))
                        {
                            continue;                                       //엑셀출력제외컬럼
                        }
                    }
                    catch (Exception) { }

                    listCols.Add(gcol.FieldName.ToString());
                }


                saveFileDialog       = null;
                saveFileDialog       = new System.Windows.Forms.SaveFileDialog();
                saveFileDialog.Title = "저장경로를 지정하세요.";

                //초기 파일명 지정
                saveFileDialog.FileName = DateTime.Now.ToString("yyyyMMdd") + "_" + "시설물노후도현황.xlsx";

                saveFileDialog.OverwritePrompt = true;
                saveFileDialog.Filter          = "Excel|*.xlsx";

                if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    strFileName = saveFileDialog.FileName;
                    thread      = new Thread(new ThreadStart(ExcelExportFX));
                    thread.Start();
                }
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #3
0
        /// <summary>
        /// 로그인 중인 사용자 데이터 바인딩
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PopupUserInfoMng_ContentRendered(object sender, EventArgs e)
        {
            try
            {
                Hashtable htConditions = new Hashtable();
                htConditions.Add("USER_ID", Logs.strLogin_ID);
                htConditions.Add("sqlId", "Select_Log_User_Info");

                //dtLogUserInfo = work.Select_Log_User_Info(htConditions);
                dtLogUserInfo = BizUtil.SelectList(htConditions);

                if (dtLogUserInfo.Rows.Count == 1)
                {
                    txtID.Text               = dtLogUserInfo.Rows[0]["USER_ID"].ToString();
                    txtNM.Text               = dtLogUserInfo.Rows[0]["USER_NM"].ToString();
                    cbGrade.EditValue        = dtLogUserInfo.Rows[0]["POS_CD"].ToString();
                    lookUpEditDept.EditValue = dtLogUserInfo.Rows[0]["DEPT_CD"].ToString();
                    txtPhone.Text            = dtLogUserInfo.Rows[0]["USER_TEL"].ToString();
                }
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #4
0
ファイル: PdjtUseDtlView.xaml.cs プロジェクト: alsokyun/wfms
        /// 조회
        private void InitModel()
        {
            //1.소모품정보
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectPdjtMaUseHtDtlInfo");
            param.Add("PDH_NUM", PDH_NUM);

            DataTable dt = new DataTable();

            dt = BizUtil.SelectList(param);

            foreach (DataRow row in dt.Rows)
            {
                txtPDH_NUM.Text        = this.PDH_NUM;
                txtPDT_CAT_CDE_NM.Text = row["PDT_CAT_CDE_NM"].ToString();
                txtPDT_MDL_STD.Text    = row["PDT_MDL_STD"].ToString();
                txtPDT_MNF.Text        = row["PDT_MNF"].ToString();
                txtPDT_NAM.Text        = row["PDT_NAM"].ToString();
                txtPDT_UNT.Text        = row["PDT_UNT"].ToString();
                break;
            }

            //2.사용현황
            param = new Hashtable();
            param.Add("sqlId", "SelectPdjtMaUseHtDtlList");
            param.Add("PDH_NUM", PDH_NUM);

            dt = new DataTable();
            dt = BizUtil.SelectList(param);

            grid.ItemsSource = dt;
        }
コード例 #5
0
        /// <summary>
        /// 데이터 초기화
        /// </summary>
        private void InitializeData()
        {
            try
            {
                Hashtable conditions = new Hashtable();
                conditions.Add("sqlId", "Select_CD_DTL_INFO_List");
                conditions.Add("MST_CD", "000004");
                //cbGrade.ItemsSource = cwork.Select_CD_DTL_INFO_List(conditions);
                cbGrade.ItemsSource = BizUtil.SelectList(conditions);

                conditions = new Hashtable();
                conditions.Add("sqlId", "Select_SITE_DEPT_INFO");
                lookUpEditDept.ItemsSource = BizUtil.SelectList(conditions);

                if (Properties.Settings.Default.strThemeName.Equals("GTINavyTheme"))
                {
                    radionavy.IsChecked = true;
                }
                else if (Properties.Settings.Default.strThemeName.Equals("GTIBlueTheme"))
                {
                    radioblue.IsChecked = true;
                }
            }
            catch (Exception e)
            {
                Messages.ShowErrMsgBoxLog(e);
            }
        }
コード例 #6
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="obj"></param>
        private void SearchAction(object obj)
        {
            try
            {
                Hashtable param = new Hashtable();

                string sDate    = Convert.ToDateTime(SrcDate).ToString("yyyyMMdd");
                string sSchDate = Convert.ToDateTime(SrcDate).ToString("yyyy-MM-dd");
                int    nYear    = Int32.Parse(Convert.ToDateTime(SrcDate).ToString("yyyy"));

                param.Add("sqlId", "SelectFcltStatList");
                param.Add("searchKeyword", sDate);


                DataTable dt = BizUtil.SelectList(param);

                fcltStatListView.grdTitle.Header  = sSchDate;
                fcltStatListView.grdTitle1.Header = nYear + "년";
                fcltStatListView.grdTitle2.Header = (nYear - 1) + "년";
                fcltStatListView.grdTitle3.Header = (nYear - 2) + "년";
                fcltStatListView.grdTitle4.Header = (nYear - 3) + "년";
                fcltStatListView.grdTitle5.Header = (nYear - 4) + "년";

                fcltStatListView.grid.ItemsSource = dt;
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #7
0
        /// 조회
        private void InitModel()
        {
            //1.시설물정보
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectOptMtDtlInfo");
            param.Add("G2_ID", G2_ID);

            DataTable dt = new DataTable();

            dt = BizUtil.SelectList(param);

            foreach (DataRow row in dt.Rows)
            {
                txtFTR_NAM.Text         = row["FTR_NAM"].ToString();
                txtFTR_IDN.Text         = row["FTR_IDN"].ToString();
                txtPRS_NAM.Text         = row["PRS_NAM"].ToString();
                txtATT_NAM.Text         = row["ATT_NAM"].ToString();
                txtCHK_PRD_AMT.Text     = row["CHK_PRD_AMT"].ToString();
                cbCHK_PRD_CDE.EditValue = row["CHK_PRD_CDE"].ToString();

                FTR_CDE = row["FTR_CDE"].ToString();
                FTR_IDN = row["FTR_IDN"].ToString();
                try
                {
                    TAG_ID = row["TAG_ID"].ToString();
                }
                catch (Exception) {}

                break;
            }

            //2.가동시간
            param = new Hashtable();
            param.Add("sqlId", "SelectOptMtDtlList");
            param.Add("TAG_ID", TAG_ID);

            dt = new DataTable();
            dt = BizUtil.SelectList(param);

            grid.ItemsSource = dt;


            //3.점검이력
            param = new Hashtable();
            param.Add("sqlId", "SelectOptMtChkHtList");
            param.Add("FTR_CDE", FTR_CDE);
            param.Add("FTR_IDN", FTR_IDN);

            dt = new DataTable();
            dt = BizUtil.SelectList(param);

            grid2.ItemsSource = dt;
        }
コード例 #8
0
ファイル: DashViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            try
            {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }
                var values = (object[])obj;

                //1. 화면객체 인스턴스
                dashView = values[0] as DashView;

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

                var sYm = Convert.ToDateTime(DateTime.Today).ToString("yyyyMM");

                param.Add("sqlId", "SelectDashChart1List");
                param.Add("pYm", sYm);
                param.Add("id", Logs.strLogin_ID);


                DataTable dt = BizUtil.SelectList(param);

                // Create an empty chart.
                ChartControl chart1 = dashView.ctDash1;

                // Bind a chart to a data source.
                chart1.DataSource = dt;

                dashView.srX_TIT11.Points.Clear();
                dashView.srX_TIT12.Points.Clear();

                dashView.srX_TIT11.Visible = false;
                dashView.srX_TIT12.Visible = true;
                foreach (DataRow row in dt.Rows)
                {
                    SeriesPoint point  = new SeriesPoint(row["NAM"].ToString(), Convert.ToDouble(row["DATA_VAL"]));
                    SeriesPoint point2 = new SeriesPoint(row["NAM"].ToString(), Convert.ToDouble(row["DATA_VAL2"]));
                    dashView.srX_TIT11.Points.Add(point);
                    dashView.srX_TIT12.Points.Add(point2);
                    dashView.ctDash1.Legend.Visibility = Visibility.Collapsed;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
コード例 #9
0
        // 초기 데이터모델 조회
        private void initModel()
        {
            DataTable dt = new DataTable();

            Hashtable param = new Hashtable();

            param.Add("sqlId", "selectWttRsrvHt");

            param.Add("FTR_CDE", FTR_CDE);
            param.Add("FTR_IDN", FTR_IDN);

            dt = BizUtil.SelectList(param);
            grid.ItemsSource = dt;
        }
コード例 #10
0
        //초기조회
        private void InitModel()
        {
            DataTable dt = new DataTable();

            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectFileMapList");

            param.Add("BIZ_ID", BIZ_ID);
            param.Add("GRP_TYP", "111"); //사진파일


            dt = BizUtil.SelectList(param);
            grid.ItemsSource = dt;
        }
コード例 #11
0
        /// <summary>
        /// 조회
        /// </summary>
        private void SearchAction()
        {
            DataTable dt = new DataTable();

            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectFtrTagMapList");

            param.Add("FTR_IDN", txtFTR_IDN.Text);
            param.Add("PRS_NAM", txtPRS_NAM.Text);
            param.Add("ATT_NAM", txtATT_NAM.Text);
            param.Add("TAG_ID", txtTAG_ID.Text);

            dt = BizUtil.SelectList(param);
            grid.ItemsSource = dt;
        }
コード例 #12
0
        public ChscResSubListView(string FTR_CDE, int FTR_IDN)
        {
            InitializeComponent();

            //초기조회
            DataTable dt = new DataTable();

            Hashtable param = new Hashtable();

            param.Add("sqlId", "selectChscResSubList");
            param.Add("FTR_CDE", FTR_CDE);
            param.Add("FTR_IDN", FTR_IDN);

            dt = BizUtil.SelectList(param);
            grid.ItemsSource = dt;
        }
コード例 #13
0
ファイル: OldDtlView.xaml.cs プロジェクト: alsokyun/wfms
        /// 조회
        private void InitModel()
        {
            //1.시설물정보
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectOldDtl");
            param.Add("G2_ID", G2_ID);

            DataTable dt = new DataTable();

            dt = BizUtil.SelectList(param);

            foreach (DataRow row in dt.Rows)
            {
                txtFTR_NAM.Text     = row["FTR_NAM"].ToString();
                txtFTR_IDN.Text     = row["FTR_IDN"].ToString();
                cbIMP_CDE.EditValue = row["IMP_CDE"].ToString();
                txtHJD_NAM.Text     = row["HJD_NAM"].ToString();
                txtLMT_YEAR.Text    = row["LMT_YEAR"].ToString();
                txCRE_YY.Text       = row["CRE_YY"].ToString();
                txtOLD_LVL.Text     = row["OLD_LVL"].ToString();
                txtCHK_PRD.Text     = row["CHK_PRD"].ToString();

                FTR_CDE = row["FTR_CDE"].ToString();
                FTR_IDN = row["FTR_IDN"].ToString();
                try
                {
                    TAG_ID = row["TAG_ID"].ToString();
                }
                catch (Exception) {}

                break;
            }


            //3.점검이력
            param = new Hashtable();
            param.Add("sqlId", "SelectOptMtChkHtList");
            param.Add("FTR_CDE", FTR_CDE);
            param.Add("FTR_IDN", FTR_IDN);

            dt = new DataTable();
            dt = BizUtil.SelectList(param);

            grid2.ItemsSource = dt;
        }
コード例 #14
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            try
            {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }
                var values = (object[])obj;

                //1. 화면객체 인스턴스
                ucChart02 = values[0] as UcChart02;

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

                var sYm = Convert.ToDateTime(DateTime.Today).ToString("yyyyMM");

                param.Add("sqlId", "SelectDashChart2List");
                param.Add("pYm", sYm);
                param.Add("id", Logs.strLogin_ID);


                DataTable dt = BizUtil.SelectList(param);

                // Create an empty chart.
                ChartControl chart1 = ucChart02.ctDash;

                // Bind a chart to a data source.
                chart1.DataSource = dt;

                ucChart02.srXSER1.Points.Clear();
                foreach (DataRow row in dt.Rows)
                {
                    SeriesPoint point = new SeriesPoint(row["NAM"].ToString(), Convert.ToDouble(row["DATA_VAL"]));

                    ucChart02.srXSER1.Points.Add(point);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
コード例 #15
0
ファイル: LekSiteDtlView.xaml.cs プロジェクト: alsokyun/wfms
        //첨부사진조회
        private void InitModel()
        {
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectBizIdFileDtl");

            param.Add("BIZ_ID", this.BIZ_ID);
            DataTable dt = BizUtil.SelectList(param);

            string UriPrefix = @"" + FmsUtil.fileDir;
            var    result    = new List <BitmapImage>();

            this.FIL_SEQ = null;

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow row         = dt.Rows[i];
                    string  ImgPathName = row["UPF_NAM"].ToString();

                    this.FIL_SEQ = row["FIL_SEQ"].ToString();

                    FileInfo fi = new FileInfo(UriPrefix + "\\" + ImgPathName);
                    //FileInfo.Exists로 파일 존재유무 확인 "
                    if (fi.Exists)
                    {
                        BitmapImage bi = new BitmapImage();
                        bi.BeginInit();
                        //bi.CacheOption = BitmapCacheOption.OnDemand;
                        //bi.CreateOptions = BitmapCreateOptions.DelayCreation;
                        //bi.DecodePixelHeight = 125;       //원본이미지 수정
                        //bi.DecodePixelWidth  = 125;       //원본이미지 수정됨
                        //bi.Rotation = Rotation.Rotate90;  //회전
                        bi.UriSource = new Uri(UriPrefix + "\\" + ImgPathName);
                        bi.EndInit();

                        result.Add(bi);
                    }
                }
            }

            layoutImages.ItemsSource = result;
        }
コード例 #16
0
ファイル: CnstCmplDtlViewModel.cs プロジェクト: alsokyun/wfms
        //초기모델조회
        private void InitModel()
        {
            //1.상세마스터
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectWttWserMa");
            param.Add("WSER_SEQ", _WSER_SEQ);

            WserDtl result = new WserDtl();

            result   = BizUtil.SelectObject(param) as WserDtl;
            this.Dtl = result;

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

            try
            {
                p.Inlines.Add(this.Dtl.APL_EXP ?? "");
                cnstCmplDtlView.richAPL_EXP.Document.Blocks.Clear();
                cnstCmplDtlView.richAPL_EXP.Document.Blocks.Add(p);
            }
            catch (Exception) {}

            p = new Paragraph();
            try
            {
                p.Inlines.Add(this.Dtl.PRO_EXP.Trim());
                cnstCmplDtlView.richPRO_EXP.Document.Blocks.Clear();
                cnstCmplDtlView.richPRO_EXP.Document.Blocks.Add(p);
            }
            catch (Exception) {}


            //2.누수지점
            param = new Hashtable();
            param.Add("sqlId", "SelectCmplLeakList");
            param.Add("RCV_NUM", this.Dtl.RCV_NUM);

            dt = BizUtil.SelectList(param);

            cnstCmplDtlView.grid.ItemsSource = dt;
        }
コード例 #17
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="obj"></param>
        private void SearchAction(object obj)
        {
            try
            {
                Hashtable param = new Hashtable();

                string sDate = Convert.ToDateTime(DateTime.Today).ToString("yyyyMMdd");

                param.Add("sqlId", "SelectStatCmplList");
                param.Add("searchKeyword", sDate);

                DataTable dt = BizUtil.SelectList(param);

                statCmplListView.grid.ItemsSource = dt;
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #18
0
ファイル: SplyDtlViewModel.cs プロジェクト: alsokyun/wfms
        /// 생성자
        public SplyDtlViewModel()
        {
            this.LoadedCommand = new DelegateCommand <object>(OnLoaded);
            this.SaveCommand   = new DelegateCommand <object>(OnSave);
            this.DeleteCommand = new DelegateCommand <object>(OnDelete);
            this.BackCommand   = new DelegateCommand <object>(OnBack);
            this.PrintCommand  = new DelegateCommand <object>(OnPrint);


            //입력항목 변경되면 중복버튼 복원
            Dtl.DUP          = "체크";
            PropertyChanged += delegate(object sender, PropertyChangedEventArgs args) {
                try
                {
                    btnDup.Content = "체크";
                }
                catch (Exception) { }
            };

            this.DupCommand = new DelegateCommand <object>(delegate(object obj) {
                if (btnDup.Content.Equals("OK"))
                {
                    return;
                }


                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectWttSplyMaDup");
                param.Add("CNT_NUM", Dtl.CNT_NUM);
                DataTable dt = BizUtil.SelectList(param);
                if (dt.Rows.Count > 1)
                {
                    Messages.ShowInfoMsgBox("공사번호가 중복되었습니다.");
                }
                else
                {
                    btnDup.Content = "OK";
                }
            });
        }
コード例 #19
0
        /// <summary>
        /// 즐겨찾기 바인딩
        /// </summary>
        ///
        public void QuickMnuBinding()
        {
            try
            {
                // 즐겨찾기메뉴 조회
                Hashtable param = new Hashtable();
                param.Add("sqlId", "Select_BASE_FLOW_CALC_INFO_R");
                param.Add("SYS_CD", FmsUtil.sysCd);
                param.Add("USER_ID", Logs.strLogin_ID);

                dtQuickMenuList = BizUtil.SelectList(param);


                stQuickMenu.Children.Clear();

                foreach (DataRow dr in dtQuickMenuList.Rows)
                {
                    Button btnQuickMenu = new Button
                    {
                        Name    = "MN_" + dr["MNU_CD"].ToString(),
                        Content = dr["MNU_NM"].ToString(),
                        Tag     = dr["SHRTEN_KEY"].ToString()
                    };
                    btnQuickMenu.Click += BtnQuickMenu_Click;
                    btnQuickMenu.SetResourceReference(Control.StyleProperty, "Quick_Menu_Button");

                    if (btnQuickMenu.Tag.ToString().Equals(""))
                    {
                        btnQuickMenu.Tag = "Collapsed";
                    }

                    stQuickMenu.Children.Add(btnQuickMenu);
                }
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #20
0
ファイル: UcChartMnuModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 조회작업
        /// </summary>
        /// <param name="obj"></param>
        private void InitModel(object obj)
        {
            try
            {
                ucChartMnu = obj as UcChartMnu;

                // 4.초기조회
                Hashtable param = new Hashtable();
                var       sYm   = Convert.ToDateTime(DateTime.Today).ToString("yyyyMM");

                param.Add("sqlId", "SelectDashMenuList");
                param.Add("pYm", sYm);
                param.Add("id", Logs.strLogin_ID);

                DataTable dt = BizUtil.SelectList(param);

                ucChartMnu.grid.ItemsSource = dt;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
コード例 #21
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            // 0.화면객체인스턴스화
            if (obj == null)
            {
                return;
            }
            hydtMetrSubListView = obj as HydtMetrSubListView;



            //초기조회
            Hashtable param = new Hashtable();

            param.Add("sqlId", "selectHydtMetrSubList");
            param.Add("FTR_CDE", FTR_CDE);
            param.Add("FTR_IDN", FTR_IDN);

            DataTable dt = new DataTable();

            dt = BizUtil.SelectList(param);
            hydtMetrSubListView.grid.ItemsSource = dt;
        }
コード例 #22
0
ファイル: FireFacListViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 엑셀다운로드
        /// </summary>
        /// <param name="obj"></param>
        private void ExcelDownAction(object obj)
        {
            try
            {
                /// 데이터조회
                Hashtable conditions = new Hashtable();
                conditions.Add("MNG_CDE", cbMNG_CDE.EditValue);
                conditions.Add("HJD_CDE", cbHJD_CDE.EditValue);
                conditions.Add("MOF_CDE", cbMOF_CDE.EditValue);

                conditions.Add("FTR_IDN", FmsUtil.Trim(txtFTR_IDN.EditValue));
                conditions.Add("CNT_NUM", txtCNT_NUM.Text.Trim());
                conditions.Add("SHT_NUM", txtSHT_NUM.Text.Trim());
                conditions.Add("FIR_DIP", txtFIR_DIP.Text.Trim());
                conditions.Add("SUP_HIT", txtSUP_HIT.Text.Trim());

                try
                {
                    conditions.Add("IST_YMD_FROM", dtIST_YMD_FROM.EditValue == null ? null : Convert.ToDateTime(dtIST_YMD_FROM.EditValue).ToString("yyyyMMdd"));
                    conditions.Add("IST_YMD_TO", dtIST_YMD_TO.EditValue == null ? null : Convert.ToDateTime(dtIST_YMD_TO.EditValue).ToString("yyyyMMdd"));
                }
                catch (Exception) { }
                if (!BizUtil.ValidDateBtw(conditions["IST_YMD_FROM"], conditions["IST_YMD_TO"]))
                {
                    Messages.ShowInfoMsgBox("설치일자 범위를 확인하세요");
                    return;
                }

                conditions.Add("page", 0);
                conditions.Add("rows", 1000000);

                conditions.Add("sqlId", "SelectFireFacList");

                exceldt = BizUtil.SelectList(conditions);

                saveFileDialog       = null;
                saveFileDialog       = new System.Windows.Forms.SaveFileDialog();
                saveFileDialog.Title = "저장경로를 지정하세요.";

                //초기 파일명 지정
                saveFileDialog.FileName = DateTime.Now.ToString("yyyyMMdd") + "_" + "소방시설목록.xlsx";

                saveFileDialog.OverwritePrompt = true;
                saveFileDialog.Filter          = "Excel|*.xlsx";

                //그리드헤더정보 추출
                columnList = new GridColumn[grid.Columns.Count];
                grid.Columns.CopyTo(columnList, 0);
                listCols = new List <string>(); //컬럼헤더정보 가져오기
                foreach (GridColumn gcol in columnList)
                {
                    try
                    {
                        if ("PrintN".Equals(gcol.Tag.ToString()))
                        {
                            continue;                                       //엑셀출력제외컬럼
                        }
                    }
                    catch (Exception) { }

                    listCols.Add(gcol.FieldName.ToString());
                }

                if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    strFileName = saveFileDialog.FileName;
                    thread      = new Thread(new ThreadStart(ExcelExportFX));
                    thread.Start();
                }
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #23
0
ファイル: LekSiteListViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 엑셀다운로드
        /// </summary>
        /// <param name="obj"></param>
        private void ExcelDownAction(object obj)
        {
            try
            {
                /// 데이터조회
                Hashtable conditions = new Hashtable();
                conditions.Add("FTR_IDN", lekSiteListView.txtFTR_IDN.Text.Trim());
                conditions.Add("PIP_IDN", lekSiteListView.txtPIP_IDN.Text.Trim());
                conditions.Add("SHT_NUM", lekSiteListView.txtSHT_NUM.Text.Trim());
                conditions.Add("RCV_NUM", lekSiteListView.txtRCV_NUM.Text.Trim());
                conditions.Add("HJD_CDE", cbHJD_CDE.EditValue);
                conditions.Add("LEP_CDE", cbLEP_CDE.EditValue);
                conditions.Add("LRS_CDE", cbLRS_CDE.EditValue);
                conditions.Add("LEK_YMD_FROM", lekSiteListView.dtLEK_YMD_FROM.EditValue == null ? "" : Convert.ToDateTime(lekSiteListView.dtLEK_YMD_FROM.EditValue).ToString("yyyyMMdd"));
                conditions.Add("LEK_YMD_TO", lekSiteListView.dtLEK_YMD_TO.EditValue == null ? "" : Convert.ToDateTime(lekSiteListView.dtLEK_YMD_TO.EditValue).ToString("yyyyMMdd"));
                conditions.Add("REP_YMD_FROM", lekSiteListView.dtREP_YMD_FROM.EditValue == null ? "" : Convert.ToDateTime(lekSiteListView.dtREP_YMD_FROM.EditValue).ToString("yyyyMMdd"));
                conditions.Add("REP_YMD_TO", lekSiteListView.dtREP_YMD_TO.EditValue == null ? "" : Convert.ToDateTime(lekSiteListView.dtREP_YMD_TO.EditValue).ToString("yyyyMMdd"));


                conditions.Add("page", 0);
                conditions.Add("rows", 1000000);

                conditions.Add("sqlId", "SelectWtlLeakList");


                exceldt = BizUtil.SelectList(conditions);


                //그리드헤더정보 추출
                columnList = new GridColumn[grid.Columns.Count];
                grid.Columns.CopyTo(columnList, 0);
                listCols = new List <string>(); //컬럼헤더정보 가져오기
                foreach (GridColumn gcol in columnList)
                {
                    try
                    {
                        if ("PrintN".Equals(gcol.Tag.ToString()))
                        {
                            continue;                                       //엑셀출력제외컬럼
                        }
                    }
                    catch (Exception) { }

                    listCols.Add(gcol.FieldName.ToString());
                }


                saveFileDialog       = null;
                saveFileDialog       = new System.Windows.Forms.SaveFileDialog();
                saveFileDialog.Title = "저장경로를 지정하세요.";

                //초기 파일명 지정
                saveFileDialog.FileName = DateTime.Now.ToString("yyyyMMdd") + "_" + "누수지점관리목록.xlsx";

                saveFileDialog.OverwritePrompt = true;
                saveFileDialog.Filter          = "Excel|*.xlsx";

                if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    strFileName = saveFileDialog.FileName;
                    thread      = new Thread(new ThreadStart(ExcelExportFX));
                    thread.Start();
                }
            }
            catch (Exception ex)
            {
                Messages.ShowErrMsgBoxLog(ex);
            }
        }
コード例 #24
0
ファイル: SplyCmplAddViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 생성자
        /// </summary>
        public SplyCmplAddViewModel()
        {
            dtl = new WserDtl();

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

                splyCmplAddView = obj as SplyCmplAddView;

                btnSave  = splyCmplAddView.btnSave;
                btnClose = splyCmplAddView.btnClose;
                btnDup   = splyCmplAddView.btnDup;


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


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


                //4.민원번호 채번
                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectRevNum");
                DataTable dt  = BizUtil.SelectList(param);
                string rcvNum = "";
                try
                {
                    rcvNum = dt.Rows[0]["RCV_NUM"].ToString();
                }
                catch (Exception) {}
                this.Dtl.RCV_NUM = rcvNum;
            });

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

                // 민원번호중복체크
                if (btnDup.Content.Equals("체크"))
                {
                    Messages.ShowInfoMsgBox("민원번호 (중복)체크를 하세요.");
                    return;
                }

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

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

                Messages.ShowOkMsgBox();
                //화면닫기
                btnClose.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            });


            //입력항목 변경되면 중복버튼 복원
            this.Dtl.DUP     = "체크";
            PropertyChanged += delegate(object sender, PropertyChangedEventArgs args) {
                try
                {
                    btnDup.Content = "체크";
                }
                catch (Exception) { }
            };

            this.DupCommand = new DelegateCommand <object>(delegate(object obj) {
                if (btnDup.Content.Equals("OK"))
                {
                    return;
                }


                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectWserDup");
                param.Add("RCV_NUM", this.Dtl.RCV_NUM);
                DataTable dt = BizUtil.SelectList(param);
                if (dt.Rows.Count > 1)
                {
                    Messages.ShowInfoMsgBox("민원번호가 중복되었습니다.");
                }
                else
                {
                    btnDup.Content = "OK";
                }
            });
        }
コード例 #25
0
        /// <summary>
        /// 조회작업
        /// </summary>
        /// <param name="obj"></param>
        private void InitModel(object obj)
        {
            try
            {
                // 4.초기조회
                Hashtable param = new Hashtable();
                DataTable dt    = new DataTable();

                String sYm        = Convert.ToDateTime(DateTime.Today).ToString("yyyyMM");
                String sMenuFleNm = "";
                int    nCt        = 0;


                param.Add("sqlId", "SelectDashMenuList");
                param.Add("pYm", sYm);
                param.Add("id", Logs.strLogin_ID);

                dt = BizUtil.SelectList(param);
                dashWinView.grid.ItemsSource = dt;

                dashWinView.ctl1.Content = null;
                dashWinView.ctl2.Content = null;
                dashWinView.ctl3.Content = null;
                dashWinView.ctl4.Content = null;

                foreach (DataRow row in dt.Rows)
                {
                    if ("Y".Equals(row["MNU_USE_YN"].ToString()))
                    {
                        nCt++;
                        sMenuFleNm = row["MNU_FLE_NM"].ToString();

                        if (nCt == 1)
                        {
                            if (sMenuFleNm == "dashChart1")
                            {
                                dashWinView.ctl1.Content = new UcChart01();
                            }
                            else if (sMenuFleNm == "dashChart2")
                            {
                                dashWinView.ctl1.Content = new UcChart02();
                            }
                            else if (sMenuFleNm == "dashChart3")
                            {
                                dashWinView.ctl1.Content = new UcChart03();
                            }
                            else if (sMenuFleNm == "dashChart4")
                            {
                                dashWinView.ctl1.Content = new UcChart04();
                            }
                            else if (sMenuFleNm == "dashChart5")
                            {
                                dashWinView.ctl1.Content = new UcChart05();
                            }
                            else if (sMenuFleNm == "dashChart6")
                            {
                                dashWinView.ctl1.Content = new UcChart06();
                            }
                            else if (sMenuFleNm == "dashChart7")
                            {
                                dashWinView.ctl1.Content = new UcChart07();
                            }
                            else
                            {
                                dashWinView.ctl1.Content = null;
                            }
                        }
                        else if (nCt == 2)
                        {
                            if (sMenuFleNm == "dashChart1")
                            {
                                dashWinView.ctl2.Content = new UcChart01();
                            }
                            else if (sMenuFleNm == "dashChart2")
                            {
                                dashWinView.ctl2.Content = new UcChart02();
                            }
                            else if (sMenuFleNm == "dashChart3")
                            {
                                dashWinView.ctl2.Content = new UcChart03();
                            }
                            else if (sMenuFleNm == "dashChart4")
                            {
                                dashWinView.ctl2.Content = new UcChart04();
                            }
                            else if (sMenuFleNm == "dashChart5")
                            {
                                dashWinView.ctl2.Content = new UcChart05();
                            }
                            else if (sMenuFleNm == "dashChart6")
                            {
                                dashWinView.ctl2.Content = new UcChart06();
                            }
                            else if (sMenuFleNm == "dashChart7")
                            {
                                dashWinView.ctl2.Content = new UcChart07();
                            }
                            else
                            {
                                dashWinView.ctl2.Content = null;
                            }
                        }
                        else if (nCt == 3)
                        {
                            if (sMenuFleNm == "dashChart1")
                            {
                                dashWinView.ctl3.Content = new UcChart01();
                            }
                            else if (sMenuFleNm == "dashChart2")
                            {
                                dashWinView.ctl3.Content = new UcChart02();
                            }
                            else if (sMenuFleNm == "dashChart3")
                            {
                                dashWinView.ctl3.Content = new UcChart03();
                            }
                            else if (sMenuFleNm == "dashChart4")
                            {
                                dashWinView.ctl3.Content = new UcChart04();
                            }
                            else if (sMenuFleNm == "dashChart5")
                            {
                                dashWinView.ctl3.Content = new UcChart05();
                            }
                            else if (sMenuFleNm == "dashChart6")
                            {
                                dashWinView.ctl3.Content = new UcChart06();
                            }
                            else if (sMenuFleNm == "dashChart7")
                            {
                                dashWinView.ctl3.Content = new UcChart07();
                            }
                            else
                            {
                                dashWinView.ctl3.Content = null;
                            }
                        }
                        else if (nCt == 4)
                        {
                            if (sMenuFleNm == "dashChart1")
                            {
                                dashWinView.ctl4.Content = new UcChart01();
                            }
                            else if (sMenuFleNm == "dashChart2")
                            {
                                dashWinView.ctl4.Content = new UcChart02();
                            }
                            else if (sMenuFleNm == "dashChart3")
                            {
                                dashWinView.ctl4.Content = new UcChart03();
                            }
                            else if (sMenuFleNm == "dashChart4")
                            {
                                dashWinView.ctl4.Content = new UcChart04();
                            }
                            else if (sMenuFleNm == "dashChart5")
                            {
                                dashWinView.ctl4.Content = new UcChart05();
                            }
                            else if (sMenuFleNm == "dashChart6")
                            {
                                dashWinView.ctl4.Content = new UcChart06();
                            }
                            else if (sMenuFleNm == "dashChart7")
                            {
                                dashWinView.ctl4.Content = new UcChart07();
                            }
                            else
                            {
                                dashWinView.ctl4.Content = null;
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
コード例 #26
0
ファイル: SplyMngListViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// SQL DataRow -> 모델클래스 생성기
        /// </summary>
        /// <param name="obj"></param>
        private void btnMethod(object obj)
        {
            string name_space = "GTI.WFMS.Models.Blk.Model";
            string class_name = "BlkDtl";

            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectBlk01Dtl");
            param.Add("FTR_CDE", "BZ001");
            param.Add("FTR_IDN", 1);

            DataTable dt = BizUtil.SelectList(param);
            DataRow   dr = dt.Rows[0];

            String sb = "";

            sb += "namespace " + name_space + "\r\n";
            sb += "{ " + "\r\n";
            sb += " public class " + class_name + ": CmmDtl" + "\r\n";
            sb += " { " + "\r\n";
            //sb += "     /// <summary>" + "\r\n";
            //sb += "     /// 인터페이스 구현부분" + "\r\n";
            //sb += "     /// </summary>" + "\r\n";
            //sb += "     public event PropertyChangedEventHandler PropertyChanged;" + "\r\n";
            //sb += "     protected void OnPropertyChanged(string propertyName)" + "\r\n";
            //sb += "         { " + "\r\n";
            //sb += "             if (PropertyChanged != null)" + "\r\n";
            //sb += "             { " + "\r\n";
            //sb += "                 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));" + "\r\n";
            //sb += "             } " + "\r\n";
            //sb += "         } " + "\r\n";

            sb += "\r\n";
            sb += "\r\n";
            sb += "\r\n";

            sb += "     /// <summary>" + "\r\n";
            sb += "     /// 프로퍼티 부분" + "\r\n";
            sb += "     /// </summary>" + "\r\n";
            foreach (DataColumn col in dt.Columns)
            {
                string value = dr[col].ToString();

                //type 결정
                string type_name = "string";
                if (col.ColumnName.Contains("_DIP") || col.ColumnName.Contains("_DIR"))
                {
                    type_name = "decimal?";
                }
                else if (col.ColumnName.Contains("_AMT") || col.ColumnName.Contains("_CNT") || col.ColumnName.Contains("_QTY"))
                {
                    type_name = "int?";
                }
                else
                {
                    switch (dr[col].GetType().Name.ToLower())
                    {
                    case "string":
                        type_name = "string";
                        break;

                    case "int":
                        type_name = "int";
                        break;

                    case "decimal":
                        type_name = "decimal";
                        break;

                    case "double":
                        type_name = "double";
                        break;

                    default:
                        break;
                    }
                }


                sb += "     private " + type_name + " __" + col + ";" + "\r\n";
                sb += "     public " + type_name + " " + col + "\r\n";
                sb += "     { " + "\r\n";
                sb += "         get { return __" + col + "; }" + "\r\n";
                sb += "         set " + "\r\n";
                sb += "         { " + "\r\n";
                sb += "         this.__" + col + " = value;" + "\r\n";
                sb += "         OnPropertyChanged(\"" + col + "\"); " + "\r\n";
                sb += "         } " + "\r\n";
                sb += "     } " + "\r\n";
            }

            sb += " } " + "\r\n";
            sb += "} " + "\r\n";


            Console.WriteLine("=========class string===========");
            Console.Write(sb);
            Console.WriteLine("=========class string===========");


            MessageBox.Show("모델생성 -> Console 확인");
        }
コード例 #27
0
        /// <summary>
        /// 생성자
        /// </summary>
        public FileMngViewModel()
        {
            // 초기로딩처리
            LoadedCommand = new DelegateCommand <object>(OnLoaded);


            // 파일인포리스트
            ItemsFile   = new ObservableCollection <FileInfo>();
            ItemsSelect = new ObservableCollection <FileDtl>();
            ItemsAdd    = new ObservableCollection <FileDtl>();



            //파일저장버튼 이벤트
            SaveFileCmd = new RelayCommand <object>(delegate(object obj)
            {
                if (ItemsFile.Count < 1)
                {
                    MessageBox.Show("저장할 파일이 없습니다.");
                    return;
                }
                upload_thread = new Thread(new ThreadStart(UploadFileListFX));
                upload_thread.Start();
            });

            //첨부내용 저장버튼 이벤트
            SaveCmd = new RelayCommand <object>(OnSave);



            //파일삭제버튼 이벤트
            DelCmd = new DelegateCommand <object>(delegate(object obj)
            {
                string seq = "";
                try
                {
                    seq = obj.ToString();
                }
                catch (Exception) { }

                if (FmsUtil.IsNull(seq) || "0".Equals(seq))
                {
                    Messages.ShowErrMsgBox("삭제할 대상이 없습니다.");
                    return;
                }


                string file_name     = "";
                string del_file_path = "";



                //0.첨부파일정보가져오기
                Hashtable param = new Hashtable();
                try
                {
                    param.Add("FIL_SEQ", Dtl.FIL_SEQ);
                    param.Add("SEQ", seq);
                    param.Add("sqlId", "SelectFileDtl");
                    DataTable dt = BizUtil.SelectList(param);
                    //물리파일명 가져오기
                    file_name = dt.Rows[0]["UPF_NAM"].ToString();
                }
                catch (Exception ex)
                {
                    Messages.ShowInfoMsgBox(ex.ToString());
                    InitModel();
                    return;
                }


                //1.첨부파일상세테이블 삭제
                param["sqlId"] = "DeleteFileSeq";
                BizUtil.Update(param);


                //2.물리적파일 삭제
                del_file_path = System.IO.Path.Combine(dir_name, file_name);
                try
                {
                    FileInfo fi = new FileInfo(del_file_path);
                    fi.Delete();
                }
                catch (Exception) { }

                //삭제성공
                Messages.ShowOkMsgBox();
                InitModel();
            });



            //기존파일 다운로드버튼 이벤트
            DownloadCmd = new RelayCommand <object>(delegate(object obj)
            {
                FileDtl dtl       = obj as FileDtl;
                string file_name  = dtl.DWN_NAM;
                string file_name2 = dtl.UPF_NAM;

                try
                {
                    source_file_path = System.IO.Path.Combine(dir_name, file_name2);
                }
                catch (Exception)
                {
                    Messages.ShowErrMsgBox("다운로드할 수 없습니다.");
                    return;
                }


                //파일다운로드
                saveFileDialog       = new System.Windows.Forms.SaveFileDialog();
                saveFileDialog.Title = "저장경로를 지정하세요.";
                //초기 파일명 지정
                saveFileDialog.FileName        = file_name;
                saveFileDialog.OverwritePrompt = true;
                //saveFileDialog.Filter = "Excel|*.xlsx";
                //saveFileDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
                saveFileDialog.Filter = "All files (*.*)|*.*";

                if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    target_file_path = saveFileDialog.FileName;
                    download_thread  = new Thread(new ThreadStart(DownloadFX));
                    download_thread.Start();
                }
            });


            //파일찾기버튼 이벤트
            FindFileCmd = new RelayCommand <object>(delegate(object obj)
            {
                OpenFileDialog openFileDialog   = new OpenFileDialog();
                openFileDialog.Multiselect      = true;
                openFileDialog.Filter           = "All files (*.*)|*.*";
                openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                if (openFileDialog.ShowDialog() == true)
                {
                    FileInfo[] files = openFileDialog.FileNames.Select(f => new FileInfo(f)).ToArray();  //파일인포

                    foreach (FileInfo fi in files)
                    {
                        try
                        {
                            //파일객체
                            ItemsFile.Add(fi);

                            //파일db객체
                            FileDtl dtl = new FileDtl();
                            dtl.DWN_NAM = fi.Name;
                            dtl.FIL_TYP = fi.Extension.Replace(".", "");
                            dtl.FIL_SIZ = fi.Length.ToString();
                            ItemsSelect.Add(dtl);
                        }
                        catch (Exception) {}
                    }
                }
            });



            //윈도우 마우스드래그
            WindowMoveCommand = new DelegateCommand <object>(delegate(object obj)
            {
                try
                {
                    if (Mouse.LeftButton == MouseButtonState.Pressed)
                    {
                        if (fileMngView.WindowState == WindowState.Maximized)
                        {
                            fileMngView.Top  = Mouse.GetPosition(fileMngView).Y - System.Windows.Forms.Cursor.Position.Y - 6;
                            fileMngView.Left = System.Windows.Forms.Cursor.Position.X - Mouse.GetPosition(fileMngView).X + 20;

                            fileMngView.WindowState = WindowState.Normal;
                        }
                        fileMngView.DragMove();
                    }
                }
                catch (Exception ex)
                {
                    Messages.ShowErrMsgBoxLog(ex);
                }
            });
        }
コード例 #28
0
ファイル: LekSiteDtlViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 생성자
        /// </summary>
        public LekSiteDtlViewModel()
        {
            this.LoadedCommand = new DelegateCommand <object>(delegate(object obj) {
                // 0.화면객체인스턴스화
                if (obj == null)
                {
                    return;
                }

                lekSiteDtlView = obj as LekSiteDtlView;

                btnSave  = lekSiteDtlView.btnSave;
                btnClose = lekSiteDtlView.btnClose;

                _FTR_CDE = lekSiteDtlView.txtFTR_CDE.Text;
                _FTR_IDN = lekSiteDtlView.txtFTR_IDN.Text;

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


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

                //4.초기조회
                InitModel();
            });

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


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

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

                Messages.ShowOkMsgBox();
                InitModel();
                //화면닫기
                //btnClose.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            });



            //삭제
            this.DelCommand = new DelegateCommand <object>(delegate(object obj) {
                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectBizIdFileDtl");
                param.Add("BIZ_ID", _FTR_CDE + _FTR_IDN);
                DataTable dt = BizUtil.SelectList(param);

                if (dt.Rows.Count > 0)
                {
                    Messages.ShowErrMsgBox("누수사진 내역이 존재합니다.");
                    return;
                }

                if (Messages.ShowYesNoMsgBox("누수지점을 삭제하시겠습니까?") != MessageBoxResult.Yes)
                {
                    return;
                }

                try
                {
                    BizUtil.Update2(this.Dtl, "DeleteWtlLeakDtl");
                }
                catch (Exception ex)
                {
                    Messages.ShowErrMsgBox("저장 처리중 오류가 발생하였습니다." + ex.Message);
                    return;
                }

                Messages.ShowOkMsgBox();
                //화면닫기
                btnClose.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            });
        }