bool IntfDalReceptionnaire.deletePersonne(crlReceptionnaire Personne) { #region declaration bool isDelete = false; int nombreDelete = 0; #endregion #region implementation if (Personne != null) { if (Personne.IdPersonne != "") { this.strCommande = "DELETE FROM `receptionnaire` WHERE (`idPersonne` = '" + Personne.IdPersonne + "')"; this.serviceConnectBase.openConnection(); nombreDelete = this.serviceConnectBase.requete(this.strCommande); if (nombreDelete == 1) { isDelete = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isDelete); }
string IntfDalReceptionnaire.insertPersonne(crlReceptionnaire Personne, string sigleAgence) { #region declaration IntfDalReceptionnaire servicePersonne = new ImplDalReceptionnaire(); int nombreInsertion = 0; string idPersonne = ""; #endregion #region implementation if (Personne != null) { Personne.IdPersonne = servicePersonne.getIdPersonne(sigleAgence); this.strCommande = "INSERT INTO `receptionnaire` (`idPersonne`,`nomPersonne`,`prenomPersonne`"; this.strCommande += ",`adressePersonne`,`telephone`)"; this.strCommande += " VALUES ('" + Personne.IdPersonne + "','" + Personne.NomPersonne + "'"; this.strCommande += ",'" + Personne.PrenomPersonne + "','" + Personne.AdressePersonne + "'"; this.strCommande += ",'" + Personne.Telephone + "')"; this.serviceConnectBase.openConnection(); nombreInsertion = this.serviceConnectBase.requete(this.strCommande); if (nombreInsertion == 1) { idPersonne = Personne.IdPersonne; } this.serviceConnectBase.closeConnection(); } #endregion return(idPersonne); }
crlReceptionnaire IntfDalReceptionnaire.selectPersonne(string idPersonne) { #region declaration crlReceptionnaire Personne = null; #endregion #region implementation if (idPersonne != "") { this.strCommande = "SELECT * FROM `receptionnaire` WHERE (`idPersonne` = '" + idPersonne + "')"; this.serviceConnectBase.openConnection(); reader = this.serviceConnectBase.select(this.strCommande); if (reader != null) { if (reader.HasRows) { Personne = new crlReceptionnaire(); reader.Read(); Personne.AdressePersonne = reader["adressePersonne"].ToString(); Personne.IdPersonne = reader["idPersonne"].ToString(); Personne.NomPersonne = reader["nomPersonne"].ToString(); Personne.PrenomPersonne = reader["prenomPersonne"].ToString(); Personne.Telephone = reader["telephone"].ToString(); } reader.Dispose(); } this.serviceConnectBase.closeConnection(); } #endregion return(Personne); }
int IntfDalReceptionnaire.isPersonneInt(crlReceptionnaire Personne) { #region declaration int isPersonne = 0; #endregion #region implementation if (Personne != null) { this.strCommande = "SELECT * FROM `receptionnaire` WHERE (`idPersonne` <> '" + Personne.IdPersonne + "' AND"; this.strCommande += " `nomPersonne`='" + Personne.NomPersonne + "' AND `prenomPersonne`='" + Personne.PrenomPersonne + "')"; this.serviceConnectBase.openConnection(); reader = this.serviceConnectBase.select(this.strCommande); if (reader != null) { if (reader.HasRows) { if (reader.Read()) { isPersonne = 1; } } reader.Dispose(); } this.serviceConnectBase.closeConnection(); } #endregion return(isPersonne); }
bool IntfDalReceptionnaire.updatePersonne(crlReceptionnaire Personne) { #region declaration bool isUpdate = false; int nombreUpdate = 0; #endregion #region implementation if (Personne != null) { if (Personne.IdPersonne != "") { this.strCommande = "UPDATE `receptionnaire` SET `nomPersonne`='" + Personne.NomPersonne + "', `prenomPersonne`='" + Personne.PrenomPersonne + "', "; this.strCommande += "`adressePersonne`='" + Personne.AdressePersonne + "', `telephone`='" + Personne.Telephone + "' "; this.strCommande += "WHERE (`idPersonne`='" + Personne.IdPersonne + "')"; this.serviceConnectBase.openConnection(); nombreUpdate = this.serviceConnectBase.requete(this.strCommande); if (nombreUpdate == 1) { isUpdate = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isUpdate); }
public crlCommissionDevis() { this.IdCommissionDevis = ""; this.Destination = ""; this.FraisEnvoi = 0; this.PieceJustificatif = ""; this.Poids = 0; this.Nombre = 0; this.NumDesignation = ""; this.NumTrajet = ""; this.TypeCommission = ""; this.NumProforma = ""; this.NumExpediteur = ""; this.NumRecepteur = ""; this.trajet = null; this.typeCommssionObjet = null; this.designationCommission = null; this.expediteur = null; this.recepteur = null; }