Ejemplo n.º 1
0
        public static ObjETAPEDEVIS GetEtapeInit(CsDemande devis)
        {
            ObjETAPEDEVIS next = new ObjETAPEDEVIS();

            next = DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.LaDemande.FK_IDTYPEDEMANDE, devis.LaDemande.FK_IDPRODUIT.Value, devis.LaDemande.FK_IDTYPEDEMANDE);
            if (next == null)
            {
                throw new Exception("Etape suivante non paramétrée.");
            }
            return(next);
        }
Ejemplo n.º 2
0
        public static ObjETAPEDEVIS GetEtapeSaut(ObjDEVIS devis)
        {
            ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis.FK_IDETAPEDEVIS);

            if ((etape == null) || (etape.PK_ID <= 0))
            {
                throw new Exception("L'étape du devis n'est pas déterminée.");
            }

            return(DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.FK_IDTYPEDEVIS, devis.FK_IDPRODUIT, etape.IDTACHESAUT));
        }
Ejemplo n.º 3
0
        public static ObjETAPEDEVIS GetEtapeAnnulation(ObjDEVIS devis)
        {
            ObjETAPEDEVIS etape = DBETAPEDEVIS.GetByIdTypeDevisNumEtape(devis.FK_IDTYPEDEVIS, (int)Enumere.EtapeDevis.Annulé);

            if ((etape == null) || (etape.PK_ID <= 0))
            {
                throw new Exception("L'étape d'annulation n'est pas paramétrée pour ce type devis.");
            }
            //throw new Exception("Cancellation step unknown for this type of application.");

            return(DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.FK_IDTYPEDEVIS, devis.FK_IDPRODUIT, etape.FK_IDTACHEDEVIS));
        }
Ejemplo n.º 4
0
        public static ObjETAPEDEVIS GetEtapeIntermediaire(ObjDEVIS devis)
        {
            ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis.FK_IDETAPEDEVIS);

            if ((etape == null) || (etape.PK_ID <= 0))
            {
                //throw new Exception("Unknown step");
                throw new Exception("Etape inconnue");
            }
            if (etape.IDTACHEINTERMEDIAIRE != null)
            {
                return(DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.FK_IDTYPEDEVIS, devis.FK_IDPRODUIT, etape.IDTACHEINTERMEDIAIRE));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 5
0
        //public static ObjETAPEDEVIS GetEtapeSuivanteCaisse(DEVIS devis)
        //{
        //    ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis.FK_IDETAPEDEVIS);
        //    //ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis);
        //    if ((etape == null) || (etape.PK_ID <= 0))
        //        //throw new Exception("Unknown step");
        //        throw new Exception("Etape inconnue");

        //    ObjETAPEDEVIS next = DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.FK_IDTYPEDEVIS, devis.FK_IDPRODUIT, etape.IDTACHESUIVANTE);
        //    if (next == null)
        //        //throw new Exception("Next step not configured.");
        //        throw new Exception("Etape suivante non paramétrée.");
        //    return next;
        //}
        public static ObjETAPEDEVIS GetEtapeSuivante_(ObjDEVIS devis)
        {
            ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis.FK_IDETAPEDEVIS);

            //ObjETAPEDEVIS etape = DBETAPEDEVIS.GetById(devis);
            if ((etape == null) || (etape.PK_ID <= 0))
            {
                //throw new Exception("Unknown step");
                throw new Exception("Etape inconnue");
            }

            ObjETAPEDEVIS next = DBETAPEDEVIS.GetByIdTypeDevisIdProduitIdTache(devis.FK_IDTYPEDEVIS, devis.FK_IDPRODUIT, etape.IDTACHESUIVANTE);

            if (next == null)
            {
                //throw new Exception("Next step not configured.");
                throw new Exception("Etape suivante non paramétrée.");
            }
            return(next);
        }