public UcInitialisationAutreDemande(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid, string Tdem = "05")
        {
            try
            {
                InitializeComponent();
                this.Tdem               = Tdem;
                label1.Visibility       = Visibility.Collapsed;
                Txt_NumDevis.Visibility = Visibility.Collapsed;
                if (pExecMode != null)
                {
                    ModeExecution = pExecMode[0];
                }
                var devis = new ObjDEVIS();
                if (pObjects[0] != null && pExecMode[0] != SessionObject.ExecMode.Creation)
                {
                    ObjetDevisSelectionne = Utility.ParseObject(devis, pObjects[0] as ObjDEVIS);
                }

                if (pGrid != null)
                {
                    _dataGrid = pGrid[0];
                }
                ChargerListDesSite();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.txtDevis);
            }
        }
示例#2
0
 public UcDetailsSuivi(ObjSUIVIDEVIS pSuiviDevis, ObjDEVIS pDevis, SessionObject.ExecMode pExecMode)
 {
     InitializeComponent();
     DevisSelectionne      = pDevis;
     ModeExecution         = pExecMode;
     SuiviDevisSelectionne = pSuiviDevis;
 }
 public UcCalculFactureClient(ObjDEVIS pDevis)
 {
     InitializeComponent();
     ObjetDevisSelectionne = pDevis;
     ChargerTypeDocument();
     AfficherOuMasquer(tabItemDemandeur, false);
     AfficherOuMasquer(tabItemAppareils, false);
 }
 public UcSuiveTravaux(ObjDEVIS pDevis)
 {
     InitializeComponent();
     ObjetDevisSelectionne = pDevis;
     AfficherOuMasquer(tabItemDemandeur, false);
     AfficherOuMasquer(tabItemAppareils, false);
     AfficherOuMasquer(tabItemFournitures, false);
     AfficherOuMasquer(tabItemOT, false);
 }
 public UcConsultationDevis(ObjDEVIS pDevis)
 {
     InitializeComponent();
     ObjetDevisSelectionne = pDevis;
     AfficherOuMasquer(tabItemDemandeur, false);
     AfficherOuMasquer(tabItemAppareils, false);
     AfficherOuMasquer(tabItemFournitures, false);
     AfficherOuMasquer(tabItemProgramme, false);
 }
示例#6
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));
        }
示例#7
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));
        }
示例#8
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);
            }
        }
示例#9
0
        public static decimal RetourneMontantDevisPaye(ObjDEVIS ODevis)
        {
            try
            {
                using (galadbEntities context = new galadbEntities())
                {
                    decimal MontantDeposit     = 0;
                    decimal MontantTranscaisse = 0;
                    decimal MontantTranscaisb  = 0;
                    //Montant du Deposit
                    var queryDeposit = from d in context.DEPOSIT where d.CENTRE == ODevis.CODECENTRE && d.NUMDEM == ODevis.NUMDEVIS && d.FK_IDCENTRE == ODevis.FK_IDCENTRE
                                       select d.MONTANTDEPOSIT;
                    var resultDepodit = queryDeposit.FirstOrDefault();
                    if (resultDepodit != null)
                    {
                        MontantDeposit = resultDepodit.Value;
                    }
                    // Montant de Transcaisse
                    var queryTranscaisse = from t in context.TRANSCAISSE
                                           where t.CENTRE == ODevis.CODECENTRE && t.NUMDEM == ODevis.NUMDEVIS && t.FK_IDCENTRE == ODevis.FK_IDCENTRE
                                           select t.MONTANT;
                    var resultTranscaisse = queryTranscaisse.FirstOrDefault();
                    if (resultTranscaisse != null)
                    {
                        MontantTranscaisse = resultTranscaisse.Value;
                    }
                    // Montant de Transcaisb
                    var queryTranscaisb = from tb in context.TRANSCAISB
                                          where tb.CENTRE == ODevis.CODECENTRE && tb.NUMDEM == ODevis.NUMDEVIS && tb.FK_IDCENTRE == ODevis.FK_IDCENTRE
                                          select tb.MONTANT;
                    var resultTranscaisb = queryTranscaisb.FirstOrDefault();
                    if (resultTranscaisb != null)
                    {
                        MontantTranscaisb = resultTranscaisb.Value;
                    }

                    return(MontantDeposit + MontantTranscaisse + MontantTranscaisse);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#10
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);
        }
 public UcControle(ObjDEVIS pDevis)
 {
     InitializeComponent();
     myDevis = pDevis;
 }
 public UcSuiviDevis(ObjDEVIS pDevis)
 {
     InitializeComponent();
     Devis = pDevis;
 }