Пример #1
0
        protected void ApplicationMenu_Load(object sender, EventArgs e)
        {
            try
            {
                if (user != null && ApplicationMenu.Items.Count == 0)
                {
                    DataTable dt  = new DataTable();
                    ArrayList cle = new ArrayList();
                    ArrayList val = new ArrayList();
                    cle.Add("@LOGIN"); val.Add(user.UserName);
                    cle.Add("@SENDER"); val.Add(2);
                    dt = Cl_Fonction.Extraction_ds("PS_E_LIENSOUSMENU", cle, val, ref dt);

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        MenuItem menuItem = new MenuItem();
                        menuItem.Name         = dt.Rows[i]["ID_MENU"].ToString();
                        menuItem.Text         = dt.Rows[i]["LIBELLE_MENU"].ToString();
                        menuItem.Image.IconID = dt.Rows[i]["ICONE"].ToString();
                        ApplicationMenu.Items.Add(menuItem);
                    }
                }
                if (user == null && ApplicationMenu.Items.Count != 0)
                {
                    HttpContext.Current.Response.RedirectLocation = System.Web.VirtualPathUtility.ToAbsolute("~/Account/SignIn.aspx");
                }
            }
            catch (Exception ex)
            {
                log.Info("Error : " + ex + "; Method : " + Cl_Fonction.GetCurrentMethod());
            }
        }
Пример #2
0
        protected void chargerGrid()
        {
            DataSet   ds  = new DataSet();
            ArrayList cle = new ArrayList();
            ArrayList val = new ArrayList();

            cle.Add("@SENDER"); val.Add(0);

            Cl_Fonction.Extraction_ds("PS_E_SOUSMENU", cle, val);
            MainGridView.DataSource = ds;
            MainGridView.DataBind();
        }
        private void LoadGridView()
        {
            DataSet   ds  = new DataSet();
            ArrayList cle = new ArrayList();
            ArrayList val = new ArrayList();

            cle.Add("@ApplicationName"); val.Add("/");

            ds = Cl_Fonction.Extraction_ds("aspnet_Roles_GetAllRoles", cle, val);
            MainGridView.DataSource = ds;
            MainGridView.DataBind();
        }
