Ejemplo n.º 1
0
        private void GetSalesForecastUpdated(LoadingPanelTrigger trigger)
        {
            // Get filter parameter
            string filter = "";

            if (btnShowAll.Checked)
            {
                filter = "1";
            }
            if (btnVerifiedOnly.Checked)
            {
                filter = "2";
            }
            if (btnNonVerifiedOnly.Checked)
            {
                filter = "3";
            }

            // Refresh data
            ObjectDataSource1.SelectParameters["eop"].DefaultValue    = cbxEopYears.Text;
            ObjectDataSource1.SelectParameters["filter"].DefaultValue = filter;
            gvSalesForecastUpdated.DataBind();

            // Hide loading panel
            switch (trigger)
            {
            case LoadingPanelTrigger.EopYear:
                ScriptManager.RegisterClientScriptBlock(cbxEopYears, cbxEopYears.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            case LoadingPanelTrigger.ShowAll:
                ScriptManager.RegisterClientScriptBlock(btnShowAll, btnShowAll.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            case LoadingPanelTrigger.VerifiedOnly:
                ScriptManager.RegisterClientScriptBlock(btnVerifiedOnly, btnVerifiedOnly.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            case LoadingPanelTrigger.NonVerifiedOnly:
                ScriptManager.RegisterClientScriptBlock(btnNonVerifiedOnly, btnNonVerifiedOnly.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;
            }
        }
Ejemplo n.º 2
0
        //private void ToggleFormButtons(FormStateMnemonic state)
        //{
        //    if (state == FormStateMnemonic.Assign)
        //    {
        //        btnAssignMnemonic.Visible = true;
        //        btnRemoveMnemonic.Visible = btnUpdateMnemonic.Visible = false;

        //        tbxFamilyAllocation.Text = tbxQtyPer.Text = "";
        //    }
        //    else if(state == FormStateMnemonic.UpdateRemove)
        //    {
        //        btnAssignMnemonic.Visible = false;
        //        btnRemoveMnemonic.Visible = btnUpdateMnemonic.Visible = true;

        //        btnRemoveMnemonic.BackColor = Color.Red;
        //    }
        //}

        private void HideLoadingPanel(LoadingPanelTrigger trigger)
        {
            // Hide loading panel
            switch (trigger)
            {
            case LoadingPanelTrigger.Assign:
                //ScriptManager.RegisterClientScriptBlock(btnAssignMnemonic, btnAssignMnemonic.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            case LoadingPanelTrigger.Update:
                ScriptManager.RegisterClientScriptBlock(btnUpdateMnemonic, btnUpdateMnemonic.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            case LoadingPanelTrigger.Remove:
                //ScriptManager.RegisterClientScriptBlock(btnRemoveMnemonic, btnRemoveMnemonic.GetType(), "HideLoadingPanel", "lp.Hide();", true);
                break;

            default:
                break;
            }
        }