Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Model = null;
        ckComplex.Attributes.Add("onclick", "javascript:ComplexClicked()");
        ckConstantProp.Attributes.Add("onclick", "javascript:ComplexElementClicked()");
        ckRetract.Attributes.Add("onclick", "javascript:ComplexElementClicked()");
        ckCowlFlaps.Attributes.Add("onclick", "javascript:ComplexElementClicked()");
        cmbCatClass.Attributes.Add("onchange", "javascript:ComplexElementClicked()");
        ckHighPerf.Attributes.Add("onchange", "javascript:HighPerfClicked()");
        ckLegacyHighPerf.Attributes.Add("onchange", "javascript:LegacyHighPerfClicked()");
        foreach (ListItem li in rblTurbineType.Items)
        {
            MakeModel.TurbineLevel tl = (MakeModel.TurbineLevel)Convert.ToInt32(li.Value, CultureInfo.InvariantCulture);
            li.Attributes.Add("onclick", tl.IsTurbine() ? "javascript:showSinglePilotCertification()" : "javascript:hideSinglePilotCertification()");
        }

        lblAddNewManufacturer.Attributes.Add("onclick", "fnSetFocus('" + txtManufacturer.ClientID + "');");
        btnManOK.OnClientClick           = String.Format(CultureInfo.InvariantCulture, "fnClickOK('{0}', '{1}')", btnManOK.UniqueID, "");
        pnlManufacturer.Style["display"] = "none";
        pnlDupesFound.Style["display"]   = "none";

        if (!IsPostBack)
        {
            cmbCatClass.DataSource = CategoryClass.CategoryClasses();
            cmbCatClass.DataBind();
            divIsSimOnly.Visible = ((MyFlightbook.Profile.GetUser(Page.User.Identity.Name)).CanManageData);
            InitFormForMake();
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Determines if the specified turbinelevel is turbine (vs. piston or electric)
 /// </summary>
 /// <param name="tl"></param>
 /// <returns></returns>
 public static bool IsTurbine(this MakeModel.TurbineLevel tl)
 {
     return(tl == MakeModel.TurbineLevel.Jet || tl == MakeModel.TurbineLevel.UnspecifiedTurbine || tl == MakeModel.TurbineLevel.TurboProp);
 }