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 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 }