private void MoveBudgetRows_ToCompletion()
        {
            GridTableView          grdTableVw     = grdMoveBudget.MasterTableView;
            GridDataItemCollection itemCollection = grdTableVw.Items;

            foreach (GridItem gridItem in itemCollection)
            {
                int idAssociateNM = GetIdAssociateNM(gridItem);

                if (idAssociateNM == ApplicationConstants.INT_NULL_VALUE)
                {
                    continue;
                }
                else
                {
                    FollowUpCompletionBudget followUpCompletionBudget = new FollowUpCompletionBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));
                    followUpCompletionBudget.MoveCompletionBudget(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate);
                    btnMoveBudget.Visible = false;
                }
            }
        }
Пример #2
0
        private void MoveBudgetRows_ToCompletion()
        {
            int moveReleased = 0;

            GridTableView          grdTableVw     = grdMoveBudget.MasterTableView;
            GridDataItemCollection itemCollection = grdTableVw.Items;

            ReforecastBudget reforecastBudget = new ReforecastBudget(SessionManager.GetConnectionManager(this));

            reforecastBudget.IdProject = currentProject.Id;
            object lastRevisedValidatedVersion = reforecastBudget.GetLastValidatedVersion();

            if (lastRevisedValidatedVersion != null && int.Parse(lastRevisedValidatedVersion.ToString()) > 0)
            {
                moveReleased = 1;
            }

            foreach (GridItem gridItem in itemCollection)
            {
                int idAssociateNM = GetIdAssociateNM(gridItem);

                if (idAssociateNM == ApplicationConstants.INT_NULL_VALUE)
                {
                    continue;
                }
                else
                {
                    FollowUpCompletionBudget followUpCompletionBudget = new FollowUpCompletionBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));
                    if (moveReleased == 0)
                    {
                        followUpCompletionBudget.MoveCompletionBudget(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate);
                    }
                    else
                    {
                        followUpCompletionBudget.MoveCompletionBudgetReleasedVersion(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate);
                    }
                    btnMoveBudget.Visible = false;
                }
            }
        }