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)); }
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); } }
//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); }