string IntfDalUSAxe.insertUSAxe(crlUSAxe axe, string sigleAgence) { #region declaration string numAxe = ""; IntfDalUSAxe serviceUSAxe = new ImplDalUSAxe(); int nbInsert = 0; #endregion #region implemenation if (axe != null && sigleAgence != "") { axe.NumAxe = serviceUSAxe.getNumUSAxe(sigleAgence); this.strCommande = "INSERT INTO `usaxe` (`numAxe`,`nomAxe`,`descriptionAxe`)"; this.strCommande += " VALUES ('" + axe.NumAxe + "','" + axe.NomAxe + "',"; this.strCommande += " '" + axe.DescriptionAxe + "')"; this.serviceConnectBase.openConnection(); nbInsert = this.serviceConnectBase.requete(this.strCommande); if (nbInsert == 1) { numAxe = axe.NumAxe; } this.serviceConnectBase.closeConnection(); } #endregion return(numAxe); }
void IntfDalUSAxe.insertToGridAxe(GridView gridView, string param, string paramLike, string valueLike) { #region declaration IntfDalUSAxe serviceUSAxe = new ImplDalUSAxe(); #endregion #region implementation this.strCommande = "SELECT usaxe.numAxe, usaxe.nomAxe, usaxe.descriptionAxe FROM usaxe"; this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%'"; this.strCommande += " ORDER BY " + param; gridView.DataSource = serviceUSAxe.getDataTableAxe(this.strCommande); gridView.DataBind(); #endregion }