示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region initialisation ressource
            serviceRessource = new ImplDalServiceRessource();
            serviceLien      = new ImplDalLien();
            #endregion

            #region verification
            this.verification();
            #endregion

            #region initialisation
            serviceAutorisationDepart = new ImplDalAutorisationDepart();
            serviceFacture            = new ImplDalFacture();
            serviceGeneral            = new ImplDalGeneral();
            serviceVehicule           = new ImplDalVehicule();

            convertisseuse = new Convertisseuse();
            #endregion

            #region !isPostBack
            if (!IsPostBack)
            {
                this.initialiseGridVehicule();
            }
            #endregion
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region initialisation
            serviceCA      = new ImplDalCA();
            serviceGeneral = new ImplDalGeneral();

            convertisseuse = new Convertisseuse();
            #endregion

            #region
            if (!IsPostBack)
            {
                TextDateDebut.Text = DateTime.Now.ToString("dd MMMM yyyy");
                TextDateFin.Text   = DateTime.Now.ToString("dd MMMM yyyy");

                try
                {
                    rbCAParam.SelectedValue = "0";
                }
                catch (Exception)
                {
                }

                this.initialise();
            }
            #endregion
        }
示例#3
0
        private void afficheVehicule(string numVehicule)
        {
            #region declaration
            crlVehicule vehicule = null;
            convertisseuse = new Convertisseuse();
            #endregion

            #region implementation
            if (numVehicule != "")
            {
                vehicule = serviceVehicule.selectVehicule(numVehicule);

                if (vehicule != null)
                {
                    LabelMatricule.Text = vehicule.MatriculeVehicule;
                    LabelMarque.Text    = vehicule.MarqueVehicule;
                    LabelCouleur.Text   = vehicule.CouleurVehicule;
                    hfNumVehicule.Value = vehicule.NumVehicule;

                    if (vehicule.proprietaire != null)
                    {
                        if (vehicule.proprietaire.Individu != null)
                        {
                            LabelNomIndividu.Text    = vehicule.proprietaire.Individu.NomIndividu;
                            LabelPrenomIndividu.Text = vehicule.proprietaire.Individu.PrenomIndividu;
                            LabelCINIndividu.Text    = vehicule.proprietaire.Individu.CinIndividu;
                            LabelFixeIndividu.Text   = vehicule.proprietaire.Individu.TelephoneFixeIndividu;
                            LabelMobileIndividu.Text = vehicule.proprietaire.Individu.TelephoneMobileIndividu;

                            Panel_Individu.Visible = true;
                        }
                        else
                        {
                            Panel_Individu.Visible = false;
                        }

                        if (vehicule.proprietaire.societe != null)
                        {
                            LabelSociete.Text       = vehicule.proprietaire.societe.NomSociete;
                            LabelFixeSociete.Text   = vehicule.proprietaire.societe.TelephoneFixeSociete;
                            LabelMobileSociete.Text = vehicule.proprietaire.societe.TelephoneMobileSociete;

                            if (vehicule.proprietaire.societe.individuResponsable != null)
                            {
                                LabelNomRespSociete.Text    = vehicule.proprietaire.societe.individuResponsable.NomIndividu;
                                LabelPrenomRespSociete.Text = vehicule.proprietaire.societe.individuResponsable.PrenomIndividu;
                                LabelFixeRespSociete.Text   = vehicule.proprietaire.societe.individuResponsable.TelephoneFixeIndividu;
                                LabelMobileRespSociete.Text = vehicule.proprietaire.societe.individuResponsable.TelephoneMobileIndividu;
                            }

                            Panel_Societe.Visible = true;
                        }
                        else
                        {
                            Panel_Societe.Visible = false;
                        }

                        if (vehicule.proprietaire.organisme != null)
                        {
                            LabelOrganisme.Text       = vehicule.proprietaire.organisme.NomOrganisme;
                            LabelFixeOrganisme.Text   = vehicule.proprietaire.organisme.TelephoneFixeOrganisme;
                            LabelMobileOrganisme.Text = vehicule.proprietaire.organisme.TelephoneMobileOrganisme;

                            if (vehicule.proprietaire.organisme.individuResponsable != null)
                            {
                                LabelNomRespOrganisme.Text    = vehicule.proprietaire.organisme.individuResponsable.NomIndividu;
                                LabelPrenomRespOrganisme.Text = vehicule.proprietaire.organisme.individuResponsable.PrenomIndividu;
                                LabelFixeRespOrganisme.Text   = vehicule.proprietaire.organisme.individuResponsable.TelephoneFixeIndividu;
                                LabelMobileRespOrganisme.Text = vehicule.proprietaire.organisme.individuResponsable.TelephoneMobileIndividu;
                            }

                            Panel_Organisme.Visible = true;
                        }
                        else
                        {
                            Panel_Organisme.Visible = false;
                        }

                        this.initialiseGridListeVoyage();
                        this.initialiseGridListeRecu();

                        LabTotalRecettes.Text    = serviceGeneral.separateurDesMilles(serviceVehicule.getTotalRecette(vehicule.NumVehicule).ToString("0")) + "Ar";
                        LabTotalReste.Text       = serviceGeneral.separateurDesMilles(serviceVehicule.getTotalReste(vehicule.NumVehicule).ToString("0")) + "Ar";
                        LabTotalMontantRecu.Text = serviceGeneral.separateurDesMilles(serviceVehicule.getTotalRecu(vehicule.NumVehicule).ToString("0")) + "Ar";

                        LabMontantTotalFacture.Text        = serviceGeneral.separateurDesMilles(serviceVehicule.getTotalReste(vehicule.NumVehicule).ToString("0")) + "Ar";
                        LabMontantTotalFactutreLettre.Text = convertisseuse.convertion(serviceVehicule.getTotalReste(vehicule.NumVehicule).ToString("0")) + " Ariary";
                    }
                }
            }
            #endregion
        }
