コード例 #1
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
        string IntfDalBagage.insertBagage(crlBagage Bagage, string sigleAgence)
        {
            #region declaration
            IntfDalBagage serviceBagage   = new ImplDalBagage();
            int           nombreInsertion = 0;
            string        idBagage        = "";
            #endregion

            #region implementation
            if (Bagage != null)
            {
                Bagage.IdBagage   = serviceBagage.getIdBagage(sigleAgence);
                this.strCommande  = "INSERT INTO `bagage` (`idBagage`,`numRecu`,";
                this.strCommande += "`excedentPoid`,`prixExcedent`) VALUES ";
                this.strCommande += "('" + Bagage.IdBagage + "','" + Bagage.NumRecu + "',";
                this.strCommande += "'" + Bagage.ExcedentPoid + "',";
                this.strCommande += "'" + Bagage.PrixExcedent + "')";

                this.serviceConnectBase.openConnection();
                nombreInsertion = this.serviceConnectBase.requete(this.strCommande);
                if (nombreInsertion == 1)
                {
                    idBagage = Bagage.IdBagage;
                }
                this.serviceConnectBase.closeConnection();
            }
            #endregion

            return(idBagage);
        }
コード例 #2
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
        bool IntfDalBagage.deleteBagage(crlBagage Bagage)
        {
            #region declaration
            bool isDelete     = false;
            int  nombreDelete = 0;
            #endregion

            #region implementation
            if (Bagage != null)
            {
                if (Bagage.IdBagage != "")
                {
                    this.strCommande = "DELETE FROM `bagage` WHERE (`idBagage` = '" + Bagage.IdBagage + "')";
                    this.serviceConnectBase.openConnection();
                    nombreDelete = this.serviceConnectBase.requete(this.strCommande);
                    if (nombreDelete == 1)
                    {
                        isDelete = true;
                    }
                    this.serviceConnectBase.closeConnection();
                }
            }
            #endregion

            return(isDelete);
        }
コード例 #3
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
        bool IntfDalBagage.updateBagage(crlBagage Bagage)
        {
            #region declaration
            bool isUpdate     = false;
            int  nombreUpdate = 0;
            #endregion

            #region implementation
            if (Bagage != null)
            {
                if (Bagage.IdBagage != "")
                {
                    this.strCommande  = "UPDATE `bagage` SET `numRecu`='" + Bagage.NumRecu + "', ";
                    this.strCommande += "`excedentPoid`='" + Bagage.ExcedentPoid + "', ";
                    this.strCommande += "`prixExcedent`='" + Bagage.PrixExcedent + "' ";
                    this.strCommande += "WHERE (`idBagage`='" + Bagage.IdBagage + "')";

                    this.serviceConnectBase.openConnection();
                    nombreUpdate = this.serviceConnectBase.requete(this.strCommande);
                    if (nombreUpdate == 1)
                    {
                        isUpdate = true;
                    }
                    this.serviceConnectBase.closeConnection();
                }
            }
            #endregion

            return(isUpdate);
        }
コード例 #4
0
        public crlVoyage()
        {
            this.NumIndividu   = "";
            this.IdVoyage      = "";
            this.NumerosFB     = "";
            this.NumBillet     = "";
            this.Destination   = "";
            this.NumPlace      = "";
            this.PieceIdentite = "";
            this.poidBagage    = 0.00;

            this.bagage   = null;
            this.individu = null;
            this.billet   = null;
            this.placeFB  = null;
        }
コード例 #5
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
        crlBagage IntfDalBagage.selectBagageForVoyage(string idVoyage)
        {
            #region initialisation
            IntfDalRecuEncaisser serviceRecu = new ImplDalRecuEncaisser();

            crlBagage Bagage = null;
            #endregion

            #region implementation
            if (idVoyage != "")
            {
                this.strCommande  = "SELECT bagage.idBagage, bagage.numRecu, bagage.excedentPoid,";
                this.strCommande += " bagage.prixExcedent FROM bagage";
                this.strCommande += " Inner Join associationvoyagebagage ON associationvoyagebagage.idBagage = bagage.idBagage";
                this.strCommande += " WHERE associationvoyagebagage.idVoyage = '" + idVoyage + "'";

                this.serviceConnectBase.openConnection();
                reader = this.serviceConnectBase.select(this.strCommande);
                if (reader != null)
                {
                    if (reader.HasRows)
                    {
                        reader.Read();
                        Bagage = new crlBagage();
                        Bagage.ExcedentPoid = double.Parse(reader["excedentPoid"].ToString());
                        Bagage.IdBagage     = reader["idBagage"].ToString();
                        Bagage.NumRecu      = reader["numRecu"].ToString();
                        Bagage.PrixExcedent = reader["prixExcedent"].ToString();
                    }
                    reader.Dispose();
                }
                this.serviceConnectBase.closeConnection();
                if (Bagage != null)
                {
                    Bagage.recu = serviceRecu.selectRecuEncaisser(Bagage.NumRecu);
                }
            }
            #endregion

            return(Bagage);
        }
コード例 #6
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
        crlBagage IntfDalBagage.selectBagage(string idBagage)
        {
            #region initialisation
            IntfDalRecuEncaisser serviceRecu = new ImplDalRecuEncaisser();

            crlBagage Bagage = null;
            #endregion

            #region implementation
            if (idBagage != "")
            {
                this.strCommande = "SELECT * FROM `bagage` WHERE (`idBagage`='" + idBagage + "')";
                this.serviceConnectBase.openConnection();
                reader = this.serviceConnectBase.select(this.strCommande);
                if (reader != null)
                {
                    if (reader.HasRows)
                    {
                        reader.Read();
                        Bagage = new crlBagage();
                        Bagage.ExcedentPoid = double.Parse(reader["excedentPoid"].ToString());
                        Bagage.IdBagage     = reader["idBagage"].ToString();
                        Bagage.NumRecu      = reader["numRecu"].ToString();
                        Bagage.PrixExcedent = reader["prixExcedent"].ToString();
                    }
                    reader.Dispose();
                }
                this.serviceConnectBase.closeConnection();
                if (Bagage != null)
                {
                    Bagage.recu = serviceRecu.selectRecuEncaisser(Bagage.NumRecu);
                }
            }
            #endregion

            return(Bagage);
        }
コード例 #7
0
ファイル: ImplDalBagage.cs プロジェクト: Natolotra/App
 int IntfDalBagage.isBagage(crlBagage Bagage)
 {
     throw new NotImplementedException();
 }