예제 #1
0
        private void dataGridViewCheck_DoubleClick(object sender, EventArgs e)
        {
            this.SavaType = "edit";
            DataGridViewRow row = this.dataGridViewCheck.CurrentRow;

            this.EditId = row.Cells["ID"].Value.ToString();
            string NAME        = row.Cells["质检项"].Value.ToString();
            string TYPE        = row.Cells["CHECKTYPE"].Value.ToString();
            string TABLENAME   = row.Cells["TABLENAME"].Value.ToString();
            string WHERESTRING = row.Cells["WHERESTRING"].Value.ToString();
            string SUPTABLE    = row.Cells["SUPTABLE"].Value.ToString();
            string INPUTTEXT   = row.Cells["INPUTTEXT"].Value.ToString();

            //string checkType = this.comboBoxCheckType.SelectedItem.ToString();
            textBoxName.Text = NAME;
            this.comboBoxCheckType.SelectedIndex = this.comboBoxCheckType.FindString(TYPE);
            foreach (DataRowView iTable in this.comboBoxDataSource.Items)
            {
                if (TABLENAME == iTable.Row[0].ToString())
                {
                    this.comboBoxDataSource.SelectedIndex = this.comboBoxDataSource.FindString((string)iTable.Row[1]);
                }
            }
            if (TYPE == "面内包含点个数")
            {
                FormContainPoint formContainPoint = new FormContainPoint();
                ContainPoint.textBoxWhereValue    = WHERESTRING;
                ContainPoint.comboBoxPointValue   = SUPTABLE;
                ContainPoint.textBoxNumPointValue = INPUTTEXT;
            }
            else if (TYPE == "面和线不相交")
            {
                FormNoInterLine formNoInterLine = new FormNoInterLine();
                NoInterLine.comboBoxLineValue = SUPTABLE;
            }
            else if (TYPE == "面重叠检查(与其他图层)")
            {
                FormNoOverlapArea formNoOverlapArea = new FormNoOverlapArea();
                NoOverlapArea.comboBoxOverLayerValue = SUPTABLE;
            }
            else if (TYPE == "细碎面")
            {
                Formxbm formxbm = new Formxbm();
                xbmDig.textBoxwhereValue = WHERESTRING;
                xbmDig.textBoxinputValue = INPUTTEXT;
            }
            else if (TYPE == "缝隙检查")
            {
                FormNoGaps formgaps = new FormNoGaps();
                NoGaps.textBoxareaValue = INPUTTEXT;
            }
            else
            {
            }
        }
예제 #2
0
        /// <summary>
        ///    面内包含点个数
        ///    面多部件检查
        ///    面和线不相交
        ///    跨边界面不相交
        ///    跨图层面重叠
        ///    面图层自相交
        ///    面缝隙
        ///    面重叠
        ///    细碎面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void comboBoxCheckType_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.splitContainer2.Panel2.Controls.Clear();
            if (comboBoxCheckType.SelectedItem == null)
            {
                return;
            }
            string checkType = comboBoxCheckType.Text.ToString();

            if (checkType == "面内包含点个数")
            {
                FormContainPoint formContainPoint = new FormContainPoint();
                ContainPoint = formContainPoint;
                ShowForm(this.splitContainer2.Panel2, formContainPoint);
            }
            else if (checkType == "面和线不相交")
            {
                FormNoInterLine formNoInterLine = new FormNoInterLine();
                NoInterLine = formNoInterLine;
                ShowForm(this.splitContainer2.Panel2, formNoInterLine);
            }
            else if (checkType == "面重叠检查(与其他图层)")
            {
                FormNoOverlapArea formNoOverlapArea = new FormNoOverlapArea();
                NoOverlapArea = formNoOverlapArea;
                ShowForm(this.splitContainer2.Panel2, formNoOverlapArea);
            }
            else if (checkType == "细碎面")
            {
                Formxbm formxbm = new Formxbm();
                xbmDig = formxbm;
                ShowForm(this.splitContainer2.Panel2, formxbm);
            }
            else if (checkType == "缝隙检查")
            {
                FormNoGaps formgaps = new FormNoGaps();
                NoGaps = formgaps;
                ShowForm(this.splitContainer2.Panel2, formgaps);
            }
        }
