Esempio n. 1
0
        bool IntfDalEscorteVoyage.updateEscorteVoyageAll(crlEscorteVoyage EscorteVoyage)
        {
            #region declaration
            IntfDalEscorte       serviceEscorte       = new ImplDalEscorte();
            IntfDalEscorteVoyage serviceEscorteVoyage = new ImplDalEscorteVoyage();

            bool isUpdate  = false;
            int  isEscorte = 0;
            #endregion

            #region implementation
            if (EscorteVoyage != null)
            {
                if (EscorteVoyage.Escorte != null)
                {
                    isEscorte = serviceEscorte.isEscorteInt(EscorteVoyage.Escorte);

                    if (isEscorte == 0)
                    {
                        serviceEscorte.updateEscorte(EscorteVoyage.Escorte);
                    }


                    if (EscorteVoyage.Escorte.MatriculeEscorte != "")
                    {
                        isUpdate = serviceEscorteVoyage.updateEscorteVoyage(EscorteVoyage);
                    }
                }
            }
            #endregion

            return(isUpdate);
        }
Esempio n. 2
0
        string IntfDalEscorteVoyage.insertEscorteVoyageAll(crlEscorteVoyage EscorteVoyage)
        {
            #region declaration
            IntfDalEscorte       serviceEscorte       = new ImplDalEscorte();
            IntfDalEscorteVoyage serviceEscorteVoyage = new ImplDalEscorteVoyage();

            string idEscorteVoyage = "";
            int    isEscorteVoyage = 0;
            #endregion

            #region implementation
            if (EscorteVoyage != null)
            {
                if (EscorteVoyage.Escorte != null)
                {
                    EscorteVoyage.Escorte.MatriculeEscorte = serviceEscorte.isEscorte(EscorteVoyage.Escorte);
                    if (EscorteVoyage.Escorte.MatriculeEscorte != "")
                    {
                        serviceEscorte.updateEscorte(EscorteVoyage.Escorte);
                    }
                    else
                    {
                        EscorteVoyage.Escorte.MatriculeEscorte = serviceEscorte.insertEscorte(EscorteVoyage.Escorte);
                    }

                    if (EscorteVoyage.Escorte.MatriculeEscorte != "")
                    {
                        EscorteVoyage.MatriculeEscorte = EscorteVoyage.Escorte.MatriculeEscorte;
                        EscorteVoyage.IdEscorteVoyage  = serviceEscorteVoyage.insertEscorteVoyage(EscorteVoyage);

                        //isEscorteVoyage

                        if (EscorteVoyage.IdEscorteVoyage != "")
                        {
                            idEscorteVoyage = EscorteVoyage.IdEscorteVoyage;
                        }
                    }
                }
            }
            #endregion

            return(idEscorteVoyage);
        }