Пример #1
0
        private void SetDataBind_gridView1()
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataComnCodeGrp[] getData = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp(); // 시스템 코드 보여주기
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                reCode = wSvc.sComnCodeGrp(out getData, out reMsg);

                if (reCode == "Y")
                {
                    if (getData != null && getData.Length > 0)
                    {
                        dataGridView1.Rows.Clear();
                        for (int i = 0; i < getData.Length; i++)
                        {
                            dataGridView1.Rows.Add();
                            dataGridView1.Rows[i].Cells["dgv1_CHK"].Value          = "0";
                            dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value    = getData[i].CCODE_GRP.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP_NM"].Value = getData[i].CCODE_GRP_NM.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_USING_FLAG"].Value   = getData[i].USING_FLAG.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_SORT_NO"].Value      = getData[i].SORT_NO.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_MEMO"].Value         = getData[i].MEMO.ToString();
                        }

                        SetRowNumber(dataGridView1);
                    }
                    else
                    {
                        dataGridView1.Rows.Clear();
                        //MessageBox.Show("데이터가 없습니다");
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpMainDB.cs  (Function)::SetDataBind_gridView1  (Detail)::reMsg=[" + reMsg + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpMainDB.cs  (Function)::SetDataBind_gridView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
        private void GetDbNm()
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";
            string reData = "";

            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;


                reCode = wSvc.siteDbNm(AppInfo.SsSiteCd, out reData, out reMsg);

                if (reCode == "Y")
                {
                    if (!string.IsNullOrEmpty(reData))
                    {
                        _dbNm = reData;
                    }
                    //AppInfo.SsSiteCd = cmbSite.SelectedValue.ToString(); // CMBBOX에서 선택된 SITE_CD 값을 APPINFO.SsSiteCD에 담는다
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::GetDbNm  (Detail)::reCode=[" + reCode + "], reMsg=[" + reMsg + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::GetDbNm  (Detail)::" + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
        private void SetDataBind_CmbSite()
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataCodeAuthSiteMemberDB[] getData = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                reCode = wSvc.sCodeAuthSiteMemberDB(AppInfo.SsDbNm, out getData, out reMsg);
                if (reCode == "Y")
                {
                    if (getData != null && getData.Length > 0)
                    {
                        Class.Common.ComboBoxItemSet setCmb = null;

                        setCmb = new Class.Common.ComboBoxItemSet();
                        setCmb.AddColumn();

                        for (int i = 0; i < getData.Length; i++)
                        {
                            setCmb.AddRow(getData[i].AUTH_NM.ToString(), getData[i].AUTH_CD.ToString());
                        }

                        setCmb.Bind(cmbSite);
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmCodeTAuthSite.cs  (Function)::SetDataBind_CmbSite  (Detail):: " + "\r\n" + ex.ToString());
            }
        }
Пример #4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode      = "";
            string reMsg       = "";
            int    reData      = 0;
            bool   reSpecified = false;

            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                int reCnt = 0;
                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value != null)
                    {
                        if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value.ToString() == "1")
                        {
                            reCnt++;
                        }
                    }
                }
                if (reCnt < 1)
                {
                    MessageBox.Show(msgRM.GetString("msgNotSelected"));
                    return;
                }

                reCnt = 0;

                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value != null)
                    {
                        if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value.ToString() == "1")
                        {
                            string ccode_val     = dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value.ToString();
                            string ccodeNm_val   = dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP_NM"].Value.ToString();
                            string usingFlag_val = dataGridView1.Rows[i].Cells["dgv1_USING_FLAG"].Value.ToString();

                            string sortNo_val = "1";
                            if (dataGridView1.Rows[i].Cells["dgv1_SORT_NO"].Value != null)
                            {
                                sortNo_val = dataGridView1.Rows[i].Cells["dgv1_SORT_NO"].Value.ToString();
                            }


                            string memo_val = "";
                            if (dataGridView1.Rows[i].Cells["dgv1_MEMO"].Value != null)
                            {
                                memo_val = dataGridView1.Rows[i].Cells["dgv1_MEMO"].Value.ToString();
                            }

                            reCode = wSvc.mComnCodeGrp(ccode_val, ccodeNm_val, usingFlag_val, sortNo_val, memo_val, out reMsg, out reData, out reSpecified);

                            if (reCode == "Y" && reData > 0)
                            {
                                reCnt += Convert.ToInt16(reData);
                            }
                        }
                    }
                }

                if (reCnt > 0)
                {
                    MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wSuccess") + " : " + reCnt.ToString());
                }
                else
                {
                    MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wFail"));
                }

                SetDataBind_gridView1();
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpMainDB.cs  (Function)::btnSave_Click  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
Пример #5
0
        private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string colNm = dataGridView2.Columns[e.ColumnIndex].Name;

            if (colNm == "dgv2_BTNADD")
            {
                string reVal = ChkDgv2Param();

                if (reVal != "")
                {
                    MessageBox.Show(wRM.GetString("wCheck") + " :: " + reVal);
                }
                else
                {
                    string ccodeGrp_val  = dataGridView2.Rows[0].Cells["dgv2_CCODE_GRP"].Value.ToString();
                    string ccodeNm_val   = dataGridView2.Rows[0].Cells["dgv2_CCODE_GRP_NM"].Value.ToString();
                    string usingFlag_val = "1";

                    string sortNo_val = "1";
                    if (dataGridView2.Rows[0].Cells["dgv2_SORT_NO"].Value != null)
                    {
                        sortNo_val = dataGridView2.Rows[0].Cells["dgv2_SORT_NO"].Value.ToString();
                    }

                    string memo_val = "";
                    if (dataGridView2.Rows[0].Cells["dgv2_MEMO"].Value != null)
                    {
                        memo_val = dataGridView2.Rows[0].Cells["dgv2_MEMO"].Value.ToString();
                    }

                    string pInputId = "1";

                    M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
                    string reCode = "";
                    string reMsg  = "";
                    string reData = "";
                    try
                    {
                        wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                        wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                        wSvc.Timeout = 1000;

                        reCode = wSvc.exComnCodeGrp(ccodeGrp_val, out reMsg, out reData);

                        if (reCode == "Y" && reData != "0")
                        {
                            MessageBox.Show(msgRM.GetString("msgDuplicated"));
                        }
                        else
                        {
                            reCode = "";
                            reCode = wSvc.aComnCodeGrp(ccodeGrp_val, ccodeNm_val, usingFlag_val, sortNo_val, memo_val, pInputId, out reMsg, out reData);

                            int reCnt = 0;

                            if (reCode == "Y" && reData != "")
                            {
                                reCnt = Convert.ToInt16(reData);
                            }

                            if (reCnt > 0)
                            {
                                MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wSuccess") + " : " + reCnt.ToString());
                            }
                            else
                            {
                                MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wFail"));
                            }
                        }

                        SetDataBind_gridView1();
                        SetDataBind_grideView2();
                    }
                    catch (Exception ex)
                    {
                        logs.SaveLog("[error]  (page)::FrmComnCodeGrpMainDB.cs  (Function)::dataGridView2_CellClick  (Detail):: " + "\r\n" + ex.ToString(), "Error");
                    }
                    finally
                    {
                        if (wSvc != null)
                        {
                            wSvc.Dispose();
                        }
                    }
                }
            }
        }
