Exemplo n.º 1
0
        public DialogResult AddOOM(IEdmVault7 vault, EdmCmdData file, string selected_config)
        {
            object partnum_val;

            object rev_val;

            IEdmFile5 part = (IEdmFile5)vault.GetObject(EdmObjectType.EdmObject_File, file.mlObjectID1);

            IEdmEnumeratorVariable5 var = part.GetEnumeratorVariable();

            DialogResult RetVal = DialogResult.Cancel;
            if (selected_config == null || selected_config == "")
                selected_config = DetermineConfig(part, vault, file, "");

            if (selected_config != "")
            {
                var.GetVar("Number", selected_config, out partnum_val);

                var.GetVar("Revision", selected_config, out rev_val);

                if (rev_val == null)
                {
                    MessageBox.Show("Revision cannot be null.  Check that custom properties are filled out in the selected configuration", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                    return DialogResult.Cancel;
                }

                Operations_Master OM = new Operations_Master(partnum_val.ToString(), rev_val.ToString());

                OM.ShowDialog();

                RetVal = OM.DialogResult;
            }

            return RetVal;
        }
Exemplo n.º 2
0
        private void ops_btn_Click(object sender, EventArgs e)
        {
            Operations_Master Ops = new Operations_Master(pnum_txt.Text, rev_txt.Text);

            Ops.ShowDialog();

            Ops.Dispose();
        }