Пример #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string mPataName = cbWcfData.Text.ToString();

            if (mPataName.Length == 0)
            {
                MessageBox.Show("机种名称为空 异常");
                return;
            }
            int rtn = 0;

            if (mPataName == "默认机种")
            {
                MessageBox.Show("默认机种不能删除");
                return;
            }
            else if (MessageBox.Show("是否删除当前机种:" + mPataName, "机种删除提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                if (mWDataToolClass.DeleteModel(mPataName) == 0)
                {
                    rtn = mWDataToolClass.SelectShowModel("", ref cbWcfData);
                    if (rtn != 0)
                    {
                        MessageBox.Show("切换机种失败");
                    }
                    MessageBox.Show("机种删除成功");
                    DataUpdateClick(sender, e);
                }
                else
                {
                    MessageBox.Show("机种删除失败");
                }
            }
        }
Пример #2
0
        private void cbWcfData_SelectedIndexChanged(object sender, EventArgs e)
        {
            int rtn = 0;

            if (mWcfDataName != cbWcfData.Text.ToString())
            {
                mWcfDataName = cbWcfData.Text.ToString();
                rtn          = mWDataToolClass.SelectShowModel(mWcfDataName, ref cbWcfData);
                if (rtn != 0)
                {
                    MessageBox.Show("切换机种失败");
                }
                rtn = mWDataToolClass.SelectShowParameter(ref dgvParameter);
                if (rtn != 0)
                {
                    MessageBox.Show("SelectShowAxis");
                }
            }
        }
Пример #3
0
        public void ConInit(WDataToolClass mWDataToolClass)
        {
            this.mWDataToolClass = mWDataToolClass;

            int rtn = 0;

            rtn = mWDataToolClass.SelectShowModel("", ref cbWcfData);
            if (rtn != 0)
            {
                MessageBox.Show("SelectShowModel");
            }
            UpdateCorrAxis();
            rtn = mWDataToolClass.SelectShowParameter(ref dgvParameter);
            if (rtn != 0)
            {
                MessageBox.Show("SelectShowAxis");
            }
        }
Пример #4
0
        public void ConInit(WDataToolClass mWDataToolClass, bool isEdit = true)
        {
            this.mWDataToolClass = mWDataToolClass;
            if (isEdit)
            {
                btnCopyAdd.Visible = true;
                btnDelete.Visible  = true;
            }
            else
            {
                btnCopyAdd.Visible = false;
                btnDelete.Visible  = false;
            }
            int rtn = 0;

            rtn = mWDataToolClass.SelectShowModel("", ref cbWcfData);
            if (rtn != 0)
            {
                MessageBox.Show("SelectShowModel");
            }
        }