bool IntfDalInfoExedantBagage.deleteInfoExedantBagage(crlInfoExedantBagage InfoExedantBagage) { #region declaration bool isDelete = false; int nombreDelete = 0; #endregion #region implementation if (InfoExedantBagage != null) { if (InfoExedantBagage.NumInfoBagage != "") { this.strCommande = "DELETE FROM `infoexedantbagage` WHERE (`numInfoBagage` = '" + InfoExedantBagage.NumInfoBagage + "')"; this.serviceConnectBase.openConnection(); nombreDelete = this.serviceConnectBase.requete(this.strCommande); if (nombreDelete == 1) { isDelete = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isDelete); }
string IntfDalInfoExedantBagage.insertInfoExedantBagage(crlInfoExedantBagage InfoExedantBagage, string sigleAgence) { #region declaration IntfDalInfoExedantBagage serviceInfoExedantBagage = new ImplDalInfoExedantBagage(); int nombreInsertion = 0; string numInfoBagage = ""; #endregion #region implementation if (InfoExedantBagage != null) { InfoExedantBagage.NumInfoBagage = serviceInfoExedantBagage.getNumInfoBagage(sigleAgence); this.strCommande = "INSERT INTO `infoexedantbagage` (`numInfoBagage`,`poidAutorise`"; this.strCommande += ",`prixExedantBagage`) "; this.strCommande += " VALUES ('" + InfoExedantBagage.NumInfoBagage + "','" + InfoExedantBagage.PoidAutorise + "'"; this.strCommande += ",'" + InfoExedantBagage.PrixExedantBagage + "')"; this.serviceConnectBase.openConnection(); nombreInsertion = this.serviceConnectBase.requete(this.strCommande); if (nombreInsertion == 1) { numInfoBagage = InfoExedantBagage.NumInfoBagage; } this.serviceConnectBase.closeConnection(); } #endregion return(numInfoBagage); }
int IntfDalInfoExedantBagage.isInfoExedantBagageInt(crlInfoExedantBagage InfoExedantBagage) { #region declaration int isInfoExedantBagage = 0; #endregion #region implementation if (InfoExedantBagage != null) { this.strCommande = "SELECT * FROM `infoexedantbagage` WHERE (`numInfoBagage` <> '" + InfoExedantBagage.NumInfoBagage + "')"; this.serviceConnectBase.openConnection(); reader = this.serviceConnectBase.select(this.strCommande); if (reader != null) { if (reader.HasRows) { while (reader.Read()) { if (InfoExedantBagage.PoidAutorise == double.Parse(reader["poidAutorise"].ToString()) && InfoExedantBagage.PrixExedantBagage.Trim().ToLower().Equals(reader["prixExedantBagage"].ToString().Trim().ToLower())) { isInfoExedantBagage = 1; break; } } } reader.Dispose(); } this.serviceConnectBase.closeConnection(); } #endregion return(isInfoExedantBagage); }
crlInfoExedantBagage IntfDalInfoExedantBagage.selectInfoExedantBagage(string numInfoBagage) { #region declaration crlInfoExedantBagage InfoExedantBagage = null; #endregion #region implementation if (numInfoBagage != "") { this.strCommande = "SELECT * FROM `infoexedantbagage` WHERE (`numInfoBagage` = '" + numInfoBagage + "')"; this.serviceConnectBase.openConnection(); reader = this.serviceConnectBase.select(this.strCommande); if (reader != null) { if (reader.HasRows) { InfoExedantBagage = new crlInfoExedantBagage(); reader.Read(); InfoExedantBagage.NumInfoBagage = reader["numInfoBagage"].ToString(); InfoExedantBagage.PoidAutorise = double.Parse(reader["poidAutorise"].ToString()); InfoExedantBagage.PrixExedantBagage = reader["prixExedantBagage"].ToString(); } reader.Dispose(); } this.serviceConnectBase.closeConnection(); } #endregion return(InfoExedantBagage); }
bool IntfDalInfoExedantBagage.updateInfoExedantBagage(crlInfoExedantBagage InfoExedantBagage) { #region declaration bool isUpdate = false; int nombreUpdate = 0; #endregion #region implementation if (InfoExedantBagage != null) { if (InfoExedantBagage.NumInfoBagage != "") { this.strCommande = "UPDATE `infoexedantbagage` SET `poidAutorise`='" + InfoExedantBagage.PoidAutorise + "', "; this.strCommande += "`prixExedantBagage`='" + InfoExedantBagage.PrixExedantBagage + "'"; this.strCommande += " WHERE (`numInfoBagage`='" + InfoExedantBagage.NumInfoBagage + "')"; this.serviceConnectBase.openConnection(); nombreUpdate = this.serviceConnectBase.requete(this.strCommande); if (nombreUpdate == 1) { isUpdate = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isUpdate); }