Пример #4
0
        protected void RegisterButton_Click(object sender, EventArgs e)
        {
            // DXCOMMENT: Your Registration logic
            //MembershipUser u = Membership.GetUser(User.Identity.Name);
            //MembershipUser u = Membership.CreateUser(login, "educative");

            try
            {
                if (Cl_Fonction.Verification_Code("aspnet_Users", "UserName", RegisterUserNameTextBox.Text))
                {
                    RegisterUserNameTextBox.ValidationSettings.ErrorDisplayMode = DevExpress.Web.ErrorDisplayMode.ImageWithText;
                    RegisterUserNameTextBox.ValidationSettings.ErrorText        = "Ce username est déjà utilisé";
                }
                else
                {
                    if (Cl_Fonction.IsValidEmail(EmailTextBox.Text.Trim()))
                    {
                        ArrayList cle = new ArrayList();
                        ArrayList val = new ArrayList();

                        //string activationCode = Guid.NewGuid().ToString();
                        cle.Add("@CODE_PERSONNE"); val.Add(MatriculeTextBox.Text.Trim());
                        cle.Add("@NOM_PERSONNE"); val.Add(LastNameTextBox.Text.Trim());
                        cle.Add("@PRENOMS_PERSONNE"); val.Add(FirstNameTextBox.Text.Trim());
                        cle.Add("@USERNAME"); val.Add(RegisterUserNameTextBox.Text.Trim());
                        cle.Add("@SITE_ID"); val.Add(1);
                        cle.Add("@CONFIRMA"); val.Add("");
                        //cle.Add("@ACTIVATIONCODE");val.Add(activationCode);
                        cle.Add("@EMAIL"); val.Add(EmailTextBox.Text.Trim());
                        cle.Add("@SENDER"); val.Add(2);

                        Cl_Fonction.Extraction_ds("PS_USERCONFIRM", cle, val);

                        MembershipUser u = Membership.CreateUser(RegisterUserNameTextBox.Text.Trim(), ConfirmPasswordButtonEdit.Text, EmailTextBox.Text.Trim());

                        //SendActivationEmail(activationCode, txtEmail.Text.Trim());

                        ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Enregistrement effectué avec succès! Veuillez consulter l'administrateur pour accéder à la solution');", true);

                        Response.Redirect("~/");
                    }
                    else
                    {
                        EmailTextBox.ValidationSettings.ErrorText = "Veuillez SVP saisir une adresse mail valide";
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
                //ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Echec de l'enregistrement !');", true);
            }
        }
Пример #5
0
        protected void cmbSite_Load(object sender, EventArgs e)
        {
            DataSet   ds  = new DataSet();
            ArrayList cle = new ArrayList();
            ArrayList val = new ArrayList();

            cle.Add("@INDEX");
            val.Add("4");

            ds = Cl_Fonction.Extraction_ds("PS_SITE", cle, val);
            cmbSite.DataSource = ds;
            cmbSite.DataBind();
        }
    protected void chargerGrid()
    {
        DataSet   ds  = new DataSet();
        ArrayList cle = new ArrayList();
        ArrayList val = new ArrayList();

        cle.Add("@Site_ID");
        val.Add(user.SiteID);


        ds = Cl_Fonction.Extraction_ds("LISTE_JOURNALCONNECT_SITE", cle, val);
        MainGridView.DataSource = ds;
        MainGridView.DataBind();
    }
Пример #7
0
    protected void chargerGrid()
    {
        ArrayList cle = new ArrayList();
        ArrayList val = new ArrayList();

        cle.Add("@INDEX");
        val.Add("3");
        cle.Add("@SITE_ID");
        val.Add(AuthHelper.GetLoggedInUserInfo().SiteID.ToString());

        var emplacements = Cl_Fonction.Extraction_ds("PS_PARAMCOMPTABLE", cle, val);

        GridView.DataSource = emplacements;
        GridView.DataBind();
    }
Пример #8
0
    protected void chargerGrid()
    {
        ArrayList cle = new ArrayList();
        ArrayList val = new ArrayList();

        cle.Add("@INDEX");
        val.Add("3");
        cle.Add("@ID");
        val.Add("");

        var emplacements = Cl_Fonction.Extraction_ds("PS_PARAMETRE_UPLOAD", cle, val);

        GridView.DataSource = emplacements;
        GridView.DataBind();
    }
Пример #9
0
    protected void chargerGrid()
    {

        DataSet ds = new DataSet();
        ArrayList cle = new ArrayList();
        ArrayList val = new ArrayList();

        cle.Add("@SENDER");
        val.Add(0);
        

        ds = Cl_Fonction.Extraction_ds("PS_AFFECTATION_TYPEDOC_PROFILE", cle, val);
        MainGridView.DataSource = ds;
        MainGridView.DataBind();
    }
Пример #10
0
        private static ApplicationUser CreateDefaultUser(string userName)
        {
            DataTable dt = new DataTable(); ArrayList cle = new ArrayList(); ArrayList val = new ArrayList();

            cle.Add("@userName"); val.Add(userName);
            cle.Add("@sender"); val.Add(0);
            Cl_Fonction.Extraction_ds("PS_USERCONFIRM", cle, val, ref dt);

            return(new ApplicationUser
            {
                UserName = userName,
                FirstName = dt.Rows[0]["PRENOMS_PERSONNE"].ToString(),
                LastName = dt.Rows[0]["NOM_PERSONNE"].ToString(),
                Email = dt.Rows[0]["EMAIL"].ToString(),
                AvatarUrl = dt.Rows[0]["AVATAR"].ToString(),
                Rolename = dt.Rows[0]["ROLENAME"].ToString(),
                SiteID = dt.Rows[0]["SITE_ID"].ToString(),
                Exercice = "2019",
            });
        }
Пример #11
0
        private void GestionConnexion(string roles, int sendmou, int site_id)
        {
            DataSet   data7 = new DataSet();
            ArrayList cle7  = new ArrayList();
            ArrayList val7  = new ArrayList();

            cle7.Add("@LOGIN");
            val7.Add(UserNameTextBox.Text);

            cle7.Add("@ROLE");
            val7.Add(roles);

            string adres = HttpContext.Current.Request.UserHostAddress;

            cle7.Add("@ADRESSEID");
            val7.Add(adres);

            string nomnavig = HttpContext.Current.Request.UserAgent;

            cle7.Add("@NAVIGATEUR");
            val7.Add(nomnavig);

            string nommachine = HttpContext.Current.Request.UserHostName;

            cle7.Add("@NOMMACHINE");
            val7.Add(nommachine);

            cle7.Add("@EXO");
            val7.Add("2019");

            cle7.Add("@SITE_ID");
            val7.Add(site_id);

            cle7.Add("@SENDER");
            val7.Add(sendmou);

            data7 = Cl_Fonction.Extraction_ds("MAJ_PROFILCONNECT", cle7, val7);
            Session["ConectUnique"] = data7.Tables[0].Rows[0].ItemArray[0].ToString();
            Session["ConectMou"]    = "1";
        }
Пример #12
0
        protected void LeftCallbackPanel_Callback(object sender, CallbackEventArgsBase e)
        {
            try
            {
                if (user != null)
                {
                    DataTable dt  = new DataTable();
                    ArrayList cle = new ArrayList();
                    ArrayList val = new ArrayList();
                    cle.Add("@LOGIN"); val.Add(user.UserName);
                    cle.Add("@ID_MENU"); val.Add(e.Parameter);
                    cle.Add("@SENDER"); val.Add(3);
                    dt = Cl_Fonction.Extraction_ds("PS_E_LIENSOUSMENU", cle, val, ref dt);

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        string Libelle      = dt.Rows[i]["LIBELLE_SOUSMENU"].ToString();
                        string id_sous_menu = dt.Rows[i]["ID_SOUSMENU"].ToString();

                        NavBarGroup nbg = new NavBarGroup();
                        nbg.Text = Libelle;
                        navbarMain.Groups.Add(nbg);

                        ////**************Lien************************//
                        DataTable dtlien  = new DataTable();
                        ArrayList clelien = new ArrayList();
                        ArrayList vallien = new ArrayList();
                        clelien.Add("@LOGIN"); vallien.Add(user.UserName);
                        clelien.Add("@ID_SOUSMENU"); vallien.Add(Convert.ToInt32(id_sous_menu));
                        clelien.Add("@SENDER"); vallien.Add(1);
                        dtlien = Cl_Fonction.Extraction_ds("PS_E_LIENSOUSMENU", clelien, vallien, ref dtlien);

                        for (int ilien = 0; ilien < dtlien.Rows.Count; ilien++)
                        {
                            string LibelleLien = dtlien.Rows[ilien]["LIBELLE_LIENSOUSMENU"].ToString();
                            string idLien      = dtlien.Rows[ilien]["ID_LIENSOUSMENU"].ToString();
                            string Chemin      = dtlien.Rows[ilien]["CHEMIN"].ToString();
                            string Icone       = dtlien.Rows[ilien]["ICONE"].ToString();

                            string Libellestatut   = dtlien.Rows[ilien]["STATUT"].ToString();
                            string ID_TYPEDOCUMENT = dtlien.Rows[ilien]["ID_LIENSOUSMENU"].ToString();

                            string affichermontant = dtlien.Rows[ilien]["AFFICHER_MONTANT"].ToString();
                            string accederdate     = dtlien.Rows[ilien]["ACCEDER_DATE"].ToString();

                            //DataTable dtlienstatut = new DataTable();
                            //ArrayList clelienstatut = new ArrayList();
                            //ArrayList vallienstatut = new ArrayList();
                            //clelienstatut.Add("@LIEN_SOUSMENU");
                            //vallienstatut.Add(idLien);
                            //clelienstatut.Add("@USERNAME");
                            //vallienstatut.Add(user.UserName);
                            //dtlienstatut = Cl_Fonction.Extraction_ds("PS_STATUT_USER", clelienstatut, vallienstatut, ref dtlienstatut);

                            //string ID_TYPEDOCUMENT = dtlienstatut.Rows[0]["ID_TYPEDOCUMENT"].ToString();

                            navbarMain.Groups.FindByText(Libelle.Trim()).Items.Add(LibelleLien.Trim()).Name             = Chemin + "|" + Libellestatut + "|" + ID_TYPEDOCUMENT + "|" + idLien + "|" + affichermontant + "|" + accederdate;
                            navbarMain.Groups.FindByText(Libelle.Trim()).Items.FindByText(LibelleLien.Trim()).Image.Url = Icone.Trim();
                        }
                        //**************Fin Lien*******************//
                    }
                }
                else
                {
                    HttpContext.Current.Response.RedirectLocation = System.Web.VirtualPathUtility.ToAbsolute("~/Account/SignIn.aspx");
                }
            }
            catch (Exception ex)
            {
                log.Info("Error : " + ex + "; Method : " + Cl_Fonction.GetCurrentMethod());
            }
        }