예제 #1
0
 public void ModifyEntities(Employe entitie)
 {
     entitie.Agence           = this.id_agence;
     entitie.AllocateComputer = this.ordinateur_allouer;
     entitie.Auth             = this.id_autorite_signature;
     entitie.BackDAte         = this.ouverture_back_date ? "Yes"
                                         : "No";
     entitie.BackDAteWk = this.ouverture_back_date_travail ? "Yes"
                                                   : "No";
     entitie.ComputerName   = this.nom_ordinateur;
     entitie.DateAttMP      = GBConvert.To_DateTime(this.date_mise_a_jour_mot_de_passe);
     entitie.DATECOMPTA     = GBConvert.To_DateTime(this.date_compta);
     entitie.DateCreation   = GBConvert.To_DateTime(this.date_creation);
     entitie.DateSuspension = GBConvert.To_DateTime(this.date_suspension);
     entitie.Datetransfert  = GBConvert.To_DateTime(this.date_transfert);
     entitie.DureeMP        = (short)this.duree_mot_de_passe;
     entitie.EmpAccess      = this.est_accessible_employe ? "Yes"
                                             : "No";
     entitie.Employe1     = this.employe;
     entitie.LibQualite   = this.qualite.libelle;
     entitie.Matricule    = this.code;
     entitie.MaximumLimit = this.limit_maximum;
     entitie.MotPasse     = this.mot_de_passe;
     entitie.NomEmploye   = this.nom_employe;
     entitie.NomPrenom    = this.nom_utilisateur;
     entitie.OpenBranch   = this.ouverture_branch ? "Yes"
                                        : "No";
     entitie.Qualite       = this.id_qualite;
     entitie.SecurityLevel = (short)this.niveau_securite;
     entitie.ServerDate    = GBConvert.To_DateTime(this.date_serveur);
     entitie.sessiontype   = this.type_session;
     entitie.Status        = this.est_connecte ? "On"
                                : "Off";
 }
