private void DeleteBudgetRows_Initial()
        {
            GridTableView          grdTableVw     = grdFollowUpBudget.MasterTableView;
            GridDataItemCollection itemCollection = grdTableVw.Items;

            foreach (GridItem gridItem in itemCollection)
            {
                if (!(gridItem is GridEditableItem))
                {
                    continue;
                }
                GridEditableItem item = gridItem as GridEditableItem;

                CheckBox chkSelected = item["SelectBudgetCol"].FindControl("chkDeleteCol") as CheckBox;
                if (chkSelected == null)
                {
                    continue;
                }
                if (!chkSelected.Checked)
                {
                    continue;
                }
                int idAssociate = ApplicationConstants.INT_NULL_VALUE;
                int.TryParse(item["IdAssociate"].Text, out idAssociate);

                FollowUpInitialBudget flpInitBudget = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));
                flpInitBudget.DeleteBudgetRows(currentProject.Id, idAssociate);
            }
        }
        private void LoadGrid_Initial()
        {
            FollowUpInitialBudget flpInitBud = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER));

            flpInitBud.IdProject = ProjectId;
            dsFollowInitBud      = flpInitBud.GetAll(true);

            if (dsFollowInitBud != null)
            {
                if (dsFollowInitBud.Tables[0].Rows.Count > 0)
                {
                    grdFollowUpBudget.DataSource = dsFollowInitBud.Tables[0];
                    grdFollowUpBudget.DataBind();
                    //Set Validation enable state only for PM
                    if (IsBATAOrPM(currentUser))
                    {
                        ButtonValid = IsBudgetValidateable(dsFollowInitBud);
                    }
                }
                else
                {
                    LoadGridNull();
                    throw new IndException(string.Format(ApplicationMessages.EXCEPTION_BUDGET_INTIAL_MISSING_FOR_VERSION, cmbVersions.SelectedItem.Text, cmbType.SelectedItem.Text));
                }
            }
            else
            {
                throw new IndException(string.Format(ApplicationMessages.EXCEPTION_BUDGET_INTIAL_MISSING_FOR_VERSION, cmbVersions.SelectedItem.Text, cmbType.SelectedItem.Text));
            }
        }
        private void ValidateInitialBudget()
        {
            FollowUpInitialBudget followUpInitBud = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));

            followUpInitBud.IdProject = ProjectId;
            followUpInitBud.ValidateInitialBudget("ValidateInitialBudget");
        }
        private bool GetBudgetIsValidState_Initial()
        {
            FollowUpInitialBudget followUpInitBud = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));

            followUpInitBud.IdProject = ProjectId;
            return(followUpInitBud.GetInitialBudgetValidState("GetInitialBudgetValidState"));
        }
        /// <summary>
        /// method for CTM to submit initial budget
        /// </summary>
        /// <param name="budgetNextState"></param>
        private void SubmitInitialBudget(string budgetNextState)
        {
            FollowUpInitialBudget followUpInitBud = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));

            followUpInitBud.IdProject   = IdProject;
            followUpInitBud.IdAssociate = IdAssociate;
            followUpInitBud.StateCode   = budgetNextState;
            followUpInitBud.SetModified();
            int ret = followUpInitBud.Save();

            SubmitVisible     = false;
            btnSubmit.Visible = false;
        }
        /// <summary>
        /// method for PM to Reject Initial Budget
        /// </summary>
        private void RejectInitialBudget()
        {
            FollowUpInitialBudget followUpInitBud = new FollowUpInitialBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER));

            followUpInitBud.IdProject   = IdProject;
            followUpInitBud.IdAssociate = IdAssociate;
            followUpInitBud.StateCode   = ApplicationConstants.BUDGET_STATE_OPEN;
            followUpInitBud.SetModified();
            int ret = followUpInitBud.Save();

            SubmitVisible   = false;
            ApprovedVisible = false;
            RejectVisible   = false;
        }