Ejemplo n.º 1
0
        protected void ASPxCallbackPage_Callback(object sender, CallbackEventArgsBase e)
        {
            if (e.Parameter == "")
            {
                PageContent.Controls.Clear();
            }
            else
            {
                if (user != null)
                {
                    PageContent.Controls.Clear();
                    string menu     = e.Parameter.ToString().Split('|')[0];
                    string statut   = e.Parameter.ToString().Split('|')[1];
                    string idtypdoc = e.Parameter.ToString().Split('|')[2];
                    string idLien   = e.Parameter.ToString().Split('|')[3];

                    string affichermontant = e.Parameter.ToString().Split('|')[4];
                    string accederdate     = e.Parameter.ToString().Split('|')[5];

                    DataTable dt = new DataTable();
                    dt = Cl_Fonction.getLinkDetail(idLien, user.Rolename);

                    Session["DROIT"]            = dt.Rows[0]["DROIT"].ToString();
                    Session["JOURNAUX"]         = dt.Rows[0]["JOURNAUX"].ToString();
                    Session["TIERS"]            = dt.Rows[0]["TIERS"].ToString();
                    Session["TYPEDOCUMENT"]     = dt.Rows[0]["TYPEDOCUMENT"].ToString();
                    Session["ID_LIENSOUSMENU"]  = idLien;
                    Session["STATUT_TYPEDOC"]   = statut;
                    Session["ID_TYPEDOCUMENT "] = idtypdoc;

                    Session["AFFICHER_MONTANT"] = affichermontant;
                    Session["ACCEDER_DATE "]    = accederdate;

                    string link = "<iframe src=\"" + menu + "\" scrolling='yes' frameborder='0' style='border:none; overflow:hidden; width:100%; height:1000px;' allowTransparency='true'></%iframe><br />";
                    PageContent.Controls.Add(new LiteralControl(link));
                }
                else
                {
                    HttpContext.Current.Response.RedirectLocation = System.Web.VirtualPathUtility.ToAbsolute("~/Account/SignIn.aspx");
                }
            }
        }