예제 #3
0
        private void buttonTopoSave_Click(object sender, EventArgs e)
        {
            ConnectDB db        = new ConnectDB();
            string    checkType = comboBoxCheckType.Text.ToString();
            string    name      = textBoxName.Text;
            string    table     = comboBoxDataSource.SelectedValue.ToString();
            string    type      = comboBoxCheckType.Text;

            Boolean result = true;

            if (checkType == "面内包含点个数")
            {
                FormContainPoint formContainPoint = new FormContainPoint();
                string where = ContainPoint.textBoxWhereValue;
                string supTable  = ContainPoint.comboBoxPointValue;
                string inputText = ContainPoint.textBoxNumPointValue;
                if (this.SavaType == "edit")
                {
                    result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',WHERESTRING = '" + where + "',SUPTABLE='" + supTable + "',INPUTTEXT = '" + inputText + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                }
                else
                {
                    result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,WHERESTRING,SUPTABLE,INPUTTEXT,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + where + "','" + supTable + "','" + inputText + "','" + this.scheme + "'," + this.checkNo + ")");
                }
            }
            else if (checkType == "面和线不相交")
            {
                FormNoInterLine formNoInterLine = new FormNoInterLine();
                string          supTable        = NoInterLine.comboBoxLineValue;
                if (this.SavaType == "edit")
                {
                    result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',SUPTABLE='" + supTable + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                }
                else
                {
                    result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,SUPTABLE,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + supTable + "','" + this.scheme + "'," + this.checkNo + ")");
                }
            }
            else if (checkType == "面重叠检查(与其他图层)")
            {
                FormNoOverlapArea formNoOverlapArea = new FormNoOverlapArea();
                string            supTable          = NoOverlapArea.comboBoxOverLayerValue;
                if (supTable == table)
                {
                    DialogResult dr = MessageBox.Show("主表和附表一样,是否继续?", "提示", MessageBoxButtons.YesNo);
                    if (dr == DialogResult.Yes)
                    {
                        if (this.SavaType == "edit")
                        {
                            result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',SUPTABLE='" + supTable + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                        }
                        else
                        {
                            result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,SUPTABLE,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + supTable + "','" + this.scheme + "'," + this.checkNo + ")");
                        }
                    }
                    else
                    {
                        return;
                    }
                }
                else
                {
                    if (this.SavaType == "edit")
                    {
                        result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',SUPTABLE='" + supTable + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                    }
                    else
                    {
                        result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,SUPTABLE,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + supTable + "','" + this.scheme + "'," + this.checkNo + ")");
                    }
                }
            }
            else if (checkType == "细碎面")
            {
                Formxbm formxbm = new Formxbm();
                string where = xbmDig.textBoxwhereValue;
                string input = xbmDig.textBoxinputValue;
                if (this.SavaType == "edit")
                {
                    result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',WHERESTRING='" + where + "',INPUTTEXT='" + input + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                }
                else
                {
                    result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,WHERESTRING,INPUTTEXT,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + where + "','" + input + "','" + this.scheme + "'," + this.checkNo + ")");
                }
            }
            else if (checkType == "缝隙检查")
            {
                FormNoGaps formgaps = new FormNoGaps();
                string     input    = NoGaps.textBoxareaValue;
                if (this.SavaType == "edit")
                {
                    result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',INPUTTEXT='" + input + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                }
                else
                {
                    result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,INPUTTEXT,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + input + "','" + this.scheme + "'," + this.checkNo + ")");
                }
            }
            else
            {
                if (this.SavaType == "edit")
                {
                    result = db.Update("update GISDATA_TBTOPO set NAME= '" + name + "',CHECKTYPE = '" + type + "',TABLENAME = '" + table + "',SCHEME = '" + this.scheme + "',STEP_NO = " + this.checkNo + " where ID = " + this.EditId);
                }
                else
                {
                    result = db.Insert("insert into GISDATA_TBTOPO (NAME,CHECKTYPE,TABLENAME,SCHEME,STEP_NO) VALUES('" + name + "','" + type + "','" + table + "','" + this.scheme + "'," + this.checkNo + ")");
                }
            }
            if (result)
            {
                refushTable();
            }
        }