예제 #2
0
        // -- recharger les données dans le auto complete -- //
        public override object Recharger_EasyAutocomplete(string id_page, string id_vue)
        {
            List <object> donnee = new List <object>();

            try
            {
                #region SecuriteUtilisateur-Utilisateur
                if (id_page == GB_Enum_Menu.SecuriteUtilisateur_Utilisateur)
                {
                    // -- Si la vue n'est pas retourné -- //
                    #region autorites_signature
                    if (id_vue == "autorite_signature")
                    {
                        // -- Mise à jour de la liste en session -- //
                        this.con.donnee.autorites_signature = autoriteSignatureDAO.Lister();
                    }
                    #endregion
                }
                #endregion
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(GBConvert.To_JSONString(donnee));
        }
예제 #3
0
파일: GBController.cs 프로젝트: dotofiev/GB
        // -- Gestion des erreur 500 survenu dans l'application -- //
        protected override void OnException(ExceptionContext context)
        {
            // -- Activation de l'etat d'exception -- //
            context.ExceptionHandled = true;

            // -- Réccupération du controller et action de l'erreur -- //
            string controller = context.RouteData.Values["controller"].ToString();
            string action     = context.RouteData.Values["action"].ToString();

            // -- Log -- //
            GBClass.Log.Error(context.Exception);

            // -- Redirection vers la page d'erreur approprié -- //
            context.Result = RedirectToAction(
                // -- Action -- //
                "Page",
                // -- Controlleur -- //
                "Erreur",
                // -- Paramètres -- //
                new
            {
                dt = GB.Models.Cryptage.Program.EncryptStringAES(
                    GBConvert.To_JavaScript(
                        new
                {
                    code        = 500,
                    message     = context.Exception.Message,
                    id_lang     = this.id_lang,
                    reconnecter = GBClass.Reconnecter_erreur_action(controller, action)
                }
                        )
                    )
            }
                );
        }
예제 #4
0
파일: GBController.cs 프로젝트: dotofiev/GB
        public ActionResult Charger_ConnectionId_Client(string connectionId)
        {
            try
            {
                // -- Mise à jour du connectionId dans l'objt session -- //
                this.con.Charger_ConnectionId_Hub(connectionId);

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #5
0
        public ActionResult Role_Modifier_Autorisation(string ids, string id_action, string etat)
        {
            try
            {
                // -- Mise à jour des autorisation en session -- //
                GBConvert.JSON_To <List <string> >(ids).ForEach(id_menu =>
                {
                    if (id_action == "1")
                    {
                        (this.con.donnee.autorisation as List <Autorisation>).FirstOrDefault(l => l.id_menu == id_menu).ajouter = (etat == "1");
                    }
                    else if (id_action == "2")
                    {
                        (this.con.donnee.autorisation as List <Autorisation>).FirstOrDefault(l => l.id_menu == id_menu).modifier = (etat == "1");
                    }
                    else if (id_action == "3")
                    {
                        (this.con.donnee.autorisation as List <Autorisation>).FirstOrDefault(l => l.id_menu == id_menu).supprimer = (etat == "1");
                    }
                    else if (id_action == "4")
                    {
                        (this.con.donnee.autorisation as List <Autorisation>).FirstOrDefault(l => l.id_menu == id_menu).imprimer = (etat == "1");
                    }
                    else
                    {
                        (this.con.donnee.autorisation as List <Autorisation>).FirstOrDefault(l => l.id_menu == id_menu).lister = (etat == "1");
                    }
                });

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #6
0
        public void Ajouter(ExerciceFiscal obj, string id_utilisateur = null)
        {
            try
            {
                // -- Unicité du code -- //
                if (Program.db.exercices_fiscal.Exists(l => l.code == obj.code))
                {
                    throw new GBException(App_Lang.Lang.Existing_data + " [code]");
                }

                // -- Définition de l'identifiant -- //
                obj.Crer_Id();

                // -- Mise à jour du statut -- //
                obj.statut = "O";

                // -- Mise à jour des date -- //
                obj.date_debut = GBConvert.To_DateTime(obj.date_debut).Ticks.ToString();
                obj.date_fin   = GBConvert.To_DateTime(obj.date_fin).Ticks.ToString();

                // -- Vérification de la date -- //
                if (Convert.ToInt64(obj.date_debut) >= Convert.ToInt64(obj.date_fin))
                {
                    throw new GBException(App_Lang.Lang.Invalid_date + " [date_debut]");
                }

                // -- Enregistrement de la valeur -- //
                Program.db.exercices_fiscal.Add(obj);

                // -- Execution des Hubs -- //
                applicationMainHub.RechargerCombo(new ExerciceFiscalDAO());

                // -- Execution des Hubs -- //
                applicationMainHub.RechargerTable(this.id_page, this.connexion.hub_id_context);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Renvoyer l'exception -- //
                    throw new GBException(App_Lang.Lang.Error_message_notification);
                }
                else
                {
                    // -- Renvoyer l'exception -- //
                    throw new GBException(ex.Message);
                }
            }
            #endregion
        }
예제 #7
0
        public ActionResult Supprimer_Enregistrement(string ids, string id_page)
        {
            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                Verifier_Autorisation(GB_Enum_Action_Controller.Supprimer);

                // -- Selectionner en fonction du menu - //
                #region SecuriteUtilisateur-Utilisateur
                if (id_page == GB_Enum_Menu.SecuriteUtilisateur_Utilisateur)
                {
                    // -- Service de suppression -- //
                    utilisateurDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region Module introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #8
0
        // -- Charger les données dans le auto complete -- //
        public override object Charger_EasyAutocomplete(string id_page, string id_vue)
        {
            List <object> donnee = new List <object>();

            try
            {
                #region SecuriteUtilisateur-Utilisateur
                if (id_page == GB_Enum_Menu.SecuriteUtilisateur_Utilisateur)
                {
                    // -- Si la vue n'est pas retourné -- //
                    #region autorites_signature
                    if (string.IsNullOrEmpty(id_vue))
                    {
                        // -- Si la liste des autorites_signature en session est vide, la mettre à jour -- //
                        if ((this.con.donnee.autorites_signature as List <AutoriteSignature>).Count == 0)
                        {
                            this.con.donnee.autorites_signature = autoriteSignatureDAO.Lister();
                        }

                        // -- Charger la liste des résultats -- //
                        foreach (var val in (this.con.donnee.autorites_signature as List <AutoriteSignature>))
                        {
                            donnee.Add(
                                new
                            {
                                id      = val.id,
                                code    = val.code,
                                libelle = val.libelle,
                            }
                                );
                        }
                    }
                    #endregion
                }
                #endregion
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(GBConvert.To_JSONString(donnee));
        }
예제 #9
0
        // -- Recharger les données dans le auto complete -- //
        public override object Recharger_EasyAutocomplete(string id_page, string id_vue)
        {
            List <object> donnee = new List <object>();

            try
            {
                #region ConfigurationBudget-ParametreBudgetRevenu
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
                {
                    // -- Si la vue est pour le compte -- //
                    #region comptes
                    if (id_vue == "compte")
                    {
                        // -- Mise à jour de la liste en session -- //
                        this.con.donnee.comptes = CompteDAO.Lister_Cle();
                    }
                    #endregion
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetFrais
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
                {
                    // -- Si la vue est pour le compte -- //
                    #region comptes
                    if (id_vue == "compte")
                    {
                        // -- Mise à jour de la liste en session -- //
                        this.con.donnee.comptes = CompteDAO.Lister_Cle();
                    }
                    #endregion
                }
                #endregion
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(GBConvert.To_JSONString(donnee));
        }
예제 #10
0
        public ActionResult Arbre_Menu(string id_controller)
        {
            try
            {
                // -- Resultat -- //
                string donnee = $"<option value=\"\" title=\"{App_Lang.Lang.Select}...\">{App_Lang.Lang.Select}...</option>";

                if (!string.IsNullOrEmpty(id_controller))
                {
                    // -- réccupération du contenu JSON -- //
                    dynamic dynamic_obj = JsonConvert.DeserializeObject(System.IO.File.ReadAllText(url_data + "arbre_menu.json"));

                    // -- Parcours de la liste -- //
                    for (int i = 0; i < (dynamic_obj as Newtonsoft.Json.Linq.JArray).Count; i++)
                    {
                        // -- Vérifier si c'est le bon controlleur -- //
                        if (id_controller == Convert.ToString((dynamic_obj[i]["controller"]["id"] as Newtonsoft.Json.Linq.JValue).Value))
                        {
                            // -- Parcourir les vues -- //
                            foreach (var vue in (dynamic_obj[i]["views"] as Newtonsoft.Json.Linq.JArray))
                            {
                                // -- AJouter les vues -- //
                                donnee += $"<option value=\"{(vue as Newtonsoft.Json.Linq.JValue).Value}\" title=\"{(vue as Newtonsoft.Json.Linq.JValue).Value}\">{(vue as Newtonsoft.Json.Linq.JValue).Value}</option>";
                            }
                        }
                    }
                }

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(donnee);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Log -- //
                GBClass.Log.Error(ex);

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(true);
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #11
0
        public void ConnexionTest()
        {
            // -- Controlleur à tester -- //
            MvcApplication app = new MvcApplication();

            var controller = new HomeController();

            // -- Parametres de test -- //
            string compteTest = "99999", mot_de_passeTest = "admin";

            // -- Execution de la méthode à tester -- //
            GBNotification donnee = GBConvert.To_Object <GBNotification>(
                ((controller.Connexion(compteTest, mot_de_passeTest) as JsonResult).Data as Dictionary <string, object>)["notification"]
                );

            // -- Test du résultat -- //
            Assert.AreEqual(donnee.est_echec, false);
        }
예제 #12
0
        public ActionResult Connexion(string compte, string mot_de_passe)
        {
            try
            {
                // -- Réccupération du l'utilisateur authentifié -- //
                Utilisateur utilisateur = UtilisateurDAO.Authentification(compte, mot_de_passe);

                // -- Authentifier l'objet connexion -- //
                this.con.Authentification(utilisateur);

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(
                    new {
                    url = Url.Action("Main", "Application")
                }
                    );
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #13
0
        // -- Lorsqu'une erreur survient dans l'application -- //
        protected void Application_Error(object sender, EventArgs e)
        {
            try
            {
                // -- Réccupération des détails de l'exception -- //
                Exception ex = Server.GetLastError().GetBaseException();
                // -- Variable de tye HTTP -- //
                HttpException ex_http = null;

                try
                {
                    // -- Essai de conversion de l'exception en type HTTP -- //
                    ex_http = ex as HttpException;
                }
                catch { }

                // -- Log -- //
                GBClass.Log.Error(ex);

                // -- Variable paramètre à envoyer à la page -- //
                string dt = GB.Models.Cryptage.Program.EncryptStringAES(
                    GBConvert.To_JavaScript(new
                {
                    code = (ex_http != null) ? ex_http.GetHttpCode()
                                                             : 500,
                    message     = ex.Message,
                    id_lang     = id_lang_cookies.ToString(),
                    reconnecter = true
                })
                    );

                // -- Mise à jour du filtre de réponse -- //
                Response.Filter = new ResponseErreurFilter(Response.Filter, dt);
            }
            catch (Exception ex)
            {
                // -- Log -- //
                GBClass.Log.Error(ex);
            }
        }
예제 #14
0
        public ActionResult Deconnexion()
        {
            try
            {
                // -- Déconnexion de l'objet connexion -- //
                this.con.Deconnexion();

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(
                    new
                {
                    url = Url.Action("Authentication", "Home")
                }
                    );
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #15
0
        public override void Charger_Langue_Et_Donnees(string id_page)
        {
            // -- Identifiant de la page -- //
            this.ViewBag.Id_page = id_page;

            // -- Définition du menu actif -- //
            id_menu_actif = GBClass.id_par_defaut;

            #region Home-Authentication
            if (id_page == GB_Enum_Menu.Home_Authentication)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Login                = App_Lang.Lang.Login;
                this.ViewBag.Lang.Password             = App_Lang.Lang.Password;
                this.ViewBag.Lang.Application_language = App_Lang.Lang.Application_language;
                this.ViewBag.Lang.English              = App_Lang.Lang.English;
                this.ViewBag.Lang.French               = App_Lang.Lang.French;
                this.ViewBag.Lang.To_log_in            = App_Lang.Lang.To_log_in;
                this.ViewBag.Lang.Erasing              = App_Lang.Lang.Erasing;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls = new GBControllerUrlJS(this, id_page),
                    Lang = new
                    {
                        Error_server_message = App_Lang.Lang.Error_server_message
                    },
                    // -- Paramètres -- //
                    DUREE_VISIBILITE_MESSAGE_BOX = AppSettings.DUREE_VISIBILITE_MESSAGE_BOX,
                }
                    );
                #endregion
            }
            #endregion
        }
예제 #16
0
        public ActionResult Role_Enregistrer_Modification()
        {
            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                Verifier_Autorisation(GB_Enum_Action_Controller.Modifier);

                // -- Mise à jour des traitements -- //
                autorisationDAO.Modifier((this.con.donnee.autorisation as List <Autorisation>), this.con.donnee.id_role);

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #17
0
 public Employe ToEntities(Dictionary <string, object> parametres = null)
 {
     return(new Employe
     {
         Agence = this.id_agence,
         AllocateComputer = this.ordinateur_allouer,
         Auth = this.id_autorite_signature,
         BackDAte = this.ouverture_back_date ? "Yes"
                                             : "No",
         BackDAteWk = this.ouverture_back_date_travail ? "Yes"
                                                       : "No",
         ComputerName = this.nom_ordinateur,
         DateAttMP = GBConvert.To_DateTime(this.date_mise_a_jour_mot_de_passe),
         DATECOMPTA = GBConvert.To_DateTime(this.date_compta),
         DateCreation = GBConvert.To_DateTime(this.date_creation),
         DateSuspension = GBConvert.To_DateTime(this.date_suspension),
         Datetransfert = GBConvert.To_DateTime(this.date_transfert),
         DureeMP = (short)this.duree_mot_de_passe,
         EmpAccess = this.est_accessible_employe ? "Yes"
                                                 : "No",
         Employe1 = this.employe,
         LibQualite = this.qualite.libelle,
         Matricule = this.code,
         MaximumLimit = this.limit_maximum,
         MotPasse = this.mot_de_passe,
         NomEmploye = this.nom_employe,
         NomPrenom = this.nom_utilisateur,
         OpenBranch = this.ouverture_branch ? "Yes"
                                            : "No",
         Qualite = this.id_qualite,
         SecurityLevel = (short)this.niveau_securite,
         ServerDate = GBConvert.To_DateTime(this.date_serveur),
         sessiontype = this.type_session,
         Status = this.est_connecte ? "On"
                                    : "Off",
     });
 }
예제 #18
0
        public ActionResult Selection_Enregistrement(string code, string id_page)
        {
            try
            {
                // -- Selectionner en fonction du menu - //
                #region ConfigurationBudget-ExerciceFiscal
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ExerciceFiscal)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new ExerciceFiscalDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id         = obj.id,
                        code       = obj.code,
                        libelle    = obj.libelle,
                        date_debut = new DateTime(
                            Convert.ToInt64(obj.date_debut)
                            )
                                     .ToString(AppSettings.FORMAT_DATE),
                        date_fin = new DateTime(
                            Convert.ToInt64(obj.date_fin)
                            )
                                   .ToString(AppSettings.FORMAT_DATE),
                        budget_id = obj.budget_id,
                    }
                        );
                }
                #endregion

                #region ConfigurationBudget-DirectionBudget
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_DirectionBudget)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new DirectionBudgetDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id                 = obj.id,
                        code               = obj.code,
                        chef               = obj.chef,
                        libelle            = obj.libelle,
                        telephone          = obj.telephone,
                        id_exercice_fiscal = obj.id_exercice_fiscal,
                        remarque           = obj.remarque,
                    }
                        );
                }
                #endregion

                #region ConfigurationBudget-AutoriteSignature
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_AutoriteSignature)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new AutoriteSignatureDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id                       = obj.id,
                        code                     = obj.code,
                        libelle                  = obj.libelle,
                        credit_max_client        = obj.credit_max_client,
                        debit_max_client         = obj.debit_max_client,
                        limite_decouvert_client  = obj.limite_decouvert_client,
                        montant_limite_pret      = obj.montant_limite_pret,
                        montant_max_ligne_credit = obj.montant_max_ligne_credit,
                        montant_signature        = obj.montant_signature,
                    }
                        );
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetRevenu
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new ParametreBudgetRevenuDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id      = obj.id,
                        code    = obj.code,
                        libelle = obj.libelle,
                        autoriser_control_budget = obj.autoriser_control_budget.ToString(),
                        id_compte      = obj.id_compte,
                        code_compte    = obj.compte?.code ?? null,
                        libelle_compte = obj.compte?.libelle ?? null,
                    }
                        );
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetFrais
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new ParametreBudgetFraisDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id      = obj.id,
                        code    = obj.code,
                        libelle = obj.libelle,
                        autoriser_control_budget = obj.autoriser_control_budget.ToString(),
                        id_compte      = obj.id_compte,
                        code_compte    = obj.compte?.code ?? null,
                        libelle_compte = obj.compte?.libelle ?? null,
                    }
                        );
                }
                #endregion

                #region ExerciceFiscal introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #19
