private void LoadGrid_Revised() { DataSet dsRevisedBudget = null; FollowUpRevisedBudget flpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER)); string budgetVersion = ReturnBudgetVersionFromCombo(); flpRevisedBudget.BudVersion = budgetVersion; flpRevisedBudget.IdProject = currentProject.Id; dsRevisedBudget = flpRevisedBudget.GetAll(true); if (dsRevisedBudget != null) { if (dsRevisedBudget.Tables[0].Rows.Count > 0) { grdFollowUpBudget.DataSource = dsRevisedBudget.Tables[0]; grdFollowUpBudget.DataBind(); //Set Validation enable state only for PM if (IsBATAOrPM(currentUser)) { ButtonValid = IsBudgetValidateable(dsRevisedBudget); } } else { LoadGridNull(); ButtonValid = false; throw (new IndException(string.Format(ApplicationMessages.EXCEPTION_BUDGET_REVISED_MISSING_FOR_VERSION, cmbVersions.SelectedItem.Text, cmbType.SelectedItem.Text))); } } }
private void DeleteBudgetRows_Revised() { 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); FollowUpRevisedBudget followUpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); followUpRevisedBudget.DeleteBudgetRows(currentProject.Id, idAssociate, ReturnBudgetVersionFromCombo()); } }
private bool GetBudgetIsValidState_Revised() { FollowUpRevisedBudget followUpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); followUpRevisedBudget.IdProject = ProjectId; followUpRevisedBudget.BudVersion = ReturnBudgetVersionFromCombo(); return(followUpRevisedBudget.GetRevisedBudgetValidState("GetRevisedScalarValidState")); }
private void ValidateRevisedBudget() { object conMan = SessionManager.GetConnectionManager(this); FollowUpRevisedBudget followUpRevisedBudget = new FollowUpRevisedBudget(conMan); followUpRevisedBudget.IdProject = ProjectId; followUpRevisedBudget.BudVersion = ApplicationConstants.BUDGET_VERSION_IN_PROGRESS_CODE; followUpRevisedBudget.ValidateRevisedBudget("ValidateRevisedBudget"); cmbVersions.FindItemByText(EBudgetVersion.Released.ToString()).Selected = true; }
/// <summary> /// method for CTM to submit revised budget /// </summary> /// <param name="budgetNextState"></param> private void SubmitRevisedBudget(string budgetNextState) { FollowUpRevisedBudget followUpRevBud = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); followUpRevBud.IdProject = IdProject; followUpRevBud.BudVersion = BudgetVersion; followUpRevBud.IdAssociate = IdAssociate; followUpRevBud.StateCode = budgetNextState; followUpRevBud.SetModified(); int ret = followUpRevBud.Save(); SubmitVisible = false; }
/// <summary> /// Method for PM to reject revised button /// </summary> private void RejectRevisedBudget() { FollowUpRevisedBudget followUpRevBud = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); followUpRevBud.IdProject = IdProject; followUpRevBud.BudVersion = BudgetVersion; followUpRevBud.IdAssociate = IdAssociate; followUpRevBud.StateCode = ApplicationConstants.BUDGET_STATE_OPEN; followUpRevBud.SetModified(); int ret = followUpRevBud.Save(); SubmitVisible = false; ApprovedVisible = false; RejectVisible = false; }
private void MoveBudgetRows_Revised() { GridTableView grdTableVw = grdMoveBudget.MasterTableView; GridDataItemCollection itemCollection = grdTableVw.Items; foreach (GridItem gridItem in itemCollection) { int idAssociateNM = GetIdAssociateNM(gridItem); if (idAssociateNM != ApplicationConstants.INT_NULL_VALUE) { FollowUpRevisedBudget followUpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); followUpRevisedBudget.MoveRevisedBudget(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate); btnMoveBudget.Visible = false; } } }
private bool ExistsInProgressRevisedBudget() { DataSet dsRevisedBudget = null; FollowUpRevisedBudget flpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER)); flpRevisedBudget.BudVersion = ApplicationConstants.BUDGET_VERSION_IN_PROGRESS_CODE; flpRevisedBudget.IdProject = currentProject.Id; dsRevisedBudget = flpRevisedBudget.GetAll(true); if (dsRevisedBudget != null) { if (dsRevisedBudget.Tables[0] != null && dsRevisedBudget.Tables[0].Rows.Count > 0) { return(true); } } return(false); }
private void MoveBudgetRows_Revised() { int moveReleased = 0; RevisedBudget revisedBudget = new RevisedBudget(SessionManager.GetConnectionManager(this)); revisedBudget.IdProject = currentProject.Id; object lastRevisedValidatedVersion = revisedBudget.GetLastValidatedVersion(); if (lastRevisedValidatedVersion != null && int.Parse(lastRevisedValidatedVersion.ToString()) > 0) { moveReleased = 1; } GridTableView grdTableVw = grdMoveBudget.MasterTableView; GridDataItemCollection itemCollection = grdTableVw.Items; foreach (GridItem gridItem in itemCollection) { int idAssociateNM = GetIdAssociateNM(gridItem); if (idAssociateNM != ApplicationConstants.INT_NULL_VALUE) { FollowUpRevisedBudget followUpRevisedBudget = new FollowUpRevisedBudget(SessionManager.GetSessionValueNoRedirect(this.Page, SessionStrings.CONNECTION_MANAGER)); if (moveReleased == 0) { followUpRevisedBudget.MoveRevisedBudget(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate); } else { followUpRevisedBudget.MoveRevisedBudgetReleasedVersion(currentProject.Id, GetIdAssociateLM(), idAssociateNM, SessionManager.GetCurrentUser(this).IdAssociate); } btnMoveBudget.Visible = false; } } }