示例#4
0
        private void afficheMontantTotal(string numSessionCaisse)
        {
            #region declaration
            double montantBillet               = 0;
            double montantCommission           = 0;
            double montantDureeAbonnement      = 0;
            double montantVoyageAbonnement     = 0;
            double montantRecuEncaisser        = 0;
            double montantRecuEncaisserCheque  = 0;
            double montantTotalSession         = 0;
            double montantTotalSessionCheque   = 0;
            double montantRecuAD               = 0;
            double montantAbonnementNbVoyageUS = 0;
            double montantBilletUS             = 0;

            crlSessionCaisse sessionCaisse  = null;
            Convertisseuse   convertisseuse = new Convertisseuse();
            #endregion

            #region implementation
            if (numSessionCaisse != "")
            {
                sessionCaisse               = serviceSessionCaisse.selectSessionCaisse(numSessionCaisse);
                montantBillet               = serviceSessionCaisse.getMontantTotalBillet(numSessionCaisse);
                montantCommission           = serviceSessionCaisse.getMontantTotalCommission(numSessionCaisse);
                montantDureeAbonnement      = serviceSessionCaisse.getMontantTotalDureeAbonnement(numSessionCaisse);
                montantRecuEncaisser        = serviceSessionCaisse.getMontantTotalRecuEncaisserEspece(numSessionCaisse);
                montantRecuEncaisserCheque  = serviceSessionCaisse.getMontantTotalRecuEncaisserCheque(numSessionCaisse);
                montantVoyageAbonnement     = serviceSessionCaisse.getMontantTotalVoyageAbonnement(numSessionCaisse);
                montantRecuAD               = serviceSessionCaisse.getMontantTotalRecuAD(numSessionCaisse);
                montantAbonnementNbVoyageUS = serviceSessionCaisse.getMontantTotalAbonnementNVUS(numSessionCaisse);
                montantBilletUS             = serviceSessionCaisse.getMontantTotalBilletUS(numSessionCaisse);

                montantTotalSession       = montantBillet + montantCommission + montantDureeAbonnement + montantRecuEncaisser + montantVoyageAbonnement + sessionCaisse.FondCaisse + montantAbonnementNbVoyageUS + montantBilletUS - montantRecuAD;
                montantTotalSessionCheque = montantRecuEncaisserCheque;

                if (montantBillet > 0)
                {
                    Panel_BilletMontantTotal.Visible   = true;
                    LabelMontantTotalBillet.Text       = serviceGeneral.separateurDesMilles(montantBillet.ToString("0")) + "Ar";
                    LabelMontantTotalLettreBillet.Text = convertisseuse.convertion(montantBillet.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_BilletMontantTotal.Visible   = false;
                    LabelMontantTotalBillet.Text       = "0Ar";
                    LabelMontantTotalLettreBillet.Text = "Zéro Ariary";
                }

                if (montantCommission > 0)
                {
                    Panel_CommissionMontantTotal.Visible   = true;
                    LabelMontantTotalCommission.Text       = serviceGeneral.separateurDesMilles(montantCommission.ToString("0")) + "Ar";
                    LabelMontantTotalCommissionLettre.Text = convertisseuse.convertion(montantCommission.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_CommissionMontantTotal.Visible   = false;
                    LabelMontantTotalCommission.Text       = "0Ar";
                    LabelMontantTotalCommissionLettre.Text = "Zéro Ariary";
                }

                if (montantDureeAbonnement > 0)
                {
                    Panel_DureeAbonnementMontantTotal.Visible   = true;
                    LabelMotantTotalDureeAbonnement.Text        = serviceGeneral.separateurDesMilles(montantDureeAbonnement.ToString("0")) + "Ar";
                    LabelMontantTotalDureeAbonnementLettre.Text = convertisseuse.convertion(montantDureeAbonnement.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_DureeAbonnementMontantTotal.Visible   = false;
                    LabelMotantTotalDureeAbonnement.Text        = "0Ar";
                    LabelMontantTotalDureeAbonnementLettre.Text = "Zéro Ariary";
                }

                if (montantRecuEncaisser > 0 || montantRecuEncaisserCheque > 0)
                {
                    Panel_RecuEncaisserMontantTotal.Visible   = true;
                    LabelMontantTotalRecuEncaisser.Text       = serviceGeneral.separateurDesMilles(montantRecuEncaisser.ToString("0")) + "Ar";
                    LabelMontantTotalRecuEncaisserLettre.Text = convertisseuse.convertion(montantRecuEncaisser.ToString("0")) + " Ariary";

                    LabelMontantTotalRecuEnCaisserCheque.Text       = serviceGeneral.separateurDesMilles(montantRecuEncaisserCheque.ToString("0")) + "Ar";
                    LabelMontantTotalRecuEnCaisserChequeLettre.Text = convertisseuse.convertion(montantRecuEncaisserCheque.ToString("0")) + "Ariary";
                }
                else
                {
                    Panel_RecuEncaisserMontantTotal.Visible   = false;
                    LabelMontantTotalRecuEncaisser.Text       = "0Ar";
                    LabelMontantTotalRecuEncaisserLettre.Text = "Zéro Ariary";

                    LabelMontantTotalRecuEnCaisserCheque.Text       = "0Ar";
                    LabelMontantTotalRecuEnCaisserChequeLettre.Text = "Zéro Ariary";
                }


                if (montantVoyageAbonnement > 0)
                {
                    Panel_VoyageAbonnementMontantTotal.Visible   = true;
                    LabelMontantTotalVoyageAbonnement.Text       = serviceGeneral.separateurDesMilles(montantVoyageAbonnement.ToString("0")) + "Ar";
                    LabelMontantTotalVoyageAbonnementLettre.Text = convertisseuse.convertion(montantVoyageAbonnement.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_VoyageAbonnementMontantTotal.Visible   = false;
                    LabelMontantTotalVoyageAbonnement.Text       = "0Ar";
                    LabelMontantTotalVoyageAbonnementLettre.Text = "Zéro Ariary";
                }

                if (montantRecuAD > 0)
                {
                    Panel_RecuADTotal.Visible                 = true;
                    LabelMontantTotalRecuDecaisser.Text       = serviceGeneral.separateurDesMilles(montantRecuAD.ToString("0")) + "Ar";
                    LabelMontantTotalRecuDecaisserLettre.Text = convertisseuse.convertion(montantRecuAD.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_RecuADTotal.Visible                 = false;
                    LabelMontantTotalRecuDecaisser.Text       = "0Ar";
                    LabelMontantTotalRecuDecaisserLettre.Text = "Zéro Ariary";
                }


                Panel_MontantTotalSessionCaisse.Visible = true;

                if (montantTotalSession >= 0)
                {
                    LabelMontantTotalSessionLettre.Text = convertisseuse.convertion(montantTotalSession.ToString("0")) + " Ariary";
                    LabelMontantTotalSession.Text       = serviceGeneral.separateurDesMilles(montantTotalSession.ToString("0")) + "Ar";
                }
                else
                {
                    LabelMontantTotalSession.Text       = "(" + serviceGeneral.separateurDesMilles(montantTotalSession.ToString("0")) + ") Ar";
                    LabelMontantTotalSessionLettre.Text = "(- " + convertisseuse.convertion((montantTotalSession * -1).ToString("0")) + ") Ariary";
                }


                if (montantTotalSessionCheque >= 0)
                {
                    LabelMontantTotalSessionChequelettre.Text = convertisseuse.convertion(montantTotalSessionCheque.ToString("0")) + " Ariary";
                    LabelMontantTotalSessionCheque.Text       = serviceGeneral.separateurDesMilles(montantTotalSessionCheque.ToString("0")) + "Ar";
                }
                else
                {
                    LabelMontantTotalSessionCheque.Text       = "(" + serviceGeneral.separateurDesMilles(montantTotalSessionCheque.ToString("0")) + ") Ar";
                    LabelMontantTotalSessionChequelettre.Text = "(- " + convertisseuse.convertion((montantTotalSessionCheque * -1).ToString("0")) + ") Ariary";
                }

                if (montantAbonnementNbVoyageUS > 0)
                {
                    Panel_AbonnementNbVoyageUS.Visible          = true;
                    LabelMontantAbonnementNBVoyageUS.Text       = serviceGeneral.separateurDesMilles(montantAbonnementNbVoyageUS.ToString("0")) + "Ar";
                    LabelMontantAbonnementNBVoyageUSLettre.Text = convertisseuse.convertion(montantAbonnementNbVoyageUS.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_AbonnementNbVoyageUS.Visible          = false;
                    LabelMontantAbonnementNBVoyageUS.Text       = "";
                    LabelMontantAbonnementNBVoyageUSLettre.Text = "";
                }

                if (montantBilletUS > 0)
                {
                    Panel_BilletUS.Visible          = true;
                    LabelMontantBilletUS.Text       = serviceGeneral.separateurDesMilles(montantBilletUS.ToString("0")) + "Ar";
                    LabelMontantBilletUSLettre.Text = convertisseuse.convertion(montantBilletUS.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_BilletUS.Visible          = false;
                    LabelMontantBilletUS.Text       = "";
                    LabelMontantBilletUSLettre.Text = "";
                }

                if (sessionCaisse != null)
                {
                    LabelDateDebutSession.Text = sessionCaisse.DateHeureDebutSession.ToString("dd MMMM yyyy");
                }


                /*else
                 * {
                 *
                 *  Panel_MontantTotalSessionCaisse.Visible = false;
                 *  LabelMontantTotalSession.Text = "0Ar";
                 *  LabelMontantTotalSessionLettre.Text = "Zéro Ariary";
                 *  LabelDateDebutSession.Text = "";
                 *
                 *  LabelMontantTotalSessionCheque.Text = "0Ar";
                 *  LabelMontantTotalSessionChequelettre.Text = "Zéro Ariary";
                 * }*/



                this.initialiseGridBillet();
                this.initialiseGridCommission();
                this.initialiseGridADT();
                this.initialiseGridANV();
                this.initialiseGridRecuEspece();
                this.initialiseGridRecuCheque();
                this.initialiseGridRecuAD();
            }
            #endregion
        }
示例#5
0
        private void afficheMontantTotal(string numSessionAgence)
        {
            #region declaration
            double montantBillet              = 0;
            double montantCommission          = 0;
            double montantDureeAbonnement     = 0;
            double montantVoyageAbonnement    = 0;
            double montantRecuEncaisser       = 0;
            double montantRecuEncaisserCheque = 0;
            double montantTotalSession        = 0;
            double montantTotalSessionCheque  = 0;
            double montantRecuAD              = 0;

            crlSessionAgence sessionAgence  = null;
            Convertisseuse   convertisseuse = new Convertisseuse();
            #endregion

            #region implementation
            if (numSessionAgence != "")
            {
                sessionAgence              = serviceSessionAgence.selectSessionAgence(numSessionAgence);
                montantBillet              = serviceSessionAgence.getMontantTotalBillet(numSessionAgence);
                montantCommission          = serviceSessionAgence.getMontantTotalCommission(numSessionAgence);
                montantDureeAbonnement     = serviceSessionAgence.getMontantTotalDureeAbonnement(numSessionAgence);
                montantRecuEncaisser       = serviceSessionAgence.getMontantTotalRecuEncaisserEspece(numSessionAgence);
                montantRecuEncaisserCheque = serviceSessionAgence.getMontantTotalRecuEncaisserCheque(numSessionAgence);
                montantVoyageAbonnement    = serviceSessionAgence.getMontantTotalVoyageAbonnement(numSessionAgence);
                montantRecuAD              = serviceSessionAgence.getMontantTotalRecuAD(numSessionAgence);

                montantTotalSession       = montantBillet + montantCommission + montantDureeAbonnement + montantRecuEncaisser + montantVoyageAbonnement - montantRecuAD;
                montantTotalSessionCheque = montantRecuEncaisserCheque;

                if (montantBillet > 0)
                {
                    Panel_BilletMontantTotal.Visible   = true;
                    LabelMontantTotalBillet.Text       = serviceGeneral.separateurDesMilles(montantBillet.ToString("0")) + "Ar";
                    LabelMontantTotalLettreBillet.Text = convertisseuse.convertion(montantBillet.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_BilletMontantTotal.Visible   = false;
                    LabelMontantTotalBillet.Text       = "0Ar";
                    LabelMontantTotalLettreBillet.Text = "Zéro Ariary";
                }

                if (montantCommission > 0)
                {
                    Panel_CommissionMontantTotal.Visible   = true;
                    LabelMontantTotalCommission.Text       = serviceGeneral.separateurDesMilles(montantCommission.ToString("0")) + "Ar";
                    LabelMontantTotalCommissionLettre.Text = convertisseuse.convertion(montantCommission.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_CommissionMontantTotal.Visible   = false;
                    LabelMontantTotalCommission.Text       = "0Ar";
                    LabelMontantTotalCommissionLettre.Text = "Zéro Ariary";
                }

                if (montantDureeAbonnement > 0)
                {
                    Panel_DureeAbonnementMontantTotal.Visible   = true;
                    LabelMotantTotalDureeAbonnement.Text        = serviceGeneral.separateurDesMilles(montantDureeAbonnement.ToString("0")) + "Ar";
                    LabelMontantTotalDureeAbonnementLettre.Text = convertisseuse.convertion(montantDureeAbonnement.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_DureeAbonnementMontantTotal.Visible   = false;
                    LabelMotantTotalDureeAbonnement.Text        = "0Ar";
                    LabelMontantTotalDureeAbonnementLettre.Text = "Zéro Ariary";
                }

                if (montantRecuEncaisser > 0 || montantRecuEncaisserCheque > 0)
                {
                    Panel_RecuEncaisserMontantTotal.Visible   = true;
                    LabelMontantTotalRecuEncaisser.Text       = serviceGeneral.separateurDesMilles(montantRecuEncaisser.ToString("0")) + "Ar";
                    LabelMontantTotalRecuEncaisserLettre.Text = convertisseuse.convertion(montantRecuEncaisser.ToString("0")) + " Ariary";

                    LabelMontantTotalRecuEnCaisserCheque.Text       = serviceGeneral.separateurDesMilles(montantRecuEncaisserCheque.ToString("0")) + "Ar";
                    LabelMontantTotalRecuEnCaisserChequeLettre.Text = convertisseuse.convertion(montantRecuEncaisserCheque.ToString("0")) + "Ariary";
                }
                else
                {
                    Panel_RecuEncaisserMontantTotal.Visible   = false;
                    LabelMontantTotalRecuEncaisser.Text       = "0Ar";
                    LabelMontantTotalRecuEncaisserLettre.Text = "Zéro Ariary";

                    LabelMontantTotalRecuEnCaisserCheque.Text       = "0Ar";
                    LabelMontantTotalRecuEnCaisserChequeLettre.Text = "Zéro Ariary";
                }


                if (montantVoyageAbonnement > 0)
                {
                    Panel_VoyageAbonnementMontantTotal.Visible   = true;
                    LabelMontantTotalVoyageAbonnement.Text       = serviceGeneral.separateurDesMilles(montantVoyageAbonnement.ToString("0")) + "Ar";
                    LabelMontantTotalVoyageAbonnementLettre.Text = convertisseuse.convertion(montantVoyageAbonnement.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_VoyageAbonnementMontantTotal.Visible   = false;
                    LabelMontantTotalVoyageAbonnement.Text       = "0Ar";
                    LabelMontantTotalVoyageAbonnementLettre.Text = "Zéro Ariary";
                }

                if (montantRecuAD > 0)
                {
                    Panel_RecuADTotal.Visible                 = true;
                    LabelMontantTotalRecuDecaisser.Text       = serviceGeneral.separateurDesMilles(montantRecuAD.ToString("0")) + "Ar";
                    LabelMontantTotalRecuDecaisserLettre.Text = convertisseuse.convertion(montantRecuAD.ToString("0")) + " Ariary";
                }
                else
                {
                    Panel_RecuADTotal.Visible                 = false;
                    LabelMontantTotalRecuDecaisser.Text       = "0Ar";
                    LabelMontantTotalRecuDecaisserLettre.Text = "Zéro Ariary";
                }

                Panel_MontantTotalSessionCaisse.Visible = true;

                if (montantTotalSession >= 0)
                {
                    LabelMontantTotalSessionLettre.Text = convertisseuse.convertion(montantTotalSession.ToString("0")) + " Ariary";
                    LabelMontantTotalSession.Text       = serviceGeneral.separateurDesMilles(montantTotalSession.ToString("0")) + "Ar";
                }
                else
                {
                    LabelMontantTotalSession.Text       = "(" + serviceGeneral.separateurDesMilles(montantTotalSession.ToString("0")) + ") Ar";
                    LabelMontantTotalSessionLettre.Text = "(- " + convertisseuse.convertion((montantTotalSession * -1).ToString("0")) + ") Ariary";
                }


                if (montantTotalSessionCheque >= 0)
                {
                    LabelMontantTotalSessionChequelettre.Text = convertisseuse.convertion(montantTotalSessionCheque.ToString("0")) + " Ariary";
                    LabelMontantTotalSessionCheque.Text       = serviceGeneral.separateurDesMilles(montantTotalSessionCheque.ToString("0")) + "Ar";
                }
                else
                {
                    LabelMontantTotalSessionCheque.Text       = "(" + serviceGeneral.separateurDesMilles(montantTotalSessionCheque.ToString("0")) + ") Ar";
                    LabelMontantTotalSessionChequelettre.Text = "(- " + convertisseuse.convertion((montantTotalSessionCheque * -1).ToString("0")) + ") Ariary";
                }

                if (sessionAgence != null)
                {
                    LabelDateDebutSession.Text = sessionAgence.DateHeureOuverture.ToString("dd MMMM yyyy");
                }
            }
            #endregion
        }