Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rcb_Term.DataTextField  = "Term";
                rcb_Term.DataValueField = "Term";
                rcb_Term.DataSource     = cmb.getActiveTerm_AdobeConnection();
                rcb_Term.DataBind();
                rcb_Term.Items.Insert(0, new RadComboBoxItem("انتخاب نمایید"));
                string termSelected;
                if (rcb_Term.SelectedIndex == 0)
                {
                    termSelected = ConfigurationManager.AppSettings["Term"].ToString();
                }
                else
                {
                    termSelected = rcb_Term.SelectedValue;
                }
                grd_ShowFile.DataSource = assetB.GetAllAssetListByTerm(termSelected, false);
                grd_ShowFile.DataBind();
                string   mId    = Request.QueryString["id"].ToString();
                string[] id     = mId.ToString().Split(new char[] { '@' });
                string   menuId = "";
                for (int i = 0; i < id[1].Length; i++)
                {
                    string s = id[1].Substring(i + 1, 1);
                    if (s != "-")
                    {
                        menuId += s;
                    }
                    else
                    {
                        break;
                    }
                }
                Session[sessionNames.menuID] = menuId.ToString();
            }

            AccessControl1 = (CommonUI.AccessControl)LoadControl("../../CommonUI/AccessControl.ascx");
            Page.Controls.Add(AccessControl1);
            AccessControl1.MenuId = Session[sessionNames.menuID].ToString();
            AccessControl1.UserId = Session[sessionNames.userID_Karbar].ToString();
        }