0
        public ActionResult Role_Ajouter_Supprimer_Menu(string data, Boolean ajouter)
        {
            try
            {
                // -- Traitement en fonction de l'action -- //
                #region ajouter
                if (ajouter)
                {
                    // -- Convertion de la selection -- //
                    List <Autorisation> selection = GBConvert.JSON_To <List <Autorisation> >(data);

                    // -- Suppression des autorisation non configuré -- //
                    selection.RemoveAll(l => !l.ajouter && !l.modifier && !l.supprimer && !l.imprimer && !l.lister);

                    // -- Vérifier si la liste contient encore des données -- //
                    if (selection.Count == 0)
                    {
                        throw new GBException("Aucun menu configuré!");
                    }

                    // -- Suppression des autorisations disponible -- //
                    (this.con.donnee.autorisation_disponible as List <Autorisation>).RemoveAll(l => selection.Count(ll => ll.id_menu == l.id_menu) != 0);

                    // -- Mise à jour des references de la selection -- //
                    selection.ForEach(l =>
                    {
                        l.id_role = Convert.ToInt64(this.con.donnee.id_role);
                        l.role    = new RoleDAO().ObjectId(this.con.donnee.id_role);
                        l.menu    = new MenuDAO().ObjectId(l.id_menu);
                    });

                    // -- AJout dans les autorisation temporaire -- //
                    (this.con.donnee.autorisation as List <Autorisation>).AddRange(selection);
                }
                #endregion

                #region supprimer
                else
                {
                    // -- Convertion de la selection -- //
                    List <string> ids = GBConvert.JSON_To <List <string> >(data);

                    // -- Suppression dans les autorisation temporaire -- //
                    (this.con.donnee.autorisation as List <Autorisation>).RemoveAll(l => ids.Count(ll => ll == l.id_menu) != 0);

                    // -- Ajout à la liste des autorisations disponible -- //
                    ids.ForEach(id_menu =>
                    {
                        (this.con.donnee.autorisation_disponible as List <Autorisation>).Add(
                            new Autorisation
                        {
                            id        = GBClass.id_par_defaut,
                            id_menu   = id_menu,
                            id_role   = Convert.ToInt64(this.con.donnee.id_role),
                            ajouter   = false,
                            modifier  = false,
                            supprimer = false,
                            imprimer  = false,
                            lister    = false,
                            role      = new RoleDAO().ObjectId(this.con.donnee.id_role),
                            menu      = new MenuDAO().ObjectId(id_menu)
                        }
                            );
                    });
                }
                #endregion

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #20
0
        public override ActionResult Charger_Table(string id_page, string id_vue)
        {
            // -- Variable temporaire de refu d'autorisation -- //
            Boolean autorisation_refuse = false;

            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                AutorisationDAO.Verification_Autorisation(id_menu_actif, this.con.utilisateur.id_role, GB_Enum_Action_Controller.Lister, ref autorisation_refuse);

                List <object> donnee = new List <object>();

                // -- Selectionner en fonction du menu - //
                #region SecuriteUtilisateur-Utilisateur
                if (id_page == GB_Enum_Menu.SecuriteUtilisateur_Utilisateur)
                {
                    // -- Si la vue n'est pas soumise -- //
                    if (string.IsNullOrEmpty(id_vue))
                    {
                        foreach (var val in utilisateurDAO.Lister())
                        {
                            donnee.Add(
                                new
                            {
                                col_1  = GBClass.HTML_Checkbox_Table(val.id_utilisateur, "utilisateur"),
                                col_4  = val.agence?.code ?? string.Empty,
                                col_2  = val.compte,
                                col_3  = val.nom_utilisateur,
                                col_5  = val.profession?.libelle ?? string.Empty,
                                col_6  = GBToString.Oui_Non(val.ouverture_back_date),
                                col_7  = GBToString.Oui_Non(val.ouverture_branch),
                                col_8  = GBToString.Oui_Non(val.ouverture_back_date_travail),
                                col_9  = GBToString.Oui_Non(val.est_suspendu),
                                col_10 = GBToString.Oui_Non(val.acces_historique_compte),
                                col_11 = $"{val.duree_mot_de_passe} {App_Lang.Lang.Month}(s)",
                                col_12 = val.autorite_signature?.code ?? string.Empty,
                                col_13 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id_utilisateur, val.compte)
                            }
                                );
                        }
                    }
                    else if (id_vue == "autoriteSignature")
                    {
                        foreach (var val in autoriteSignatureDAO.Lister())
                        {
                            donnee.Add(
                                new
                            {
                                col_0 = val.id,
                                //col_1 = GBClass.HTML_Checkbox_Table(val.id, "autoriteSignature\" value=\"autoriteSignature_{val.id}\">",
                                col_2 = val.code,
                                col_3 = val.libelle,
                                col_4 = GBToString.MontantToString(val.montant_signature),
                                col_5 = GBToString.MontantToString(val.limite_decouvert_client),
                                col_6 = GBToString.MontantToString(val.debit_max_client),
                                col_7 = GBToString.MontantToString(val.credit_max_client),
                                col_8 = GBToString.MontantToString(val.montant_max_ligne_credit),
                                col_9 = GBToString.MontantToString(val.montant_limite_pret),
                                //col_10 = GBClass.HTML_Bouton_Selection_Table(val.id)
                            }
                                );
                        }
                    }
                }
                #endregion

                #region Module introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(donnee);
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            finally
            {
                // -- Mise à jour les données à renvoyer -- //
                if (this.ViewBag.notification.est_echec)
                {
                    this.ViewBag.notification.donnee = new List <object>();

                    // -- Envoi du paramètre si l'autorisation a été refusé -- //
                    this.ViewBag.notification.dynamique.autorisation_refuse = autorisation_refuse;
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #21
0
        public ActionResult Role_Rechercher_Autorisation(string id_role)
        {
            try
            {
                // -- Départ de l'id session -- //
                long id_autorisation = Convert.ToInt32(AutorisationDAO.Crer_Id()) + 1;
                // -- Définition de l'id_role rechercher -- //
                this.con.donnee.id_role = id_role;
                // -- Mise à jour des autorisation -- //
                this.con.donnee.autorisation = new List <Autorisation>();
                (this.con.donnee.autorisation as List <Autorisation>).AddRange(autorisationDAO.Lister(id_role));
                // -- Mise à jour des autorisation disponible -- //
                this.con.donnee.autorisation_disponible = new List <Autorisation>();
                (this.con.donnee.autorisation_disponible as List <Autorisation>).AddRange(
                    menuDAO.Lister()
                    .Where(l =>
                           (this.con.donnee.autorisation as List <Autorisation>).Count(ll => ll.id == l.id) == 0
                           )
                    .Select(l =>
                            new Autorisation()
                {
                    id        = (id_autorisation++).ToString(),
                    code      = (id_autorisation - 1).ToString(),
                    ajouter   = false,
                    modifier  = false,
                    supprimer = false,
                    imprimer  = false,
                    lister    = false,
                    id_menu   = l.id,
                    id_role   = id_role,
                    menu      = l,
                    role      = new RoleDAO().ObjectId(id_role)
                }
                            )
                    );

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #22
0
        public ActionResult Selection_Enregistrement(string code, string id_page)
        {
            try
            {
                // -- Selectionner en fonction du menu - //
                #region Securite-Module
                if (id_page == GB_Enum_Menu.Securite_Module)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new ModuleDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id         = obj.id,
                        code       = obj.code,
                        libelle_en = obj.libelle_en,
                        libelle_fr = obj.libelle_fr,
                    }
                        );
                }
                #endregion

                #region Securite-Role
                else if (id_page == GB_Enum_Menu.Securite_Role)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new RoleDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id         = obj.id,
                        code       = obj.code,
                        libelle_en = obj.libelle_en,
                        libelle_fr = obj.libelle_fr,
                    }
                        );
                }
                #endregion

                #region Securite-Menu
                else if (id_page == GB_Enum_Menu.Securite_Menu)
                {
                    // -- Mise à jour de l'role dans la session -- //
                    var obj = new MenuDAO().ObjectCode(code);

                    // -- Vérifier si l'objet est trouvé -- //
                    if (obj == null)
                    {
                        throw new GBException(App_Lang.Lang.Object_not_found);
                    }

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(
                        new
                    {
                        id            = obj.id,
                        code          = obj.code,
                        libelle_en    = obj.libelle_en,
                        libelle_fr    = obj.libelle_fr,
                        id_controller = obj.id_controller,
                        view          = obj.view,
                    }
                        );
                }
                #endregion

                #region Module introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #23
0
        public override void Charger_Langue_Et_Donnees(string id_page)
        {
            // -- Identifiant de la page -- //
            this.ViewBag.Id_page = id_page;

            // -- Définition du menu actif -- //
            id_menu_actif = MenuDAO.Object(id_page.Split('-')[0], id_page.Split('-')[1]).id;

            #region SecuriteUtilisateur-Utilisateur
            if (id_page == GB_Enum_Menu.SecuriteUtilisateur_Utilisateur)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.User_Management;
                this.ViewBag.Lang.Login            = App_Lang.Lang.Login;
                this.ViewBag.Lang.Agency           = App_Lang.Lang.Agency;
                this.ViewBag.Lang.Job                        = App_Lang.Lang.Job;
                this.ViewBag.Lang.Open_back_date             = App_Lang.Lang.Open_back_date;
                this.ViewBag.Lang.Open_back_working_date     = App_Lang.Lang.Open_back_working_date;
                this.ViewBag.Lang.Open_branch                = App_Lang.Lang.Open_branch;
                this.ViewBag.Lang.Connection_status          = App_Lang.Lang.Connection_status;
                this.ViewBag.Lang.Suspended                  = App_Lang.Lang.Suspended;
                this.ViewBag.Lang.Password_expiration        = App_Lang.Lang.Password_expiration;
                this.ViewBag.Lang.Employee_historical_access = App_Lang.Lang.Employee_historical_access;
                this.ViewBag.Lang.Password                   = App_Lang.Lang.Password;
                this.ViewBag.Lang.Value                      = App_Lang.Lang.Value;
                this.ViewBag.Lang.Confirm                    = App_Lang.Lang.Confirm;
                this.ViewBag.Lang.Activate_edit              = App_Lang.Lang.Activate_edit;
                this.ViewBag.Lang.Expiration_duration        = App_Lang.Lang.Expiration_duration;
                this.ViewBag.Lang.Signing_authority          = App_Lang.Lang.Signing_authority;
                this.ViewBag.Lang.Signing_amount             = App_Lang.Lang.Signing_amount;
                this.ViewBag.Lang.Customer_overdraft_limit   = App_Lang.Lang.Customer_overdraft_limit;
                this.ViewBag.Lang.Customer_max_debit         = App_Lang.Lang.Customer_max_debit;
                this.ViewBag.Lang.Customer_max_credit        = App_Lang.Lang.Customer_max_credit;
                this.ViewBag.Lang.Line_of_credit_max_amount  = App_Lang.Lang.Line_of_credit_max_amount;
                this.ViewBag.Lang.Loan_limit_amount          = App_Lang.Lang.Loan_limit_amount;
                this.ViewBag.Lang.Select                     = App_Lang.Lang.Select;
                this.ViewBag.Lang.Search_by                  = App_Lang.Lang.Search_by;
                this.ViewBag.Lang.User                       = App_Lang.Lang.User;
                #endregion

                // -- Données -- //
                #region Données
                #region HTML_Select_agence
                dynamic donnee = agenceDAO.HTML_Select();
                this.ViewBag.donnee.HTML_Select_code_agence    = donnee.html_code;
                this.ViewBag.donnee.HTML_Select_libelle_agence = donnee.html_libelle;
                #endregion
                #region HTML_Select_profession
                donnee = professionDAO.HTML_Select();
                this.ViewBag.donnee.HTML_Select_code_profession    = donnee.html_code;
                this.ViewBag.donnee.HTML_Select_libelle_profession = donnee.html_libelle;
                #endregion
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.User_Management
                    }
                }
                    );
                // -- Vider les données temporaire -- //
                this.con.Vider_Donnee();
                // - Mise à jour des données de vue -- //
                // -- autorites_signature -- //
                this.con.donnee.autorites_signature = new List <AutoriteSignature>();
                #endregion
            }
            #endregion
        }
