protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.PickDateTime.MaxDate           = DateTime.Now;
            this.PickDateTime.SelectedDate      = DateTime.Now;
            this.PickDateTime.FocusedDate       = DateTime.Now;
            this.PickDateTime.DateInput.Culture = new System.Globalization.CultureInfo("sv-SE");
            this.PickEndDate.DateInput.Culture  = new System.Globalization.CultureInfo("sv-SE");
            this.PickDateTime.TimeView.Culture  = new System.Globalization.CultureInfo("sv-SE");
            this.LabelCountResults.Text         = Organization.FromIdentity(Organization.PPSEid).GetMemberCount().ToString();
            this.LabelStartDate.Text            = DateTime.Today.ToString("yyyy-MM-dd");
            this.TextHeight.Text = "5";
            this.TextWidth.Text  = "7";

            int[] orgsToList = new int[] { Organization.PPSEid, Organization.UPSEid };
            DropDownListOrg.Items.Clear();
            foreach (int orgId in orgsToList)
            {
                Organization org = Organization.FromIdentity(orgId);
                DropDownListOrg.Items.Add(new ListItem(org.Name, org.Identity.ToString()));
            }
        }

        this.TextHeight.Style.Add(HtmlTextWriterStyle.Width, "40px");
        this.TextWidth.Style.Add(HtmlTextWriterStyle.Width, "40px");
        this.DropUnit.Style.Add(HtmlTextWriterStyle.Width, "70px");
        Controls_v4_WSGeographyTreeDropDown.EmitScripts(this);
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.pagePermissionDefault = new PermissionSet(Permission.CanEditOrg);

        enteringMode = FormView1.CurrentMode;
        Controls_v4_WSGeographyTreeDropDown.EmitScripts(this);
        Controls_v4_WSOrgTreeDropDown.EmitScripts(this);
        WSOrgTreeDropDownSelectForEdit.tree.SetAuthority(_authority, Permission.CanEditOrg);

        programmedStyleTag.InnerHtml =
            programmedStyleTag.InnerHtml
            .Replace("RadMultiPage1.ClientID", RadMultiPage1.ClientID)
            .Replace("RadTabStrip1.ClientID", RadTabStrip1.ClientID);

        WSOrgTreeDropDownSelectForEdit.tree.topSortCountryId = _currentUser.CountryId; //current users country at the top of the dropdown

        if (!IsPostBack)
        {
            FormView1.ChangeMode(FormViewMode.ReadOnly);
        }
        //if (Request.Browser.IsBrowser("Firefox"))
        //{
        //    RadAjaxManager1.EnableAJAX = false;
        //    ScriptManager.GetCurrent(this).EnablePartialRendering = false;
        //}
    }