示例#1
0
        private void btnView_Click(object sender, EventArgs e)
        {
            DataRow       datarow     = this.gridView1.GetFocusedDataRow();
            FormCoordPara coorParaFrm = new FormCoordPara(datarow);

            coorParaFrm.Text = "查看 转换参数";
            coorParaFrm.ShowDialog(this);
        }
示例#2
0
        //private void resetBtn_Click(object sender, EventArgs e)
        //{
        //    countryNameCmb.Text = "";
        //    countryNameCmb.ClosePopup();
        //    paraTypeCmb.Text = "";
        //    gridView1.ActiveFilterString = null;
        //    paraCountLbl.Text = string.Format("共有{0}条记录", gridView1.RowCount);
        //}

        private void addBtn_Click(object sender, EventArgs e)
        {
            DataRow       datarow     = this.gridView1.GetFocusedDataRow();
            FormCoordPara coorParaFrm = new FormCoordPara(datarow);

            coorParaFrm.Text = "新增 转换参数";
            coorParaFrm.ShowDialog(this);
            paraGridControl.DataSource = AccessHelper.ExecuteDataTable("select * from CoordinatePara", null);
            Search();
        }
示例#3
0
        private void editBtn_Click(object sender, EventArgs e)
        {
            DataRow datarow = this.gridView1.GetFocusedDataRow();

            if (!(bool)datarow["Defined"])
            {
                MessageBox.Show("非自定义参数不可编辑!", "提示");
                return;
            }
            FormCoordPara coorParaFrm = new FormCoordPara(datarow);

            coorParaFrm.Text = "编辑 转换参数";
            coorParaFrm.ShowDialog(this);
            paraGridControl.DataSource = AccessHelper.ExecuteDataTable("select * from CoordinatePara", null);
            Search();
        }
示例#4
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            if (this._trancParamClass == null)
            {
                MessageBox.Show("请先计算参数!");
                return;
            }
            if (this.btnEditCountry.EditValue == null || this.buttonEdit1.EditValue == null)
            {
                MessageBox.Show("请选择对应坐标系!");
                return;
            }
            bool firstSave = false;//第一次保存

            if (this._wkid == -1)
            {
                this._wkid = Convert.ToInt32(AccessHelper.ExecuteScalar("select max (wkid) from CoordinatePara ", null)) + 1;
                firstSave  = true;
            }
            this._trancParamClass.WKID       = _wkid;
            this._trancParamClass.Defined    = true;
            this._trancParamClass.Method     = "CF";
            this._trancParamClass.PARAM_TYPE = "7";
            this._trancParamClass.SOU_PRJ    = this.btnEditCountry.Text;
            this._trancParamClass.SOU_WKID   = (this.btnEditCountry.EditValue as CoordProjClass).WKID;
            this._trancParamClass.TAR_PRJ    = this.buttonEdit1.Text;
            this._trancParamClass.TAR_WKID   = (this.buttonEdit1.EditValue as CoordProjClass).WKID;
            DataRow       datarow     = this._trancParamClass.ToDatarow();
            FormCoordPara coorParaFrm = new FormCoordPara(datarow);

            coorParaFrm.OnTransParamSaved += new TransParamSavedHandler(coorParaFrm_OnTransParamSaved);
            coorParaFrm.Text = "编辑 转换参数";
            coorParaFrm.ShowDialog(this);
            this.ucPosPair1.WKID = this._wkid;
            this.ucPosPair1.Save();
        }