예제 #24
0
        public override ActionResult Charger_Table(string id_page, string id_vue)
        {
            // -- Variable temporaire de refu d'autorisation -- //
            Boolean autorisation_refuse = false;

            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                AutorisationDAO.Verification_Autorisation(id_menu_actif, this.con.utilisateur.id_role, GB_Enum_Action_Controller.Lister, ref autorisation_refuse);

                List <object> donnee = new List <object>();

                // -- Selectionner en fonction du menu - //
                #region ConfigurationBudget-ExerciceFiscal
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ExerciceFiscal)
                {
                    foreach (var val in exerciceFiscalDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "exerciceFiscal"),
                            col_2 = val.code,
                            col_3 = val.libelle,
                            col_4 = new DateTime(Convert.ToInt64(val.date_debut)).ToString(AppSettings.FORMAT_DATE),
                            col_5 = new DateTime(Convert.ToInt64(val.date_fin)).ToString(AppSettings.FORMAT_DATE),
                            col_6 = val.statut,
                            col_7 = val.budget_id,
                            col_8 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region ConfigurationBudget-DirectionBudget
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_DirectionBudget)
                {
                    foreach (var val in directionBudgetDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "directionBudget"),
                            col_2 = val.code,
                            col_3 = val.libelle,
                            col_4 = val.chef,
                            col_5 = val.telephone,
                            col_6 = val.remarque,
                            col_7 = val.exercice_fiscal?.code ?? App_Lang.Lang.Empty,
                            col_8 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region ConfigurationBudget-AutoriteSignature
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_AutoriteSignature)
                {
                    foreach (var val in autoriteSignatureDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1  = GBClass.HTML_Checkbox_Table(val.id, "autoriteSignature"),
                            col_2  = val.code,
                            col_3  = val.libelle,
                            col_4  = GBToString.MontantToString(val.montant_signature),
                            col_5  = GBToString.MontantToString(val.limite_decouvert_client),
                            col_6  = GBToString.MontantToString(val.debit_max_client),
                            col_7  = GBToString.MontantToString(val.credit_max_client),
                            col_8  = GBToString.MontantToString(val.montant_max_ligne_credit),
                            col_9  = GBToString.MontantToString(val.montant_limite_pret),
                            col_10 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetRevenu
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
                {
                    foreach (var val in parametreBudgetRevenuDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "parametreBudgetRevenu"),
                            col_2 = val.code,
                            col_3 = val.libelle,
                            col_4 = val.compte?.code ?? App_Lang.Lang.Empty,
                            col_5 = GBToString.Oui_Non(val.autoriser_control_budget),
                            col_6 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetFrais
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
                {
                    foreach (var val in parametreBudgetFraisDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "parametreBudgetFrais"),
                            col_2 = val.code,
                            col_3 = val.libelle,
                            col_4 = val.compte?.code ?? App_Lang.Lang.Empty,
                            col_5 = GBToString.Oui_Non(val.autoriser_control_budget),
                            col_6 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region ExerciceFiscal introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(donnee);
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            finally
            {
                // -- Mise à jour les données à renvoyer -- //
                if (this.ViewBag.notification.est_echec)
                {
                    this.ViewBag.notification.donnee = new List <object>();

                    // -- Envoi du paramètre si l'autorisation a été refusé -- //
                    this.ViewBag.notification.dynamique.autorisation_refuse = autorisation_refuse;
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #25
0
        // -- Charger les données dans le auto complete -- //
        public override object Charger_EasyAutocomplete(string id_page, string id_vue)
        {
            List <object> donnee = new List <object>();

            try
            {
                #region ConfigurationBudget-ParametreBudgetRevenu
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
                {
                    // -- Si la vue n'est pas retourné -- //
                    #region comptes
                    if (string.IsNullOrEmpty(id_vue))
                    {
                        // -- Si la liste des comptes en session est vide, la mettre à jour -- //
                        if ((this.con.donnee.comptes as List <Compte>).Count == 0)
                        {
                            this.con.donnee.comptes = CompteDAO.Lister_Cle();
                        }

                        // -- Charger la liste des résultats -- //
                        foreach (var val in (this.con.donnee.comptes as List <Compte>))
                        {
                            donnee.Add(
                                new
                            {
                                id      = val.id,
                                code    = val.code,
                                libelle = val.libelle
                            }
                                );
                        }
                    }
                    #endregion
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetFrais
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
                {
                    // -- Si la vue n'est pas retourné -- //
                    #region comptes
                    if (string.IsNullOrEmpty(id_vue))
                    {
                        // -- Si la liste des comptes en session est vide, la mettre à jour -- //
                        if ((this.con.donnee.comptes as List <Compte>).Count == 0)
                        {
                            this.con.donnee.comptes = CompteDAO.Lister_Cle();
                        }

                        // -- Charger la liste des résultats -- //
                        foreach (var val in (this.con.donnee.comptes as List <Compte>))
                        {
                            donnee.Add(
                                new
                            {
                                id      = val.id,
                                code    = val.code,
                                libelle = val.libelle
                            }
                                );
                        }
                    }
                    #endregion
                }
                #endregion
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(GBConvert.To_JSONString(donnee));
        }
예제 #26
0
        public ActionResult Modifier_Enregistrement(string obj, string id_page)
        {
            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                Verifier_Autorisation(GB_Enum_Action_Controller.Modifier);

                // -- Selectionner en fonction du menu - //
                #region Securite-Module
                if (id_page == GB_Enum_Menu.Securite_Module)
                {
                    // -- Service de modification -- //
                    moduleDAO.Modifier(GBConvert.JSON_To <Module>(obj));
                }
                #endregion

                #region Securite-Role
                else if (id_page == GB_Enum_Menu.Securite_Role)
                {
                    // -- Service de modification -- //
                    roleDAO.Modifier(GBConvert.JSON_To <Role>(obj));
                }
                #endregion

                #region Securite-Menu
                else if (id_page == GB_Enum_Menu.Securite_Menu)
                {
                    // -- Service de modification -- //
                    menuDAO.Modifier(GBConvert.JSON_To <Menu>(obj));
                }
                #endregion

                #region Module introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #27
0
        public override ActionResult Charger_Table(string id_page, string id_vue)
        {
            // -- Variable temporaire de refu d'autorisation -- //
            Boolean autorisation_refuse = false;

            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                AutorisationDAO.Verification_Autorisation(id_menu_actif, this.con.utilisateur.id_role, GB_Enum_Action_Controller.Lister, ref autorisation_refuse);

                List <object> donnee = new List <object>();

                // -- Selectionner en fonction du menu - //
                #region Securite-Module
                if (id_page == GB_Enum_Menu.Securite_Module)
                {
                    foreach (var val in moduleDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "module"),
                            col_2 = val.code,
                            col_3 = val.libelle_fr,
                            col_4 = val.libelle_en,
                            col_5 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region Securite-Role
                else if (id_page == GB_Enum_Menu.Securite_Role)
                {
                    // -- Si la vue n'est pas soumise -- //
                    if (string.IsNullOrEmpty(id_vue))
                    {
                        foreach (var val in roleDAO.Lister())
                        {
                            donnee.Add(
                                new
                            {
                                col_1 = GBClass.HTML_Checkbox_Table(val.id, "role"),
                                col_2 = val.code,
                                col_3 = val.libelle_fr,
                                col_4 = val.libelle_en,
                                col_5 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                            }
                                );
                        }
                    }
                    // -- Si c'est la vue configuration -- //
                    else if (id_vue == "autorisation")
                    {
                        foreach (var val in (this.con.donnee.autorisation as List <Autorisation>).Where(l => l.id_role == Convert.ToInt64(this.con.donnee.id_role)))
                        {
                            donnee.Add(
                                new
                            {
                                col_1 = GBClass.HTML_Checkbox_Table(val.id, "autorisation"),
                                col_2 = val.menu.code,
                                col_3 = (this.id_lang == 0) ? val.menu.libelle_en
                                                                : val.menu.libelle_fr,
                                col_4 = (val.ajouter) ? @"<i class=""fa fa-check fa-2x""></i>"
                                                          : @"<i class=""fa fa-remove fa-2x""></i>",
                                col_5 = (val.modifier) ? @"<i class=""fa fa-check fa-2x""></i>"
                                                           : @"<i class=""fa fa-remove fa-2x""></i>",
                                col_6 = (val.supprimer) ? @"<i class=""fa fa-check fa-2x""></i>"
                                                            : @"<i class=""fa fa-remove fa-2x""></i>",
                                col_7 = (val.imprimer) ? @"<i class=""fa fa-check fa-2x""></i>"
                                                           : @"<i class=""fa fa-remove fa-2x""></i>",
                                col_8 = (val.lister) ? @"<i class=""fa fa-check fa-2x""></i>"
                                                         : @"<i class=""fa fa-remove fa-2x""></i>"
                            }
                                );
                        }
                    }
                    // -- Si c'est la vue configuration -- //
                    else if (id_vue == "menu")
                    {
                        foreach (var val in (this.con.donnee.autorisation_disponible as List <Autorisation>))
                        {
                            donnee.Add(
                                new
                            {
                                col_1 = $"<input type=\"checkbox\" class=\"flat\" id_menu=\"{val.id_menu}\" name=\"menu\" value=\"menu_{val.id_menu}\" etat=\"false\" >",
                                col_2 = (this.id_lang == 0) ? val.menu.libelle_en
                                                                : val.menu.libelle_fr,
                                col_3 = (this.id_lang == 0) ? val.menu.groupe_menu.libelle_en
                                                                : val.menu.groupe_menu.libelle_fr,
                                col_4 = (this.id_lang == 0) ? val.menu.groupe_menu.module.libelle_en
                                                                : val.menu.groupe_menu.module.libelle_fr,
                                col_5 = $"<input type=\"checkbox\" class=\"flat-blue\" id_menu=\"{val.id_menu}\" name=\"ajouter\" etat=\"false\" />",
                                col_6 = $"<input type=\"checkbox\" class=\"flat-blue\" id_menu=\"{val.id_menu}\" name=\"modifier\" etat=\"false\" />",
                                col_7 = $"<input type=\"checkbox\" class=\"flat-blue\" id_menu=\"{val.id_menu}\" name=\"supprimer\" etat=\"false\" />",
                                col_8 = $"<input type=\"checkbox\" class=\"flat-blue\" id_menu=\"{val.id_menu}\" name=\"imprimer\" etat=\"false\" />",
                                col_9 = $"<input type=\"checkbox\" class=\"flat-blue\" id_menu=\"{val.id_menu}\" name=\"lister\" etat=\"false\" />",
                            }
                                );
                        }
                    }
                }
                #endregion

                #region Securite-Menu
                else if (id_page == GB_Enum_Menu.Securite_Menu)
                {
                    foreach (var val in menuDAO.Lister())
                    {
                        donnee.Add(
                            new
                        {
                            col_1 = GBClass.HTML_Checkbox_Table(val.id, "menu"),
                            col_2 = val.code,
                            col_3 = val.libelle_fr,
                            col_4 = val.libelle_en,
                            col_5 = (id_lang == 0) ? val.groupe_menu.libelle_en
                                                       : val.libelle_fr,
                            col_6 = val.view,
                            col_7 = GBClass.HTML_Bouton_Modifier_Suppression_Table(val.id, val.code)
                        }
                            );
                    }
                }
                #endregion

                #region Module introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notification -- //
                this.ViewBag.notification = new GBNotification(donnee);
            }
            #region catch & finally
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            finally
            {
                // -- Mise à jour les données à renvoyer -- //
                if (this.ViewBag.notification.est_echec)
                {
                    this.ViewBag.notification.donnee = new List <object>();

                    // -- Envoi du paramètre si l'autorisation a été refusé -- //
                    this.ViewBag.notification.dynamique.autorisation_refuse = autorisation_refuse;
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #28
0
        public ActionResult Supprimer_Enregistrement(string ids, string id_page)
        {
            try
            {
                // -- Vérifier l'autorisation de l'action -- //
                Verifier_Autorisation(GB_Enum_Action_Controller.Supprimer);

                // -- Selectionner en fonction du menu - //
                #region ConfigurationBudget-ExerciceFiscal
                if (id_page == GB_Enum_Menu.ConfigurationBudget_ExerciceFiscal)
                {
                    // -- Service de suppression -- //
                    exerciceFiscalDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region ConfigurationBudget-DirectionBudget
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_DirectionBudget)
                {
                    // -- Service de suppression -- //
                    directionBudgetDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region ConfigurationBudget-AutoriteSignature
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_AutoriteSignature)
                {
                    // -- Service de suppression -- //
                    autoriteSignatureDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetRevenu
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
                {
                    // -- Service de suppression -- //
                    parametreBudgetRevenuDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region ConfigurationBudget-ParametreBudgetFrais
                else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
                {
                    // -- Service de suppression -- //
                    parametreBudgetFraisDAO.Supprimer(GBConvert.JSON_To <List <string> >(ids));
                }
                #endregion

                #region ExerciceFiscal introuvable
                else
                {
                    throw new Exception("Le id_page n'a pas été retourné!");
                }
                #endregion

                // -- Notificication -- //
                this.ViewBag.notification = new GBNotification(false);
            }
            #region Catch
            catch (Exception ex)
            {
                // -- Vérifier la nature de l'exception -- //
                if (!GBException.Est_GBexception(ex))
                {
                    // -- Log -- //
                    GBClass.Log.Error(ex);

                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(true);
                }
                else
                {
                    // -- Notificication -- //
                    this.ViewBag.notification = new GBNotification(ex.Message, true);
                }
            }
            #endregion

            // -- Retoure le résultat en objet JSON -- //
            return(Json(
                       GBConvert.To_Object(this.ViewBag)
                       ));
        }
예제 #29
0
        public override void Charger_Langue_Et_Donnees(string id_page)
        {
            // -- Identifiant de la page -- //
            this.ViewBag.Id_page = id_page;

            // -- Définition du menu actif -- //
            id_menu_actif = MenuDAO.Object(id_page.Split('-')[0], id_page.Split('-')[1]).id;

            #region Securite-Module
            if (id_page == GB_Enum_Menu.Securite_Module)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Module_Management;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Module_Management
                    }
                }
                    );
                #endregion
            }
            #endregion

            #region Securite-Role
            else if (id_page == GB_Enum_Menu.Securite_Role)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Role_and_privilege_management;
                this.ViewBag.Lang.Rules            = App_Lang.Lang.Rules;
                this.ViewBag.Lang.Enable           = App_Lang.Lang.Enable;
                this.ViewBag.Lang.Disable          = App_Lang.Lang.Disable;
                this.ViewBag.Lang.Add                  = App_Lang.Lang.Add;
                this.ViewBag.Lang.Modify               = App_Lang.Lang.Modify;
                this.ViewBag.Lang.Delete               = App_Lang.Lang.Delete;
                this.ViewBag.Lang.Print                = App_Lang.Lang.Print;
                this.ViewBag.Lang.Listing              = App_Lang.Lang.Listing;
                this.ViewBag.Lang.Save                 = App_Lang.Lang.Save;
                this.ViewBag.Lang.Rule_Management      = App_Lang.Lang.Rule_Management;
                this.ViewBag.Lang.Privilege_management = App_Lang.Lang.Privilege_management;
                this.ViewBag.Lang.Search_a_role        = App_Lang.Lang.Search_a_role;
                this.ViewBag.Lang.Search               = App_Lang.Lang.Search;
                this.ViewBag.Lang.Search_by            = App_Lang.Lang.Search_by;
                this.ViewBag.Lang.New_menus            = App_Lang.Lang.New_menus;
                this.ViewBag.Lang.Delete_menus         = App_Lang.Lang.Delete_menus;
                this.ViewBag.Lang.Select               = App_Lang.Lang.Select;
                this.ViewBag.Lang.Menu_group           = App_Lang.Lang.Menu_group;
                this.ViewBag.Lang.Add_                 = App_Lang.Lang.Add_;
                this.ViewBag.Lang.Mod_                 = App_Lang.Lang.Mod_;
                this.ViewBag.Lang.Del_                 = App_Lang.Lang.Del_;
                this.ViewBag.Lang.Prt_                 = App_Lang.Lang.Prt_;
                this.ViewBag.Lang.Lst_                 = App_Lang.Lang.Lst_;
                this.ViewBag.Lang.Display              = App_Lang.Lang.Display;

                #endregion

                // -- Données -- //
                #region Données
                #region HTML_Select_Role
                dynamic donnee = roleDAO.HTML_Select();
                this.ViewBag.donnee.HTML_Select_code_role    = donnee.html_code;
                this.ViewBag.donnee.HTML_Select_libelle_role = donnee.html_libelle;
                #endregion
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Role_and_privilege_management
                    }
                }
                    );
                // -- Vider les données temporaire -- //
                this.con.Vider_Donnee();
                // - Mise à jour des données de vue -- //
                // -- id_role -- //
                this.con.donnee.id_role = 0;
                // -- Autorisations -- //
                this.con.donnee.autorisation = new List <Autorisation>();
                // -- autorisation_disponible -- //
                this.con.donnee.autorisation_disponible = new List <Autorisation>();
                #endregion
            }
            #endregion

            #region Securite-Menu
            else if (id_page == GB_Enum_Menu.Securite_Menu)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Menu_Management;
                this.ViewBag.Lang.Menu_group       = App_Lang.Lang.Menu_group;
                this.ViewBag.Lang.Views            = App_Lang.Lang.Views;
                this.ViewBag.Lang.Select           = App_Lang.Lang.Select;
                #endregion

                // -- Données -- //
                #region Données
                #region HTML_Select_id_controller
                this.ViewBag.donnee.HTML_Select_id_controller = GroupeMenuDAO.HTML_Select("libelle");
                #endregion
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Menu_Management
                    }
                }
                    );
                #endregion
            }
            #endregion
        }
예제 #30
0
        public override void Charger_Langue_Et_Donnees(string id_page)
        {
            // -- Identifiant de la page -- //
            this.ViewBag.Id_page = id_page;

            // -- Définition du menu actif -- //
            id_menu_actif = MenuDAO.Object(id_page.Split('-')[0], id_page.Split('-')[1]).id;

            #region ConfigurationBudget-ExerciceFiscal
            if (id_page == GB_Enum_Menu.ConfigurationBudget_ExerciceFiscal)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Fiscals_exercice_management;
                this.ViewBag.Lang.Starting_date    = App_Lang.Lang.Starting_date;
                this.ViewBag.Lang.Ending_date      = App_Lang.Lang.Ending_date;
                this.ViewBag.Lang.Status           = App_Lang.Lang.Status;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.donnee.FORMAT_DATE = AppSettings.FORMAT_DATE;
                this.ViewBag.GB_DONNEE          = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Fiscals_exercice_management
                    },
                    format_date = AppSettings.FORMAT_DATE
                }
                    );
                #endregion
            }
            #endregion

            #region ConfigurationBudget-DirectionBudget
            else if (id_page == GB_Enum_Menu.ConfigurationBudget_DirectionBudget)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page  = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Budget_directionate_management;
                this.ViewBag.Lang.Directionate_head = App_Lang.Lang.Directionate_head;
                this.ViewBag.Lang.Phone             = App_Lang.Lang.Phone;
                this.ViewBag.Lang.Remark            = App_Lang.Lang.Remark;
                this.ViewBag.Lang.Fiscals_exercice  = App_Lang.Lang.Fiscals_exercice;
                #endregion

                // -- Données -- //
                #region Données
                #region HTML_Select_exercice_fiscal
                dynamic donnee = exerciceFiscalDAO.HTML_Select();
                this.ViewBag.donnee.HTML_Select_code_exercice_fiscal    = donnee.html_code;
                this.ViewBag.donnee.HTML_Select_libelle_exercice_fiscal = donnee.html_libelle;
                #endregion
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Budget_directionate_management
                    }
                }
                    );
                #endregion
            }
            #endregion

            #region ConfigurationBudget-AutoriteSignature
            else if (id_page == GB_Enum_Menu.ConfigurationBudget_AutoriteSignature)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page          = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Signing_authority_management;
                this.ViewBag.Lang.Signing_amount            = App_Lang.Lang.Signing_amount;
                this.ViewBag.Lang.Customer_overdraft_limit  = App_Lang.Lang.Customer_overdraft_limit;
                this.ViewBag.Lang.Customer_max_debit        = App_Lang.Lang.Customer_max_debit;
                this.ViewBag.Lang.Customer_max_credit       = App_Lang.Lang.Customer_max_credit;
                this.ViewBag.Lang.Line_of_credit_max_amount = App_Lang.Lang.Line_of_credit_max_amount;
                this.ViewBag.Lang.Loan_limit_amount         = App_Lang.Lang.Loan_limit_amount;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Signing_authority_management
                    }
                }
                    );
                #endregion
            }
            #endregion

            #region ConfigurationBudget-ParametreBudgetRevenu
            else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetRevenu)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Budget_profit_center_management;
                this.ViewBag.Lang.Account          = App_Lang.Lang.Account;
                this.ViewBag.Lang.Control_budget   = App_Lang.Lang.Control_budget;
                this.ViewBag.Lang.Cost_center      = App_Lang.Lang.Cost_center;
                this.ViewBag.Lang.Account          = App_Lang.Lang.Account;
                this.ViewBag.Lang.Search_by        = App_Lang.Lang.Search_by;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Budget_profit_center_management
                    }
                }
                    );
                // -- Vider les données temporaire -- //
                this.con.Vider_Donnee();
                // - Mise à jour des données de vue -- //
                // -- Compte -- //
                this.con.donnee.comptes = new List <Compte>();
                #endregion
            }
            #endregion

            #region ConfigurationBudget-ParametreBudgetFrais
            else if (id_page == GB_Enum_Menu.ConfigurationBudget_ParametreBudgetFrais)
            {
                // -- Langue -- //
                #region Langue
                this.ViewBag.Lang.Description_page = $"<i class=\"fa fa-cogs\"></i> " + App_Lang.Lang.Configuring_Budget_lines_for_cost_centers;
                this.ViewBag.Lang.Account          = App_Lang.Lang.Account;
                this.ViewBag.Lang.Control_budget   = App_Lang.Lang.Control_budget;
                this.ViewBag.Lang.Cost_center      = App_Lang.Lang.Cost_center;
                this.ViewBag.Lang.Account          = App_Lang.Lang.Account;
                this.ViewBag.Lang.Search_by        = App_Lang.Lang.Search_by;
                #endregion

                // -- Données -- //
                #region Données
                this.ViewBag.GB_DONNEE = GBConvert.To_JSONString(
                    new
                {
                    Urls        = new GBControllerUrlJS(this, id_page),
                    id_page     = id_page,
                    titre       = this.ViewBag.Title,
                    description = new
                    {
                        icon    = "fa fa-cogs",
                        message = App_Lang.Lang.Configuring_Budget_lines_for_cost_centers
                    }
                }
                    );
                // -- Vider les données temporaire -- //
                this.con.Vider_Donnee();
                // - Mise à jour des données de vue -- //
                // -- Compte -- //
                this.con.donnee.comptes = new List <Compte>();
                #endregion
            }
            #endregion
        }