Пример #6
0
        private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string colNm = dataGridView2.Columns[e.ColumnIndex].Name;

            if (colNm == "dgv2_BTNADD")
            {
                string reVal = ChkDgv2Param();

                if (reVal != "")
                {
                    MessageBox.Show(wRM.GetString("wCheck") + " :: " + reVal);
                }
                else
                {
                    string ccodeNm_val = dataGridView2.Rows[0].Cells["dgv2_CCODE_Nm"].Value.ToString();

                    string memo_val = "";
                    if (dataGridView2.Rows[0].Cells["dgv2_MEMO"].Value != null)
                    {
                        memo_val = dataGridView2.Rows[0].Cells["dgv2_MEMO"].Value.ToString();
                    }

                    string sortNo_val = "10";
                    if (dataGridView2.Rows[0].Cells["dgv2_SORT_NO"].Value != null)
                    {
                        sortNo_val = dataGridView2.Rows[0].Cells["dgv2_SORT_NO"].Value.ToString();
                    }

                    M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
                    string reCode = "";
                    string reMsg  = "";
                    string reData = "";
                    try
                    {
                        wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                        wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                        wSvc.Timeout = 1000;

                        int reCnt = 0;

                        string[] param = new string[6];
                        param[0] = AppInfo.SsSiteCd;
                        param[1] = _pCcodeGrp;
                        param[2] = ccodeNm_val;
                        param[3] = memo_val;
                        param[4] = sortNo_val;
                        param[5] = AppInfo.SsLabNo;

                        reCode = wSvc.aComnSite(AppInfo.SsDbNm, param, out reMsg, out reData);

                        if (reCode == "Y" && reData != "0")
                        {
                            reCnt += Convert.ToInt16(reData);
                        }


                        if (reCnt != 0)
                        {
                            string searchValue = dataGridView2.Rows[0].Cells["dgv2_CCODE_Nm"].Value.ToString();

                            //int rowIndex = -1;
                            foreach (DataGridViewRow row in dataGridView1.Rows)
                            {
                                if (row.Cells["dgv1_CCODE_NM"].Value.ToString().Equals(searchValue))
                                {
                                    MessageBox.Show(msgRM.GetString("msgSameName"));
                                    return;
                                }
                            }
                            MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wSuccess"));
                        }
                        else
                        {
                            MessageBox.Show(wRM.GetString("wSave") + " " + wRM.GetString("wFail"));
                        }

                        SetDataBind_gridView1(_pCcodeGrp);
                    }
                    catch (Exception ex)
                    {
                        logs.SaveLog("[error]  (page)::FrmComnCodeSite.cs  (Function)::dataGridView2_CellClick  (Detail):: " + "\r\n" + ex.ToString(), "Error");
                    }
                    finally
                    {
                        if (wSvc != null)
                        {
                            wSvc.Dispose();
                        }
                    }
                }
            }
        }
