bool IntfDalFicheBord.deleteFicheBord(crlFicheBord FicheBord) { #region declaration bool isDelete = false; int nombreDelete = 0; #endregion #region implementation if (FicheBord != null) { if (FicheBord.NumerosFB != "") { this.strCommande = "DELETE FROM `fichebord` WHERE (`numerosFB` = '" + FicheBord.NumerosFB + "')"; this.serviceConnectBase.openConnection(); nombreDelete = this.serviceConnectBase.requete(this.strCommande); if (nombreDelete == 1) { isDelete = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isDelete); }
bool IntfDalFicheBord.updateFicheBord(crlFicheBord FicheBord) { #region declaration bool isUpdate = false; int nombreUpdate = 0; #endregion #region implementation if (FicheBord != null) { if (FicheBord.NumerosFB != "") { this.strCommande = "UPDATE `fichebord` SET "; this.strCommande += " `numerosAV`='" + FicheBord.NumerosAV + "',`matriculeAgent`='" + FicheBord.MatriculeAgent + "'"; this.strCommande += ", `dateHeurDepart`='" + FicheBord.DateHeurDepart.ToString("yyyy-MM-dd HH:mm:ss") + "'"; this.strCommande += ", `dateHeurPrevue`='" + FicheBord.DateHeurPrevue.ToString("yyyy-MM-dd HH:mm:ss") + "'"; this.strCommande += " WHERE (`numerosFB`='" + FicheBord.NumerosFB + "')"; this.serviceConnectBase.openConnection(); nombreUpdate = this.serviceConnectBase.requete(this.strCommande); if (nombreUpdate == 1) { isUpdate = true; } this.serviceConnectBase.closeConnection(); } } #endregion return(isUpdate); }
string IntfDalFicheBord.insertFicheBord(crlFicheBord FicheBord) { #region declaration int nombreInsertion = 0; string numerosFB = ""; IntfDalFicheBord serviceFicheBord = new ImplDalFicheBord(); #endregion #region implementation if (FicheBord != null) { FicheBord.NumerosFB = serviceFicheBord.getNumerosFB(FicheBord.agent.agence.SigleAgence); this.strCommande = "INSERT INTO `fichebord` (`numerosFB`,`matriculeAgent`"; this.strCommande += " ,`numerosAV`,`dateHeurDepart`,`dateHeurPrevue`) "; this.strCommande += " VALUES ('" + FicheBord.NumerosFB + "','" + FicheBord.MatriculeAgent + "'"; this.strCommande += " ,'" + FicheBord.NumerosAV + "','" + FicheBord.DateHeurDepart.ToString("yyyy-MM-dd HH:mm:ss") + "'"; this.strCommande += " ,'" + FicheBord.DateHeurPrevue.ToString("yyyy-MM-dd HH:mm:ss") + "')"; this.serviceConnectBase.openConnection(); nombreInsertion = this.serviceConnectBase.requete(this.strCommande); if (nombreInsertion == 1) { numerosFB = FicheBord.NumerosFB; } this.serviceConnectBase.closeConnection(); } #endregion return(numerosFB); }
private void afficheAutorisationVoyage(string numerosFB) { if (numerosFB != "") { ficheDebord = serviceFicheBord.selectFicheBord(numerosFB); if (ficheDebord != null) { labNumFB.Text = ficheDebord.NumerosFB; labDateHeureFB.Text = ficheDebord.DateHeurPrevue.ToString("dd MMMM yyyy à HH:mm"); labNumAV.Text = ficheDebord.autorisationVoyage.NumerosAV; labDateAV.Text = ficheDebord.autorisationVoyage.DatePrevueDepart.ToString("dd MMMM yyyy"); labNomChauffeur.Text = ficheDebord.autorisationVoyage.Verification.Chauffeur.nomChauffeur; labPrenomChauffeur.Text = ficheDebord.autorisationVoyage.Verification.Chauffeur.prenomChauffeur; labMatriculeVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.MatriculeVehicule; labMarqueVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.MarqueVehicule; labCouleurVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.CouleurVehicule; labPoidsAutoriseVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.PoidsTotalVehicule + "Kg"; labItineraire.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.villeD.NomVille + "-" + ficheDebord.autorisationVoyage.Verification.Itineraire.villeF.NomVille; labDistance.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.DistanceParcour + "Km"; labDureeTrajet.Text = serviceGeneral.getTextTimeSpan(ficheDebord.autorisationVoyage.Verification.Itineraire.DureeTrajet); labNombreRepos.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.NombreRepos.ToString(); } else { Response.Redirect("PlanningCalendarJour.aspx"); } } }
protected void btnValide_Click(object sender, EventArgs e) { #region initialisation crlFicheBord FicheBord = new crlFicheBord(); int annee = 0; int mois = 0; int jour = 0; int heure = 0; int minute = 0; string numerosFB = ""; #endregion #region implementataion if (hfNumerosAV.Value != "") { if (this.testFormulaire()) { FicheBord.MatriculeAgent = agent.matriculeAgent; FicheBord.agent = agent; FicheBord.NumerosAV = hfNumerosAV.Value; FicheBord.autorisationVoyage = serviceAutorisationVoyage.selectAutorisationVoyage(FicheBord.NumerosAV); try { DateTime datePrevu = Convert.ToDateTime(TextDateDepart.Text); annee = datePrevu.Year; mois = datePrevu.Month; jour = datePrevu.Day; heure = int.Parse(ddlHeure.SelectedValue); minute = int.Parse(ddlMinute.SelectedValue); FicheBord.DateHeurPrevue = new DateTime(annee, mois, jour, heure, minute, 0); } catch (Exception) { } numerosFB = serviceFicheBord.insertFicheBord(FicheBord); if (numerosFB != "") { servicePlaceFB.insertPlaceForFB(FicheBord); Response.Redirect("RemplirFB.aspx?numerosFB=" + numerosFB); } else { this.divIndicationText(ReRealiseFB.ficheBordNonRealise, "red"); } } } else { this.divIndicationText(ReRealiseFB.choisireAV, "red"); } #endregion }
string IntfDalPlaceFB.insertPlaceForFB(crlFicheBord FicheBord) { #region declaration IntfDalPlaceFB servicePlaceFB = new ImplDalPlaceFB(); crlPlaceFB tempPlaceFB = null; int nombreInsert = 0; int nombreDePlace = 0; string numerosFB = ""; #endregion #region implementation if (FicheBord != null) { if (FicheBord.autorisationVoyage != null) { if (FicheBord.autorisationVoyage.Verification != null) { if (FicheBord.autorisationVoyage.Verification.Licence != null) { nombreDePlace = FicheBord.autorisationVoyage.Verification.Licence.NombrePlacePayante; if (nombreDePlace > 0) { for (int i = 0; i < nombreDePlace; i++) { tempPlaceFB = new crlPlaceFB(); tempPlaceFB.NumerosFB = FicheBord.NumerosFB; if (servicePlaceFB.insertPlaceFB(tempPlaceFB)) { nombreInsert += 1; } } if (nombreInsert == nombreDePlace) { numerosFB = FicheBord.NumerosFB; } else { servicePlaceFB.deletePlaceFB(FicheBord.NumerosFB); } } } } } } #endregion return(numerosFB); }
private void afficheAutorisationVoyage(string numAutorisationDepart) { if (numAutorisationDepart != "") { autorisationDepart = serviceAutorisationDepart.selectAutorisationDepart(numAutorisationDepart); if (autorisationDepart != null) { ficheDebord = autorisationDepart.ficheBord; hfAutorisationDepart.Value = autorisationDepart.NumAutorisationDepart; if (ficheDebord != null) { hfNumerosFB.Value = ficheDebord.NumerosFB; labNumFB.Text = ficheDebord.NumerosFB; labDateHeureFB.Text = ficheDebord.DateHeurPrevue.ToString("dd MMMM yyyy à HH:mm"); labNumAV.Text = ficheDebord.autorisationVoyage.NumerosAV; labDateAV.Text = ficheDebord.autorisationVoyage.DatePrevueDepart.ToString("dd MMMM yyyy"); labNomChauffeur.Text = ficheDebord.autorisationVoyage.Verification.Chauffeur.nomChauffeur; labPrenomChauffeur.Text = ficheDebord.autorisationVoyage.Verification.Chauffeur.prenomChauffeur; labMatriculeVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.MatriculeVehicule; labMarqueVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.MarqueVehicule; labCouleurVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.CouleurVehicule; labPoidsAutoriseVoiture.Text = ficheDebord.autorisationVoyage.Verification.Licence.vehicule.PoidsTotalVehicule + "Kg"; labItineraire.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.villeD.NomVille + "-" + ficheDebord.autorisationVoyage.Verification.Itineraire.villeF.NomVille; labDistance.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.DistanceParcour + "Km"; labDureeTrajet.Text = serviceGeneral.getTextTimeSpan(ficheDebord.autorisationVoyage.Verification.Itineraire.DureeTrajet); labNombreRepos.Text = ficheDebord.autorisationVoyage.Verification.Itineraire.NombreRepos.ToString(); labMotant.Text = serviceGeneral.separateurDesMilles(autorisationDepart.RecetteTotale.ToString("0")) + "Ar"; labReste.Text = serviceGeneral.separateurDesMilles(autorisationDepart.ResteRegle.ToString("0")) + "Ar"; LabTotalPrelevement.Text = serviceGeneral.separateurDesMilles(serviceAutorisationDepart.getMontanPrelevement(autorisationDepart.NumAutorisationDepart).ToString("0")) + "Ar"; LabTotalRecu.Text = serviceGeneral.separateurDesMilles(serviceAutorisationDepart.getMontanRecu(autorisationDepart.NumAutorisationDepart).ToString("0")) + "Ar"; } } else { Response.Redirect("PlanningCalendarJour.aspx"); } } }
crlFicheBord IntfDalFicheBord.selectFicheBord(string numerosFB) { #region declaration crlFicheBord FicheBord = null; IntfDalAgent serviceAgent = new ImplDalAgent(); IntfAutorisationVoyage serviceAutorisationVoyage = new ImplAutorisationVoyage(); IntfDalFicheBord serviceFicheBord = new ImplDalFicheBord(); IntfDalPlaceFB servicePlaceFB = new ImplDalPlaceFB(); #endregion #region implementation if (numerosFB != "") { this.strCommande = "SELECT * FROM `fichebord` WHERE (`numerosFB`='" + numerosFB + "')"; this.serviceConnectBase.openConnection(); this.reader = this.serviceConnectBase.select(this.strCommande); if (this.reader != null) { if (this.reader.HasRows) { if (this.reader.Read()) { FicheBord = new crlFicheBord(); FicheBord.NumerosFB = reader["numerosFB"].ToString(); FicheBord.MatriculeAgent = reader["matriculeAgent"].ToString(); FicheBord.NumerosAV = reader["numerosAV"].ToString(); FicheBord.DateHeurDepart = Convert.ToDateTime(reader["dateHeurDepart"].ToString()); FicheBord.DateHeurPrevue = Convert.ToDateTime(reader["dateHeurPrevue"].ToString()); } } this.reader.Dispose(); } this.serviceConnectBase.closeConnection(); if (FicheBord != null) { FicheBord.agent = serviceAgent.selectAgent(FicheBord.MatriculeAgent); FicheBord.autorisationVoyage = serviceAutorisationVoyage.selectAutorisationVoyage(FicheBord.NumerosAV); FicheBord.commission = serviceFicheBord.getCommission(FicheBord.NumerosFB); //FicheBord.escorteVoyage = serviceFicheBord.getEscorteVoyage(FicheBord.NumerosFB); FicheBord.voyage = serviceFicheBord.getVoyage(FicheBord.NumerosFB); FicheBord.placeFB = servicePlaceFB.selectPlaceFB(FicheBord.NumerosFB); } } #endregion return(FicheBord); }
protected void Calendar_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e) { #region declaration crlFicheBord ficheBord = null; #endregion #region implementation ficheBord = serviceFicheBord.selectFicheBord(e.Value); if (ficheBord != null) { ficheBord.DateHeurPrevue = e.NewStart; if (serviceFicheBord.updateFicheBord(ficheBord)) { this.initialiseCalendar(); } } #endregion }
protected void BubbleFicheBord_RenderContent(object sender, RenderEventArgs e) { #region initialisation crlFicheBord ficheBord = null; string nombrePlaceLibre = "0"; #endregion #region implementation if (e is RenderEventBubbleEventArgs) { RenderEventBubbleEventArgs re = e as RenderEventBubbleEventArgs; StringBuilder sb = new StringBuilder(); ficheBord = serviceFicheBord.selectFicheBord(re.Value); nombrePlaceLibre = servicePlaceFB.getNombrePlaceLibre(re.Value); if (ficheBord != null) { sb.AppendFormat("<div class='divBubble'>"); sb.AppendFormat("<b>Heure de départ:</b> {0}<br />", re.Start.ToString("HH:mm")); sb.AppendFormat("<b>Autorisation de voyage:</b> {0}<br />", ficheBord.autorisationVoyage.NumerosAV + " du " + ficheBord.autorisationVoyage.DatePrevueDepart.ToString("dd MMMM yyyy")); sb.AppendFormat("<b>Vehicule:</b> {0}<br />", ficheBord.autorisationVoyage.Verification.Licence.vehicule.MarqueVehicule + " " + ficheBord.autorisationVoyage.Verification.Licence.vehicule.CouleurVehicule + " " + ficheBord.autorisationVoyage.Verification.Licence.vehicule.MatriculeVehicule); sb.AppendFormat("<b>Chauffeur:</b> {0}<br />", ficheBord.autorisationVoyage.Verification.Chauffeur.prenomChauffeur + " " + ficheBord.autorisationVoyage.Verification.Chauffeur.nomChauffeur); sb.AppendFormat("<b>Itineraire:</b> {0}<br />", ficheBord.autorisationVoyage.Verification.Itineraire.villeD.NomVille + "-" + ficheBord.autorisationVoyage.Verification.Itineraire.villeF.NomVille); sb.AppendFormat("<b>Poids autorisé:</b> {0}<br />", ficheBord.autorisationVoyage.Verification.Licence.vehicule.PoidsTotalVehicule + "Kg"); sb.AppendFormat("<b>Nombre de place libre:</b> {0}<br />", nombrePlaceLibre); sb.AppendFormat("</div>"); } re.InnerHTML = sb.ToString(); } else if (e is RenderTimeBubbleEventArgs) { RenderTimeBubbleEventArgs re = e as RenderTimeBubbleEventArgs; e.InnerHTML = "<div class='divBubble'><b>Date:</b>" + re.Start.ToString("dd MMMM yyyy") + "</div>"; } #endregion }
List <crlFicheBord> IntfDalFicheBord.selectFicheBord(DateTime date, string heure, string idItineraire, string numAgence) { #region declaration List <crlFicheBord> ficheBords = null; crlFicheBord tempFicheBord = null; IntfDalAgent serviceAgent = new ImplDalAgent(); IntfAutorisationVoyage serviceAutorisationVoyage = new ImplAutorisationVoyage(); IntfDalFicheBord serviceFicheBord = new ImplDalFicheBord(); IntfDalPlaceFB servicePlaceFB = new ImplDalPlaceFB(); #endregion #region implementation if (heure != "" && idItineraire != "" && numAgence != "") { this.strCommande = "SELECT (fichebord.numerosFB) AS numFB, (fichebord.matriculeAgent) AS matrAgent, (fichebord.numerosAV) AS numAV,"; this.strCommande += " fichebord.dateHeurDepart, fichebord.dateHeurPrevue FROM fichebord"; this.strCommande += " Inner Join autorisationvoyage ON autorisationvoyage.numerosAV = fichebord.numerosAV"; this.strCommande += " Inner Join verification ON verification.idVerification = autorisationvoyage.idVerification"; this.strCommande += " Left Join autorisationdepart ON autorisationdepart.numerosFB = fichebord.numerosFB"; this.strCommande += " Inner Join agent ON agent.matriculeAgent = fichebord.matriculeAgent"; this.strCommande += " WHERE fichebord.dateHeurPrevue LIKE '" + date.ToString("yyyy-MM-dd") + " " + heure + "%' AND"; this.strCommande += " autorisationdepart.numerosFB IS NULL AND"; this.strCommande += " agent.numAgence = '" + numAgence + "' AND"; this.strCommande += " verification.idItineraire = '" + idItineraire + "'"; this.serviceConnectBase.openConnection(); this.reader = this.serviceConnectBase.select(this.strCommande); if (this.reader != null) { if (this.reader.HasRows) { ficheBords = new List <crlFicheBord>(); while (this.reader.Read()) { tempFicheBord = new crlFicheBord(); tempFicheBord.NumerosFB = reader["numFB"].ToString(); tempFicheBord.MatriculeAgent = reader["matrAgent"].ToString(); tempFicheBord.NumerosAV = reader["numAV"].ToString(); tempFicheBord.DateHeurDepart = Convert.ToDateTime(reader["dateHeurDepart"].ToString()); tempFicheBord.DateHeurPrevue = Convert.ToDateTime(reader["dateHeurPrevue"].ToString()); ficheBords.Add(tempFicheBord); } } this.reader.Dispose(); } this.serviceConnectBase.closeConnection(); if (ficheBords != null) { for (int i = 0; i < ficheBords.Count; i++) { ficheBords[i].agent = serviceAgent.selectAgent(ficheBords[i].MatriculeAgent); ficheBords[i].autorisationVoyage = serviceAutorisationVoyage.selectAutorisationVoyage(ficheBords[i].NumerosAV); ficheBords[i].commission = serviceFicheBord.getCommission(ficheBords[i].NumerosFB); //FicheBord.escorteVoyage = serviceFicheBord.getEscorteVoyage(FicheBord.NumerosFB); ficheBords[i].voyage = serviceFicheBord.getVoyage(ficheBords[i].NumerosFB); ficheBords[i].placeFB = servicePlaceFB.selectPlaceFB(ficheBords[i].NumerosFB); } } } #endregion return(ficheBords); }
int IntfDalFicheBord.isFicheBord(crlFicheBord FicheBord) { throw new NotImplementedException(); }
private Table creeImageVoiture(int nbPlace, int nbColone, List <crlPlaceFB> placeFBs, crlFicheBord ficheBord) { #region declaration Table tableVoiture = null; #endregion #region implementation if (nbPlace == placeFBs.Count) { LinkButton btnSelectHead = new LinkButton(); btnSelectHead.Text = ficheBord.autorisationVoyage.Verification.Licence.vehicule.MatriculeVehicule + " <br/>" + ficheBord.autorisationVoyage.Verification.Licence.vehicule.MarqueVehicule + " <br/>" + ficheBord.autorisationVoyage.Verification.Licence.vehicule.CouleurVehicule; btnSelectHead.PostBackUrl = "RemplirFB.aspx?numerosFB=" + ficheBord.NumerosFB; btnSelectHead.CssClass = "voitureText"; btnSelectHead.Width = new Unit(80); List <TableCell> cells = new List <TableCell>(); List <TableRow> rows = new List <TableRow>(); List <Image> images = new List <Image>(); TableCell cellChauffeur = new TableCell(); Image imageChauffeur = new Image(); imageChauffeur.ImageUrl = "~/CssStyle/images/bleu.png"; cellChauffeur.Controls.Add(imageChauffeur); cellChauffeur.ColumnSpan = nbColone - 2; TableCell cellHead = new TableCell(); cellHead.ColumnSpan = nbColone; cellHead.Height = 25; cellHead.CssClass = "voitureHead"; cellHead.Controls.Add(btnSelectHead); //cellHead.Controls.Add(btnSelectHeadMarque); //cellHead.Controls.Add(btnSelectHeadCouleur); TableRow rowHead = new TableRow(); rowHead.Cells.Add(cellHead); TableCell cellFoot = new TableCell(); cellFoot.ColumnSpan = nbColone; cellFoot.Height = 10; cellFoot.CssClass = "voitureFoot"; #region foot TableCell cellFootItem11 = new TableCell(); cellFootItem11.ColumnSpan = nbColone - 1; cellFootItem11.CssClass = "voitureFootItem"; TableCell cellFootItem12 = new TableCell(); cellFootItem12.CssClass = "voitureFootItem"; TableCell cellFootItem22 = new TableCell(); cellFootItem22.ColumnSpan = nbColone; cellFootItem22.CssClass = "voitureFootItem"; Image imgIndicateur = new Image(); int nbPlaceOccuper = serviceFicheBord.getNombreTotalPassager(ficheBord.NumerosFB); double poidBagage = serviceFicheBord.getPoidTotalBagage(ficheBord.NumerosFB) + serviceFicheBord.getPoidTotalCommission(ficheBord.NumerosFB); if (ficheBord.autorisationVoyage.Verification.Licence.vehicule.paramVehicule.NbPassagerMin > nbPlaceOccuper) { imgIndicateur.ImageUrl = "~/CssStyle/images/rouge.png"; } else if (nbPlaceOccuper == ficheBord.autorisationVoyage.Verification.Licence.NombrePlacePayante) { imgIndicateur.ImageUrl = "~/CssStyle/images/vert.png"; } else { imgIndicateur.ImageUrl = "~/CssStyle/images/bleu.png"; } Label labelIndicateur = new Label(); labelIndicateur.Text = "Indicateur:"; Label labelBagVar = new Label(); labelBagVar.Text = "Bag:" + poidBagage.ToString("0") + "Kg/" + ficheBord.autorisationVoyage.Verification.Licence.vehicule.paramVehicule.PoidBagageMax.ToString("0") + "Kg"; cellFootItem11.Controls.Add(labelIndicateur); cellFootItem12.Controls.Add(imgIndicateur); cellFootItem22.Controls.Add(labelBagVar); TableRow rowFootItem1 = new TableRow(); rowFootItem1.Cells.Add(cellFootItem11); rowFootItem1.Cells.Add(cellFootItem12); TableRow rowFootItem2 = new TableRow(); rowFootItem2.Cells.Add(cellFootItem22); #endregion TableRow rowFoot = new TableRow(); rowFoot.Cells.Add(cellFoot); for (int i = 0; i < nbPlace; i++) { cells.Add(new TableCell()); images.Add(new Image()); } for (int i = 0; i < nbPlace; i++) { if (placeFBs[i].IsOccuper == 1) { images[i].ImageUrl = "~/CssStyle/images/rouge.png"; } else { images[i].ImageUrl = "~/CssStyle/images/vert.png"; } cells[i].Controls.Add(images[i]); } rows = new List <TableRow>(); rows.Add(new TableRow()); rows[0].Cells.Add(cellChauffeur); if (cells.Count >= 2) { rows[0].Cells.Add(cells[0]); rows[0].Cells.Add(cells[1]); } int iColone = 1; int iPlace = 2; int iRow = 1; while (iPlace < nbPlace) { if (iColone == 1) { rows.Add(new TableRow()); rows[iRow].Cells.Add(cells[iPlace]); iPlace = iPlace + 1; iColone = iColone + 1; } else { rows[iRow].Cells.Add(cells[iPlace]); iPlace = iPlace + 1; iColone = iColone + 1; } if (iColone > nbColone) { iRow = iRow + 1; iColone = 1; } tableVoiture = new Table(); tableVoiture.CellSpacing = 0; tableVoiture.Rows.Add(rowHead); for (int i = 0; i < iRow; i++) { rows[i].CssClass = "trVoiture"; tableVoiture.Rows.Add(rows[i]); } tableVoiture.Rows.Add(rowFootItem2); tableVoiture.Rows.Add(rowFootItem1); tableVoiture.Rows.Add(rowFoot); } } #endregion return(tableVoiture); }
protected void btnAutorisationDepart_Click(object sender, EventArgs e) { #region declaration crlAutorisationDepart autorisationDepart = null; crlTarifDeveloppement tarifDeveloppement = null; crlPrelevement prelevement = null; crlRecuAD recuAD = null; #endregion #region implementation if (hfNumerosFB.Value != "") { autorisationDepart = new crlAutorisationDepart(); this.insertObjetAD(autorisationDepart); autorisationDepart.NumAutorisationDepart = serviceAutorisationDepart.insertAutorisationDepart(autorisationDepart); if (autorisationDepart.NumAutorisationDepart != "") { autorisationDepart = serviceAutorisationDepart.selectAutorisationDepart(autorisationDepart.NumAutorisationDepart); if (autorisationDepart != null) { tarifDeveloppement = serviceTarifDeveloppement.selectTarifDeveloppementZone(autorisationDepart.ficheBord.autorisationVoyage.Verification.Licence.Zone); if (tarifDeveloppement != null) { prelevement = new crlPrelevement(); prelevement.agent = agent; prelevement.MatriculeAgent = agent.matriculeAgent; prelevement.MontantPrelevement = tarifDeveloppement.MontantTarifDeveloppement; prelevement.NumAutorisationDepart = autorisationDepart.NumAutorisationDepart; prelevement.TypePrelevement = "Développement"; prelevement.NumPrelevement = servicePrelevement.insertPrelevement(prelevement); if (prelevement.NumPrelevement != "") { recuAD = new crlRecuAD(); recuAD.Libele = "Développement"; recuAD.agent = agent; recuAD.MatriculeAgent = agent.matriculeAgent; recuAD.Montant = prelevement.MontantPrelevement.ToString("0"); recuAD.NumPrelevement = prelevement.NumPrelevement; recuAD.NumRecuAD = serviceRecuAD.insertRecuAD(recuAD); autorisationDepart.ResteRegle = autorisationDepart.ResteRegle - prelevement.MontantPrelevement; serviceAutorisationDepart.updateAutorisationDepart(autorisationDepart); this.prelevementFond(autorisationDepart.NumAutorisationDepart); } else { } } else { } } ficheDebord = serviceFicheBord.selectFicheBord(hfNumerosFB.Value); ficheDebord.DateHeurDepart = DateTime.Now; serviceFicheBord.updateFicheBord(ficheDebord); Response.Redirect("~/ihmActeur/controleur/PlanningCalendarJourAD.aspx"); //Page.ClientScript.RegisterClientScriptBlock(GetType(), "Alert", "alert('" + ReAutorisationDepart.ADBienEnregistre + "');", true); } else { this.divIndicationText(ReAutorisationDepart.ADNonEnregistre, "Red"); } } else { Response.Redirect("PlanningCalendarJour.aspx"); } #endregion }