Exemplo n.º 1
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.Personnel;

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Project Personnel";
                }

                BindGrid(false, false);
                BindProjectUsers();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btn_Save.Visible   = false;
                    BtnAdd.Visible     = false;
                    btnReset.Visible   = false;
                    Btn_remove.Visible = false;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.GeographicalInfo;

            if (!IsPostBack)
            {
                txtKeyGeoFeatures.Attributes.Add("maxlength", txtKeyGeoFeatures.MaxLength.ToString());

                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Geographical Information";
                }
                ViewState["Geography_ID"] = 0;
                BindGrid();

                GetTooltip();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdProjectGeo.Columns[grdProjectGeo.Columns.Count - 1].Visible = false;
                    grdProjectGeo.Columns[grdProjectGeo.Columns.Count - 2].Visible = false;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            caldpProjStartDate.Format = UtilBO.DateFormat;
            caldpProjEndDate.Format   = UtilBO.DateFormat;

            if (!IsPostBack)
            {
                Master.PageHeader = "View Projects";
                BindProjects(true);
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.VIEW_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.VIEW_PROJECT) == true)
                {
                    grdProjects.Columns[grdProjects.Columns.Count - 2].Visible = false;
                    grdProjects.Columns[grdProjects.Columns.Count - 3].Visible = false;
                    //for (int i = grdProjects.Columns.Count - 1; i >= 0; i--)
                    //{
                    //    if (i > grdProjects.Columns.Count - 4)
                    //        grdProjects.Columns[i].Visible = false;
                    //}
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.VIEW_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.VIEW_PROJECT) == false)
                {
                    Response.Redirect(ResolveUrl("~/Default.aspx"));
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.Workflow;

            if (Session["userName"] != null)
            {
                //Retrieving UserName from Session
                string userName  = (Session["userName"].ToString());
                string uID       = Session["USER_ID"].ToString();
                string projectID = Session["PROJECT_ID"].ToString();
            }
            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Workflow Definition";
                }

                ViewState["WorkApprovalID"] = 0; // ViewState of TRN_WORKFLOW_APPROVAl
                ViewState["WorkFlowDefID"]  = 0; //Viewstate of TRN_WorkFlow_Definiation
                BindGrid(false, false);          //Calling the Grid Data
                BindGridWorkFlowDefinition();
                screenintiallization();
                ApprovalTable.Visible            = false;
                CancelButton.Visible             = false;
                UpDateButton.Visible             = false;
                ViewState["StatusMode"]          = "None";
                WORKFLOWDEFINITIONIDTextBox.Text = "0";
                WorkApproverIDTextBox.Text       = "0";
                WorkDefinationTextBox.Text       = "0";
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    ViewState["StatusMode"] = "ReadOnly";
                    SaveButton.Visible      = false;
                    ClearButton.Visible     = false;
                    ADDButton.Visible       = false;
                    grdWorkflowItem.Columns[grdWorkflowItem.Columns.Count - 1].Visible = false;
                    grdWorkflowItem.Columns[grdWorkflowItem.Columns.Count - 2].Visible = false;
                    grdApprover.Columns[grdApprover.Columns.Count - 1].Visible         = false;
                    grdApprover.Columns[grdApprover.Columns.Count - 2].Visible         = false;
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string RouteName;

            if (!IsPostBack)
            {
                RouteName = Request.QueryString["Route"].ToString();

                Master.PageHeader         = "Coordinates for Route " + RouteName;
                ViewState["ROUTE_ID"]     = Convert.ToInt32(Request.QueryString["RouteId"].ToString());
                lnkMap.Attributes["href"] = string.Format("RouteMap.aspx?routeID={0}", ViewState["ROUTE_ID"].ToString());

                ViewState["ROUTE_COORDINATEID"] = 0;
                BindGrid();

                findRouteStatusafterSave(Convert.ToInt32(Session["PROJECT_ID"]));
                if (Session["FROZEN"].ToString() == "Y")
                {
                    btn_Save.Visible        = false;
                    btn_Clear.Visible       = false;
                    btn_ImportExcel.Visible = false;
                    GrdRouteCoordinates.Columns[GrdRouteCoordinates.Columns.Count - 1].Visible = false;
                    GrdRouteCoordinates.Columns[GrdRouteCoordinates.Columns.Count - 2].Visible = false;
                }
                getFinalRouteApprovalDetial(Convert.ToInt32(Session["PROJECT_ID"]));
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btn_Save.Visible        = false;
                    btn_Clear.Visible       = false;
                    btn_ImportExcel.Visible = false;
                    GrdRouteCoordinates.Columns[GrdRouteCoordinates.Columns.Count - 1].Visible = false;
                    GrdRouteCoordinates.Columns[GrdRouteCoordinates.Columns.Count - 2].Visible = false;
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.FinancierInfo;

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Financiers Information";
                }

                ViewState["FINANCE_ID"] = 0;
                BindFinanciers();

                getReasonofFinance();
                getNatureoffinance();
                getConditionsforfinance();
                txtFinancierName.Attributes.Add("onchange", "setDirty();");
                btnSave.Attributes.Add("onclick", "isDirty = 0;");
                btnClear.Attributes.Add("onclick", "isDirty = 0;");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdFinances.Columns[grdFinances.Columns.Count - 1].Visible = false;
                    grdFinances.Columns[grdFinances.Columns.Count - 2].Visible = false;
                    grdFinances.Columns[grdFinances.Columns.Count - 3].Visible = false;
                }
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Route Selection Criteria";
                }

                ClearDetails();
                LoadRoutes();
                findRouteStatusafterSave(Convert.ToInt32(Session["PROJECT_ID"]));

                if (Session["FROZEN"] != null)
                {
                    if (Session["FROZEN"].ToString() == "Y")
                    {
                        btnSave.Visible  = false;
                        btnClear.Visible = false;
                    }
                }

                getFinalRouteApprovalDetial(Convert.ToInt32(Session["PROJECT_ID"]));

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                }
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            TxtAddress.Attributes.Add("maxlength", TxtAddress.MaxLength.ToString());

            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.Consultant;

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Consultants";
                }

                ViewState["CONSULTANTID"] = 0;

                BindConsultantTypes();
                BindGrid(false, false);
                txtConsultantname.Attributes.Add("onchange", "setDirty();");
                btn_Save.Attributes.Add("onclick", "isDirty = 0;");
                btn_Clear.Attributes.Add("onclick", "isDirty = 0;");
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btn_Save.Visible  = false;
                    btn_Clear.Visible = false;
                    grdConsultant.Columns[grdConsultant.Columns.Count - 1].Visible = false;
                    grdConsultant.Columns[grdConsultant.Columns.Count - 2].Visible = false;
                    grdConsultant.Columns[grdConsultant.Columns.Count - 3].Visible = false;
                }
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.Budget;

            CurrenceID.Visible = false;

            if (Session["userName"] != null)
            {
                //Retrieving UserName from Session
                string userName  = (Session["userName"].ToString());
                string uID       = Session["USER_ID"].ToString();
                string projectID = Session["PROJECT_ID"].ToString();
            }

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Budget Estimation";
                }

                ViewState["BudgetEstimationID"] = 0;
                HiddenFieldTotalValue.Value     = "0";
                BindEstCategories();

                screenintiallization();
                getToatlBudgetValue();
                ValuePerTextBox.Attributes.Add("readonly", "readonly");
                ValueTextBox.Attributes.Add("onchange", "setDirty();");
                ValuePerTextBox.Attributes.Add("onchange", "setDirty();");
                CurrenceID.Attributes.Add("onchange", "setDirty();");
                SaveButton.Attributes.Add("onclick", "isDirty = 0;");
                ClearButton.Attributes.Add("onclick", "isDirty = 0;");


                // LoadCurrencyEstimate();
                //SaveButton.Attributes.Add("onclick", "return CalculateBGTPRECTFinal();");
                // ValueTextBox.Attributes.Add("onchange", "CalculateBGTPRECT();");
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    foreach (RepeaterItem item in rptBudgetEstCategory.Items)
                    {
                        GridView grdBudgetEstimation = item.FindControl("grdBudgetEstimation") as GridView;
                        if (grdBudgetEstimation != null)
                        {
                            grdBudgetEstimation.Columns[grdBudgetEstimation.Columns.Count - 1].Visible = false;
                            grdBudgetEstimation.Columns[grdBudgetEstimation.Columns.Count - 2].Visible = false;
                        }
                    }
                    plsedit1.Visible             = false;
                    plsedit.Visible              = false;
                    btnAddNewCategory.Visible    = false;
                    btnAddNewSubCategory.Visible = false;
                }
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu        = ProjectMenu.MenuValue.ProjectDetails;
            caldpProjectStartDate.Format      = UtilBO.DateFormat;
            CaldpProjectEndDate.Format        = UtilBO.DateFormat;
            caldpConstructionStartDate.Format = UtilBO.DateFormat;
            CaldpConstructionEndDate.Format   = UtilBO.DateFormat;

            if (!IsPostBack)
            {
                string mode = "";
                txtObjective.Attributes.Add("maxlength", txtObjective.MaxLength.ToString());
                if (Request.QueryString["mode"] != null)
                {
                    mode = Request.QueryString["mode"];
                }

                if (mode.ToUpper() == "NEW")
                {
                    Master.PageHeader       = "Create Project";
                    ProjectMenu1.Visible    = false;
                    ViewState["BANK_ID"]    = 0;
                    Session["PROJECT_ID"]   = null;
                    Session["PROJECT_CODE"] = null;
                    ProjectMenu1.Mode       = mode;
                    pnlSegments.Visible     = false;
                    LoadCurrencyTotalEstimate();
                }
                else if (Session["PROJECT_ID"] != null)
                {
                    Master.PageHeader = "Project Details";
                    btnSave.Text      = "Update Project";
                    GetProjectDetails();
                    pnlSegments.Visible = true;
                    LoadTypeLine();
                    DisplayEstBudget();
                    ddlProjectStatus.Enabled = true;
                    FillBanks();
                }
                txtProjectCode.Attributes.Add("onchange", "setDirty();");
                txtProjectName.Attributes.Add("onchange", "setDirty();");
                txtLabouCost.Attributes.Add("onchange", "setDirty();");
                txtBulMatCost.Attributes.Add("onchange", "setDirty();");
                //---------//
                txtSegmentName.Attributes.Add("onchange", "setDirty();");
                txtRouteLength.Attributes.Add("onblur", "setDirty();");
                txtRouteLength.Attributes.Add("onchange", "CheckDecimal(e, src);");
                txtEstBudget.Attributes.Add("onchange", "setDirty();");
                txtImplementationPeriod.Attributes.Add("onchange", "setDirty();");
                txtfunder.Attributes.Add("onchange", "setDirty();");
                btnSave.Attributes.Add("onclick", "isDirty = 0;");
                btnClear.Attributes.Add("onclick", "isDirty = 0;");
                btnADDSegment.Attributes.Add("onclick", "isDirty = 0;");
                btnSegmentClear.Attributes.Add("onclick", "isDirty = 0;");
                ddlTypeLine.Attributes.Add("onchange", "isDirty = 0;");
                txtDollervalue.Attributes.Add("onchange", "setDirty();");
                txtDollervalue.Attributes.Add("onblur", "CheckDecimal(e, src);");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btnADDSegment.Visible   = false;
                    btnClear.Visible        = false;
                    btnSave.Visible         = false;
                    btnSegmentClear.Visible = false;
                    grdSegmentDetails.Columns[grdSegmentDetails.Columns.Count - 1].Visible = false;
                }
                ViewStateProjectSegmentId = 0;
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Set edit mode for edit comand
        /// Delete data from the database for delete comand
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void grdProjects_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "EditProject")
            {
                Session["PROJECT_ID"] = e.CommandArgument;
                Session["FROZEN"]     = null;
                getFrozen();
                Session["PROJECT_CODE"] = ((LinkButton)e.CommandSource).Text;
                Session["HH_ID"]        = null;

                if (Request.QueryString["mode"] == "redir")
                {
                    Response.Redirect(ResolveUrl("~/UI/Compensation/PAPList.aspx"));
                }
                else if (Request.QueryString["mode"] == "redirCDAP")
                {
                    Response.Redirect(ResolveUrl("~/UI/Compensation/CDAPImplementation.aspx"));
                }
                else
                {
                    if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                        CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                    {
                        Response.Redirect(ResolveUrl("~/UI/Compensation/PAPList.aspx"));
                    }
                    else
                    {
                        Response.Redirect("ProjectDetails.aspx");
                    }
                }
            }
            else if (e.CommandName == "FreezeProject")
            {
                ProjectBLL ObjProjectBLL = new ProjectBLL();

                ObjProjectBLL.FreezeProject(Convert.ToInt32(e.CommandArgument), Convert.ToInt32(Session["USER_ID"]));
                Session["FROZEN"] = null;
                getFrozen();
                BindProjects(false);
            }
            else if (e.CommandName == "DataVerificationProject")
            {
                string message = string.Empty;

                // Session["PROJECT_ID"] = e.CommandArgument;

                WorkFlowBO  objWorkFlowBO  = new WorkFlowBO();
                WorkFlowBLL objWorkFlowBLL = new WorkFlowBLL();

                string ChangeRequestCode = UtilBO.WorkflowDataVerification;

                objWorkFlowBO = objWorkFlowBLL.getWOrkFlowApprovalID(Convert.ToInt32(e.CommandArgument), ChangeRequestCode);

                string pageCode = "DATAV";

                if (objWorkFlowBO != null)
                {
                    int userID    = Convert.ToInt32(Session["USER_ID"]);
                    int ProjectID = Convert.ToInt32(e.CommandArgument);
                    int HHID      = Convert.ToInt32(Session["HH_ID"]);

                    string paramChangeRequest = string.Format("OpenChangeRequest('{0}',{1},{2},{3},'{4}')", ChangeRequestCode, ProjectID, userID, HHID, pageCode);
                    ClientScript.RegisterStartupScript(this.GetType(), "DATAVERIFICATIONPROJECT", paramChangeRequest, true);
                }
                else
                {
                    message = "Data Verification Approval is not defined";
                    if (message != "")
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Added", "alert('" + message + "');", true);
                    }
                }
            }
            else if (e.CommandName == "Unfreeze")
            {
                //Call the Popwindow here
                int    ProjectId   = 0;
                string ProjectCode = string.Empty;

                string   CommandArguments = e.CommandArgument.ToString();
                string[] strArguments     = e.CommandArgument.ToString().Split(new char[] { ',' });

                if (strArguments.Length > 1)
                {
                    ProjectId   = Convert.ToInt32(strArguments[0]);
                    ProjectCode = strArguments[1];
                }
                string callUnfreezeWindow = string.Format("UnfreezeWindow({0},'{1}',{2})", ProjectId, ProjectCode, Convert.ToInt32(Session["USER_ID"]));
                ClientScript.RegisterStartupScript(this.GetType(), "callUnfreezeWindow", callUnfreezeWindow, true);

                BindProjects(false);
            }
        }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectMenu1.HighlightMenu = ProjectMenu.MenuValue.RouteInfo;

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Route Info";
                }

                txtRouteDetails1.Attributes.Add("maxlength", txtRouteDetails1.MaxLength.ToString());
                txtRouteDetails2.Attributes.Add("maxlength", txtRouteDetails2.MaxLength.ToString());
                txtRouteDetails3.Attributes.Add("maxlength", txtRouteDetails3.MaxLength.ToString());

                ViewState["ROUTEID"]   = 0;
                lnkbtnone1.Visible     = false;
                lnkbtnTwo.Visible      = false;
                lnkbtnthree.Visible    = false;
                ApproverButton.Visible = false;

                GetProjectRouteDetails(Convert.ToInt32(Session["PROJECT_ID"]));

                txtFinalRoute.Enabled   = false;
                txtapprovedby.Enabled   = false;
                txtapprovedDate.Enabled = false;
                txtComments.Enabled     = false;
                //StatusLabel.Visible = false;
                ApprovalMessage1.SetMessage = ApprovalMessage.MessageValue.None;
                lnkApprovalComments.Visible = false;
                // ApprovalMessage1.Visible = false;

                //findRouteStatusafterSave(Convert.ToInt32(Session["PROJECT_ID"]));
                if (Session["FROZEN"] != null && Session["FROZEN"].ToString() == "Y")
                {
                    btn_Save.Visible  = false;
                    btn_Clear.Visible = false;
                    // ApproverButton.Visible = true;
                    //StatusLabel.Visible = false;
                    // ApprovalMessage1.SetMessage = ApprovalMessage.MessageValue.None;
                    //lnkApprovalComments.Visible = false;
                    // ApprovalMessage1.Visible = false;
                }
                getFinalRouteApprovalDetial(Convert.ToInt32(Session["PROJECT_ID"]));
                findRouteStatusafterSave(Convert.ToInt32(Session["PROJECT_ID"]));

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                    CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                else if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false &&
                         CheckAuthorization.HasViewPrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == true)
                {
                    btn_Save.Visible       = false;
                    btn_Clear.Visible      = false;
                    ApproverButton.Visible = false;
                }
                // GetApproavlComments();
            }
        }