Пример #7
0
        private void SetDataBind_gridView1(string pCcodeGrp)
        {
            string searchTxt_val = "";

            if (!string.IsNullOrEmpty(txtSearch.Text))
            {
                searchTxt_val = txtSearch.Text;
            }

            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataComecodeSite[] getData = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                reCode = wSvc.sComnSite(AppInfo.SsDbNm, AppInfo.SsSiteCd, pCcodeGrp, cmbUse.SelectedValue.ToString(), searchTxt_val, out getData, out reMsg);

                if (reCode == "Y")
                {
                    if (getData != null && getData.Length > 0)
                    {
                        dataGridView1.Rows.Clear();
                        for (int i = 0; i < getData.Length; i++)
                        {
                            dataGridView1.Rows.Add();
                            dataGridView1.Rows[i].Cells["dgv1_CHK"].Value        = "0";
                            dataGridView1.Rows[i].Cells["dgv1_CCODE"].Value      = getData[i].CCODE.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value  = getData[i].CCODE_GRP.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_CCODE_NM"].Value   = getData[i].CCODE_NM.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_USING_FLAG"].Value = getData[i].USING_FLAG.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_SORT_NO"].Value    = getData[i].SORT_NO.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_MEMO"].Value       = getData[i].MEMO.ToString();
                        }

                        SetRowNumber(dataGridView1);
                    }
                    else
                    {
                        dataGridView1.Rows.Clear();
                        //MessageBox.Show("데이터가 없습니다");
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeSite.cs  (Function)::SetDataBind_gridView1  (Detail)::pCcodeGrp=[" + pCcodeGrp + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeSite.cs  (Function)::SetDataBind_gridView1  (Detail)::reMsg=[" + reMsg + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeSite.cs  (Function)::SetDataBind_gridView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
Пример #8
0
        private void SetDataBind_treeView1()
        {
            treeView1.Nodes.Clear();

            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataSetAuthSiteMemberDB[] getData1 = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                ImageList myimageList = new ImageList();
                myimageList.Images.Add(Image.FromFile(@"Image\treeicon1.png"));

                treeView1.ImageList  = myimageList;
                treeView1.ImageIndex = 0;

                reCode = wSvc.sComnSiteTreeView(AppInfo.SsDbNm, AppInfo.SsSiteCd, AppInfo.SsLabAuth, out getData1, out reMsg);
                if (reCode == "Y")
                {
                    if (getData1 != null && getData1.Length > 0)
                    {
                        for (int i = 0; i < getData1.Length; i++)
                        {
                            string ccodeGrp_val   = getData1[i].CCODE_GRP.ToString();
                            string ccodeGrpNm_val = getData1[i].CCODE_GRP_NM.ToString();
                            string newFlag_val    = getData1[i].NEW_FLAG.ToString();
                            string modifyFlag_val = getData1[i].MODIFY_FLAG.ToString();
                            string delFlag_val    = getData1[i].DEL_FLAG.ToString();

                            TreeNode node1 = new TreeNode();
                            node1.Tag  = ccodeGrp_val + "-" + newFlag_val + "-" + modifyFlag_val + "-" + delFlag_val;
                            node1.Text = ccodeGrpNm_val;

                            treeView1.Nodes.Add(node1);
                        }

                        if (treeView1.Nodes.Count > 0)
                        {
                            treeView1.SelectedNode = treeView1.GetNodeAt(0, 0);
                        }

                        treeView1.ExpandAll();
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeSite.cs  (Function)::setDataBind_treeView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;

            string reCode = "";
            string reMsg  = "";
            string reData = "";

            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                int reCnt = 0;
                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value != null)
                    {
                        if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value.ToString() == "1")
                        {
                            reCnt++;
                        }
                    }
                }
                if (reCnt < 1)
                {
                    MessageBox.Show(msgRM.GetString("msgNotSelected"));
                    return;
                }

                reCnt = 0;
                int reCnt2 = 0;

                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value != null)
                    {
                        if (dataGridView1.Rows[i].Cells["dgv1_CHK"].Value.ToString() == "1")
                        {
                            string ccodeGrp_val     = dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value.ToString();
                            string viewFlag_val     = dataGridView1.Rows[i].Cells["dgv1_VIEW_FLAG"].Value.ToString();
                            string newFlag_val      = dataGridView1.Rows[i].Cells["dgv1_NEW_FLAG"].Value.ToString();
                            string modifyFlag_val   = dataGridView1.Rows[i].Cells["dgv1_MODIFY_FLAG"].Value.ToString();
                            string delFlag_val      = dataGridView1.Rows[i].Cells["dgv1_DEL_FLAG"].Value.ToString();
                            string reportFlag_val   = dataGridView1.Rows[i].Cells["dgv1_REPORT_FLAG"].Value.ToString();
                            string printFlag_val    = dataGridView1.Rows[i].Cells["dgv1_PRINT_FLAG"].Value.ToString();
                            string downloadFlag_val = dataGridView1.Rows[i].Cells["dgv1_DOWNLOAD_FLAG"].Value.ToString();
                            string pInputId         = "1";
                            reCode = wSvc.mSetAuthSiteMemberDB(_dbNm, AppInfo.SsSiteCd, cmbSite.SelectedValue.ToString(), ccodeGrp_val, viewFlag_val, newFlag_val, modifyFlag_val, delFlag_val, reportFlag_val, printFlag_val, downloadFlag_val, pInputId, out reMsg, out reData);

                            if (reCode == "Y")
                            {
                                if (Convert.ToInt16(reData) < 1)
                                {
                                    reCode = wSvc.aSetAuthSiteMemberDB(_dbNm, AppInfo.SsSiteCd, cmbSite.SelectedValue.ToString(), ccodeGrp_val, viewFlag_val, newFlag_val, modifyFlag_val, delFlag_val, reportFlag_val, printFlag_val, downloadFlag_val, pInputId, out reMsg, out reData);
                                }
                            }


                            if (reCode == "Y" && reData != "0")
                            {
                                reCnt++;
                            }
                            else
                            {
                                reCnt2++;
                            }
                        }
                    }
                }

                MessageBox.Show(wRM.GetString("wSuccess") + "[" + reCnt.ToString() + "], " + wRM.GetString("wFail") + "[" + reCnt2.ToString() + "]");
                SetDataBind_gridView1(_ccodeGrp);
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::btnSave_Click  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
        private void SetDataBind_gridView1(string pCcodeGrp)
        {
            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataSetAuthSiteMemberDB[] getData = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                if (_ccodeGrp == "All")
                {
                    reCode = wSvc.sSetAuthSiteMemberDB(_dbNm, AppInfo.SsSiteCd, cmbSite.SelectedValue.ToString(), out getData, out reMsg);

                    if (reCode == "Y")
                    {
                        if (getData != null && getData.Length > 0)
                        {
                            dataGridView1.Rows.Clear();

                            for (int i = 0; i < getData.Length; i++)
                            {
                                dataGridView1.Rows.Add();
                                dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value     = getData[i].CCODE_GRP.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_NM"].Value            = getData[i].CCODE_GRP_NM.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_VIEW_FLAG"].Value     = getData[i].VIEW_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_NEW_FLAG"].Value      = getData[i].NEW_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_MODIFY_FLAG"].Value   = getData[i].MODIFY_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_DEL_FLAG"].Value      = getData[i].DEL_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_REPORT_FLAG"].Value   = getData[i].REPORT_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_PRINT_FLAG"].Value    = getData[i].PRINT_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_DOWNLOAD_FLAG"].Value = getData[i].DOWNLOAD_FLAG.ToString();
                            }

                            SetRowNumber(dataGridView1);
                        }
                        else
                        {
                            dataGridView1.Rows.Clear();
                            //MessageBox.Show("데이터가 없습니다");
                        }
                    }
                }
                else
                {
                    reCode = wSvc.sSetAuthSiteMemberDBSub(_ccodeGrp, _dbNm, AppInfo.SsSiteCd, cmbSite.SelectedValue.ToString(), out getData, out reMsg);

                    if (reCode == "Y")
                    {
                        if (getData != null && getData.Length > 0)
                        {
                            dataGridView1.Rows.Clear();

                            for (int i = 0; i < getData.Length; i++)
                            {
                                dataGridView1.Rows.Add();
                                dataGridView1.Rows[i].Cells["dgv1_CCODE_GRP"].Value     = getData[i].CCODE_GRP.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_NM"].Value            = getData[i].CCODE_GRP_NM.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_VIEW_FLAG"].Value     = getData[i].VIEW_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_NEW_FLAG"].Value      = getData[i].NEW_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_MODIFY_FLAG"].Value   = getData[i].MODIFY_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_DEL_FLAG"].Value      = getData[i].DEL_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_REPORT_FLAG"].Value   = getData[i].REPORT_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_PRINT_FLAG"].Value    = getData[i].PRINT_FLAG.ToString();
                                dataGridView1.Rows[i].Cells["dgv1_DOWNLOAD_FLAG"].Value = getData[i].DOWNLOAD_FLAG.ToString();
                            }

                            SetRowNumber(dataGridView1);
                        }
                        else
                        {
                            dataGridView1.Rows.Clear();
                            //MessageBox.Show("데이터가 없습니다");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::SetDataBind_gridView1  (Detail)::pScodeGrp=[" + pCcodeGrp + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::SetDataBind_gridView1  (Detail)::reMsg=[" + reMsg + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::SetDataBind_gridView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }
        private void SetDataBind_treeView1()
        {
            treeView1.Nodes.Clear();

            M_WsCCodeGrp.WsComnCodeGrp wSvc = null;
            string reCode = "";
            string reMsg  = "";

            M_WsCCodeGrp.DataComnCodeGrp[] getData1 = null;
            try
            {
                wSvc         = new M_WsCCodeGrp.WsComnCodeGrp();
                wSvc.Url     = "http://" + AppInfo.SsWsvcServer2 + "/WebSvc/Sys/ComnCode/WsComnCodeGrp.svc";
                wSvc.Timeout = 1000;

                ImageList myimageList = new ImageList();
                myimageList.Images.Add(Image.FromFile(@"Image\treeicon1.png"));

                treeView1.ImageList  = myimageList;
                treeView1.ImageIndex = 0;

                TreeNode root = new TreeNode();
                root.Tag  = "All";
                root.Text = wRM.GetString("wTotal");

                reCode = wSvc.sComnCodeGrpUsingFlag(out getData1, out reMsg);
                if (reCode == "Y")
                {
                    if (getData1 != null && getData1.Length > 0)
                    {
                        for (int i = 0; i < getData1.Length; i++)
                        {
                            string ccodeGrp_val   = getData1[i].CCODE_GRP.ToString();
                            string ccodeGrpNm_val = getData1[i].CCODE_GRP_NM.ToString();

                            TreeNode node1 = new TreeNode();
                            node1.Tag  = ccodeGrp_val;
                            node1.Text = ccodeGrpNm_val;

                            root.Nodes.Add(node1);
                        }

                        treeView1.Nodes.Add(root);

                        if (treeView1.Nodes.Count > 0)
                        {
                            treeView1.SelectedNode = treeView1.GetNodeAt(0, 0);
                        }

                        treeView1.ExpandAll();
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmComnCodeGrpSetAuthSite.cs  (Function)::SetDataBind_treeView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (wSvc != null)
                {
                    wSvc.Dispose();
                }
            }
        }