Наследование: System.Windows.Forms.Form
Пример #1
0
        private void BtnEditCommonPro_Click(object sender, EventArgs e)
        {
            bool isSelectRecord = true;

            if (this.dGVCommonProperties.RowCount <= 0)
            {
                isSelectRecord = false;
            }
            int rowIndex = this.dGVCommonProperties.CurrentRow.Index;

            if (rowIndex < 0)
            {
                isSelectRecord = false;
            }
            if (!isSelectRecord)
            {
                MessageBox.Show("请选择一条记录", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }

            PDM_Params temp = new PDM_Params();

            temp.MASTER_TABLE_NAME = "ALL";
            temp.PARAMS_DATA_TYPE  = this.dGVCommonProperties.CurrentRow.Cells["PARAMS_DATA_TYPE"].Value.ToString();
            temp.PARAMS_NAME       = this.dGVCommonProperties.CurrentRow.Cells["PARAMS_NAME"].Value.ToString();


            FrmAddNewProperties addpro = new FrmAddNewProperties(temp);

            if (addpro.ShowDialog() == DialogResult.OK)
            {
                sys.NewInstance.UpdateExtPro(temp, addpro.M_PDM_Params);
                this.dGVCommonProperties.DataSource = sys.NewInstance.GetDataTableForParams(DataType.RelationObjectType.ALL);
            }
        }
Пример #2
0
        private void BtnAddCommonPro_Click(object sender, EventArgs e)
        {
            FrmAddNewProperties addpro = new FrmAddNewProperties("ALL");

            if (addpro.ShowDialog() == DialogResult.OK)
            {
                this.dGVCommonProperties.DataSource = sys.NewInstance.GetDataTableForParams(DataType.RelationObjectType.ALL);
            }
        }
Пример #3
0
        private void BtnAddCommonPro_Click(object sender, EventArgs e)
        {
            FrmAddNewProperties addpro = new FrmAddNewProperties("ALL");

            if (addpro.ShowDialog() == DialogResult.OK)
            {
                this.dGVCommonProperties.DataSource = sys.NewInstance.GetDataTableForParams(DataType.RelationObjectType.ALL);
            }
        }
Пример #4
0
        private void BtnAddObjectPro_Click(object sender, EventArgs e)
        {
            if (this.tSCombPObject.Text.Trim() != "")
            {
                try
                {
                    DataType.RelationObjectType obj    = GetRelationType(this.tSCombPObject.Text.Trim());
                    FrmAddNewProperties         addpro = new FrmAddNewProperties(sys.NewInstance.GetTableName(obj));


                    if (addpro.ShowDialog() == DialogResult.OK)
                    {
                        this.dGVObjectProperties.DataSource = sys.NewInstance.GetDataTableForParams(GetRelationType(this.tSCombPObject.Text.Trim()));
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("请确认选择正确的对象:" + ex.Message.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
        }
Пример #5
0
        private void BtnAddObjectPro_Click(object sender, EventArgs e)
        {
            if (this.tSCombPObject.Text.Trim() != "")
            {

                try
                {
                    DataType.RelationObjectType obj = GetRelationType(this.tSCombPObject.Text.Trim());
                    FrmAddNewProperties addpro = new FrmAddNewProperties(sys.NewInstance.GetTableName(obj));

                    if (addpro.ShowDialog() == DialogResult.OK)
                    {
                        this.dGVObjectProperties.DataSource = sys.NewInstance.GetDataTableForParams(GetRelationType(this.tSCombPObject.Text.Trim()));
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("请确认选择正确的对象:" + ex.Message.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
        }
Пример #6
0
        private void BtnEditObjectPro_Click(object sender, EventArgs e)
        {
            if (this.tSCombPObject.Text.Trim() != "")
            {
                bool isSelectRecord = true;
                if (this.dGVObjectProperties.RowCount <= 0) { isSelectRecord = false; }
                int rowIndex = this.dGVObjectProperties.CurrentCell.RowIndex;
                if (rowIndex < 0) { isSelectRecord = false; }
                if (!isSelectRecord) { MessageBox.Show("请选择一条记录", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }

                PDM_Params temp = new PDM_Params();

                DataType.RelationObjectType obj = GetRelationType(this.tSCombPObject.Text.Trim());
                temp.MASTER_TABLE_NAME = sys.NewInstance.GetTableName(obj);
                temp.PARAMS_DATA_TYPE = this.dGVObjectProperties.CurrentRow.Cells["PARAMS_DATA_TYPE1"].Value.ToString();
                temp.PARAMS_NAME = this.dGVObjectProperties.CurrentRow.Cells["PARAMS_NAME1"].Value.ToString();

                FrmAddNewProperties addpro = new FrmAddNewProperties(temp);
                if (addpro.ShowDialog() == DialogResult.OK)
                {
                    sys.NewInstance.UpdateExtPro(temp, addpro.M_PDM_Params);
                    this.dGVObjectProperties.DataSource = sys.NewInstance.GetDataTableForParams(GetRelationType(this.tSCombPObject.Text.Trim()));
                }
            }
        }