private void btnSave_Click(object sender, EventArgs e)
        {
            WsSCodeGrpPra.WsSysCodeGrpPra pwSvc = null;
            string reCode = "";
            string reMsg  = "";

            try
            {
                pwSvc         = new WsSCodeGrpPra.WsSysCodeGrpPra();
                pwSvc.Url     = "http://" + AppInfo.SsServer + "/WebSvc/Sys/SysCode/WsSysCodeGrpPra.svc";
                pwSvc.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")
                        {
                            string scodeGrp_val  = dataGridView1.Rows[i].Cells["dgv1_SCODE_GRP"].Value.ToString();
                            string scodeNm_val   = dataGridView1.Rows[i].Cells["dgv1_SCODE_NM"].Value.ToString();
                            string usingFlag_val = dataGridView1.Rows[i].Cells["dgv1_USING_FLAG"].Value.ToString();
                            string sortNo_val    = dataGridView1.Rows[i].Cells["dgv1_SORT_NO"].Value.ToString();
                            string memo_val      = dataGridView1.Rows[i].Cells["dgv1_MEMO"].Value.ToString();

                            reCode = pwSvc.pmSysCodeGrp(scodeGrp_val, scodeNm_val, usingFlag_val, sortNo_val, memo_val, out reMsg);

                            if (reCode == "Y")
                            {
                                reCnt++;
                            }
                        }
                    }
                }

                if (reCnt > 0)
                {
                    MessageBox.Show("저장 성공" + " : " + reCnt.ToString());
                }
                else
                {
                    MessageBox.Show("저장 실패");
                }

                setDataBind_grideView1(scodeGrp);
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmSysCodeGrp.cs  (Function)::btnSave_Click  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (pwSvc != null)
                {
                    pwSvc.Dispose();
                }
            }
        }
        private void setDataBind_grideView1(string pScodeGrp)
        {
            WsSCodeGrpPra.WsSysCodeGrpPra pwSvc = null;
            string reCode = "";
            string reMsg  = "";

            WsSCodeGrpPra.DataSysCodeGrpPra[] getData = null;
            try
            {
                pwSvc         = new WsSCodeGrpPra.WsSysCodeGrpPra();
                pwSvc.Url     = "http://" + AppInfo.SsServer + "/WebSvc/Sys/SysCode/WsSysCodeGrpPra.svc";
                pwSvc.Timeout = 1000;

                reCode = pwSvc.psSysCodeGrp(pScodeGrp, out getData, out reMsg);

                //dataGridView1.DataSource = getData;
                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_SCODE_GRP"].Value  = getData[i].SCODE_GRP.ToString();
                            dataGridView1.Rows[i].Cells["dgv1_SCODE_NM"].Value   = getData[i].SCODE_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);
                    }
                }
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::FrmSysCodeGrp.cs  (Function)::setDataBind_grideView1  (Detail)::pScodeGrp=[" + pScodeGrp + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmSysCodeGrp.cs  (Function)::setDataBind_grideView1  (Detail)::reMsg=[" + reMsg + "]", "Error");
                logs.SaveLog("[error]  (page)::FrmSysCodeGrp.cs  (Function)::setDataBind_grideView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (pwSvc != null)
                {
                    pwSvc.Dispose();
                }
            }
        }
        private void setDataBind_treeView1()
        {
            treeView1.Nodes.Clear();

            WsSCodeGrpPra.WsSysCodeGrpPra pwSvc = null;
            string reCode = "";
            string reMsg  = "";

            WsSCodeGrpPra.DataSysCodeGrpPra[] getData = null;


            try
            {
                pwSvc         = new WsSCodeGrpPra.WsSysCodeGrpPra();
                pwSvc.Url     = "http://" + AppInfo.SsServer + "/WebSvc/Sys/SysCode/WsSysCodeGrpPra.svc";
                pwSvc.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  = "";
                root.Text = "전체";

                reCode = pwSvc.psSysCodeGrp("", out getData, out reMsg);
                if (reCode == "Y")
                {
                    if (getData != null && getData.Length > 0)
                    {
                        for (int i = 0; i < getData.Length; i++)
                        {
                            string scodeGrp_val = getData[i].SCODE_GRP.ToString();
                            string scodeNm_val  = getData[i].SCODE_NM.ToString();

                            TreeNode node1 = new TreeNode();
                            node1.Tag  = scodeGrp_val;
                            node1.Text = scodeNm_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)::FrmSysCodeGrp.cs  (Function)::setDataBind_treeView1  (Detail):: " + "\r\n" + ex.ToString(), "Error");
            }
            finally
            {
                if (pwSvc != null)
                {
                    pwSvc.Dispose();
                }
            }
        }