Ejemplo n.º 1
0
        string IntfDalTarifDeveloppement.insertTarifDeveloppement(crlTarifDeveloppement tarifDeveloppement, string sigleAgence)
        {
            #region declaration
            IntfDalTarifDeveloppement serviceTarifDeveloppement = new ImplDalTarifDeveloppement();
            int    nombreInsertion       = 0;
            string numTarifDeveloppement = "";
            #endregion

            #region implementation
            if (tarifDeveloppement != null && sigleAgence != "")
            {
                tarifDeveloppement.NumTarifDeveloppement = serviceTarifDeveloppement.getNumTarifDeveloppement(sigleAgence);

                this.strCommande  = "INSERT INTO `tarifdeveloppement` (`numTarifDeveloppement`,`zone`,";
                this.strCommande += "`montantTarifDeveloppement`,`commentaireTarifDeveloppement`)";
                this.strCommande += " VALUES('" + tarifDeveloppement.NumTarifDeveloppement + "',";
                this.strCommande += "'" + tarifDeveloppement.Zone + "','" + tarifDeveloppement.MontantTarifDeveloppement.ToString("0") + "',";
                this.strCommande += "'" + tarifDeveloppement.CommentaireTarifDeveloppement + "')";

                this.serviceConnectBase.openConnection();
                nombreInsertion = this.serviceConnectBase.requete(this.strCommande);
                if (nombreInsertion == 1)
                {
                    numTarifDeveloppement = tarifDeveloppement.NumTarifDeveloppement;
                }
                this.serviceConnectBase.closeConnection();
            }
            #endregion

            return(numTarifDeveloppement);
        }
Ejemplo n.º 2
0
        void IntfDalTarifDeveloppement.insertToGridTarifDeveloppement(GridView gridView, string param, string paramLike, string valueLike)
        {
            #region declaration
            IntfDalTarifDeveloppement serviceTarifDeveloppement = new ImplDalTarifDeveloppement();
            #endregion

            #region implementation
            this.strCommande  = "SELECT tarifdeveloppement.numTarifDeveloppement, tarifdeveloppement.zone, tarifdeveloppement.montantTarifDeveloppement,";
            this.strCommande += " tarifdeveloppement.commentaireTarifDeveloppement FROM tarifdeveloppement";
            this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%'";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceTarifDeveloppement.getDataTableTarifDeveloppement(this.strCommande);
            gridView.DataBind();
            #endregion
        }