示例#1
0
        string IntfDalEscorteVoyage.insertEscorteVoyage(crlEscorteVoyage EscorteVoyage)
        {
            #region declaration
            IntfDalEscorteVoyage serviceEscorteVoyage = new ImplDalEscorteVoyage();
            int    nombreInsertion = 0;
            string idEscorteVoyage = "";
            #endregion

            #region implementation
            if (EscorteVoyage != null)
            {
                EscorteVoyage.IdEscorteVoyage = serviceEscorteVoyage.getIdEscorteVoyage();
                this.strCommande  = "INSERT INTO `escortevoyage` (`idEscorteVoyage`";
                this.strCommande += ",`matriculeEscorte`,`numerosFB`,`trajetEscorte`)";
                this.strCommande += " VALUES ('" + EscorteVoyage.IdEscorteVoyage + "'";
                this.strCommande += ",'" + EscorteVoyage.MatriculeEscorte + "','" + EscorteVoyage.NumerosFB + "'";
                this.strCommande += ",'" + EscorteVoyage.TrajetEscorte + "')";

                this.serviceConnectBase.openConnection();
                nombreInsertion = this.serviceConnectBase.requete(this.strCommande);
                if (nombreInsertion == 1)
                {
                    idEscorteVoyage = EscorteVoyage.IdEscorteVoyage;
                }
                this.serviceConnectBase.closeConnection();
            }
            #endregion

            return(idEscorteVoyage);
        }
示例#2
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);
        }
示例#3
0
        void IntfDalEscorteVoyage.insertToGridEscorteVoyageFB(GridView gridView, string numerosFB)
        {
            #region declaration
            IntfDalEscorteVoyage    serviceEscorteVoyage = new ImplDalEscorteVoyage();
            List <crlEscorteVoyage> escorteVoyages       = null;
            #endregion

            #region implementation
            escorteVoyages = serviceEscorteVoyage.selectEscorteVoyageFB(numerosFB);
            if (escorteVoyages != null)
            {
                gridView.DataSource = serviceEscorteVoyage.getDataTableEscorteVoyageFB(escorteVoyages);
                gridView.DataBind();
            }
            #endregion
        }
示例#4
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);
        }