Exemplo n.º 1
0
        protected void Deactive_Click(object sender, EventArgs e)
        {
            string GoalIds = GetSelectedGoalIDString();

            if (GoalIds == "MultipleSelected")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", "showassocation2();", true);
                return;
            }
            if (GoalIds == "")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", "showassocation3();", true);
            }
            else
            {
                int folioDefault = portfolioBo.CustomerPortfolioDefault(GoalIds, "F");
                if (folioDefault == 1)
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", "showassocation4();", true);
                }
                else
                {
                    int folioDs = portfolioBo.CustomerPortfolioCheck(GoalIds, "C");
                    if (folioDs > 1)
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", "showassocation();", true);
                    }
                    else
                    {
                        int countDs = portfolioBo.CustomerPortfolioMultiple(GoalIds, "D");
                        if (countDs > 1)
                        {
                            trReassignPortfloio.Visible = true;
                            bindFolioDropDown(GoalIds, "E");
                            btnSubmit.Visible = false;
                            Dissociatecustomer();
                        }
                        else
                        {
                            Dissociatecustomer1();
                        }
                    }
                }
            }
        }