Example #1
0
        private void AfterSendToWorkshop_Click(object sender, EventArgs e)
        {
            //IEntity TO_CUT_nesting;

            AF_Clipper_Dll.Clipper_DoOnAction_AfterSendToWorkshop doonaction = new Clipper_DoOnAction_AfterSendToWorkshop();
            string stage = "_TO_CUT_NESTING";

            //creation du fichier de sortie
            //recupere les path
            Clipper_Param.GetlistParam(_Context);
            IEntitySelector nestingselector = null;

            nestingselector = new EntitySelector();

            //entity type pointe sur la list d'objet du model
            nestingselector.Init(_Context, _Context.Kernel.GetEntityType(stage));
            nestingselector.MultiSelect = true;


            if (nestingselector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (IEntity nesting in nestingselector.SelectedEntity)
                {
                    doonaction.execute(nesting);
                }
            }


            // doonaction.execute(_Context, TO_CUT_nesting);
        }
Example #2
0
        /// <summary>
        /// recupere la reference du premier placement selectionné dans les placements a copuper
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AfterSend_Click_1(object sender, EventArgs e)
        {
            AF_JOHN_DEERE.JohnDeere_DoOnAction_AfterSendToWorkshop doonaction = new JohnDeere_DoOnAction_AfterSendToWorkshop();
            string stage = "_TO_CUT_NESTING";

            JohnDeere_Param.GetlistParam(_Context);
            IEntitySelector nestingselector = null;

            nestingselector = new EntitySelector();

            //entity type pointe sur la list d'objet du model
            nestingselector.Init(_Context, _Context.Kernel.GetEntityType(stage));
            nestingselector.MultiSelect = true;

            if (nestingselector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (IEntity selection in nestingselector.SelectedEntity)
                {
                    string filename = selection.GetFieldValueAsString("_REFERENCE");
                    string material = selection.GetFieldValueAsEntity("_MATERIAL").GetFieldValueAsString("_NAME");

                    IEntityList nestinglist = _Context.EntityManager.GetEntityList(stage, "_REFERENCE", ConditionOperator.Equal, filename);
                    nestinglist.Fill(false);
                    doonaction.execute(nestinglist);
                }
            }
        }
Example #3
0
        private IEntity SelectEntity_If_Not_Exported(string entitystage)
        {
            IEntity         selectedentity = null;
            IEntitySelector xselector      = null;

            xselector = new EntitySelector();



            //GPAO_Exported
            //_Context.EntityManager.GetEntityList("_CLOSED_NESTING"entitystage, "GPAO_Exported", ConditionOperator.Equal, null);
            IEntityList GPAO_Exported_filter = _Context.EntityManager.GetEntityList(entitystage, "GPAO_Exported", ConditionOperator.Equal, null);

            GPAO_Exported_filter.Fill(false);

            _Context.EntityManager.GetExtendedEntityList(entitystage, GPAO_Exported_filter);
            IExtendedEntityList exported_nestings = _Context.EntityManager.GetExtendedEntityList(entitystage, GPAO_Exported_filter);

            exported_nestings.Fill(false);

            if (exported_nestings.Count == 0)
            {
                //_Context.EntityManager.GetEntityList("_CLOSED_NESTING"entitystage, "GPAO_Exported", ConditionOperator.Equal, false);
                GPAO_Exported_filter = _Context.EntityManager.GetEntityList(entitystage, "GPAO_Exported", ConditionOperator.Equal, false);
                GPAO_Exported_filter.Fill(false);
                // _Context.EntityManager.GetExtendedEntityList("_CLOSED_NESTING"entitystage, GPAO_Exported_filter);
                exported_nestings = _Context.EntityManager.GetExtendedEntityList(entitystage, GPAO_Exported_filter);
                exported_nestings.Fill(false);
            }

            xselector.Init(_Context, exported_nestings);//"_TO_CUT_NESTING"
            xselector.MultiSelect = true;

            if (xselector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (IEntity xentity in xselector.SelectedEntity)
                {
                    selectedentity = xentity;
                }
            }

            return(selectedentity);


            /*
             * else
             * {
             * xselector.Init(_Context, _Context.Kernel.GetEntityType(entitytype));//"_TO_CUT_NESTING"
             * xselector.MultiSelect = true;
             *
             * }*/
        }
Example #4
0
        private IEntity SelectEntity(string SelectionType)
        {
            IEntity         selectedentity = null;
            IEntitySelector xselector      = null;

            xselector = new EntitySelector();

            xselector.Init(_Context, _Context.Kernel.GetEntityType(SelectionType));//"_TO_CUT_NESTING"
            xselector.MultiSelect = true;

            if (xselector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (IEntity xentity in xselector.SelectedEntity)
                {
                    selectedentity = xentity;
                }
            }

            return(selectedentity);
        }
Example #5
0
        /// <summary>
        /// boite de dialogue quote de selection des devis
        /// </summary>
        /// <param name="quoteNumberReference"></param>
        /// <returns></returns>
        public bool SelectQuoteUI(out long quoteNumberReference)
        {
            quoteNumberReference = -1;
            if (_Context != null)
            {
                IEntity         quoteEntity    = null;
                IEntitySelector entitySelector = new EntitySelector();
                entitySelector.Init(_Context, _Context.Kernel.GetEntityType("_QUOTE_SENT"));
                entitySelector.MultiSelect     = false;
                entitySelector.ShowPropertyBox = false;
                if (entitySelector.ShowDialog() == DialogResult.OK)
                {
                    quoteEntity = entitySelector.SelectedEntity.FirstOrDefault();
                }

                if (_UserOk)
                {
                    _Context.SaveUserModel();
                }

                if (quoteEntity != null)
                {
                    //string quoteReference = quoteEntity.GetFieldValueAsString("_REFERENCE");
                    quoteNumberReference = Convert.ToInt64(quoteEntity.GetFieldValueAsString("_REFERENCE"));
                    //quoteNumberReference = quoteEntity.Id;

                    //long.TryParse(quoteReference, out quoteNumberReference);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Example #6
0
        private void AfterClose_Click(object sender, EventArgs e)
        {
            AF_Clipper_Dll.Clipper_DoOnAction_After_Cutting_end doonaction = new Clipper_DoOnAction_After_Cutting_end();

            //string stage = "_CLOSED_NESTING";
            string stage = "_CUT_SHEET";

            //creation du fichier de sortie
            //recupere les path
            Clipper_Param.GetlistParam(_Context);
            IEntitySelector Entityselector = null;

            Entityselector = new EntitySelector();

            //entity type pointe sur la list d'objet du model
            Entityselector.Init(_Context, _Context.Kernel.GetEntityType(stage));
            Entityselector.MultiSelect = true;

            if (Entityselector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                doonaction.execute(Entityselector.SelectedEntity);
            }
        }