Пример #1
0
        /// <summary>
        /// Set Page header,Call methods to fill the Drop Downs and Fetch the data from Database
        /// Check User Permitions
        /// Check Mode is readonly or not
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            ValuationMenu1.HighlightMenu = ValuationMenu.MenuValue.AcreageValuation;
            // CompSocioEconomyMenu1.HighlightMenu = CompSocioEconomyMenu.MenuValue.AcreageValuation;
            ViewMasterCopy1.HighlightMenu = ViewMasterCopy.MenuValue.AffectedAcreageValuation;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS", CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_CODE"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Socio-Economic - Land Information - Affected Acreage Valuation";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                AddShareOfLandValue();
                BindLandType();
                BindLocationClassification();
                BindProprietor();
                GetHouseholdDetails();
                GetAffectedAcreageValuation();


                //txtRightWay.ReadOnly = true;
                //txtWayleave.ReadOnly = true;
                //txtWayleave.Attributes.Add("onKeyDown", "doCheck();");
                //txtRightWay.Attributes.Add("onKeyDown", "doCheck();");
                txtAcreageHA.Attributes.Add("onKeyDown", "doCheck();");
                //txtAcreageAcres.Attributes.Add("onKeyDown", "doCheck();");
                checkApprovalExitOrNot();
                projectFrozen();
                getApprrequtStatusAcrValuation();
                txtLandOwner.Attributes.Add("onchange", "setDirtyText();");
                txtLandBlock.Attributes.Add("onchange", "setDirtyText();");
                txtLandPlot.Attributes.Add("onchange", "setDirtyText();");
                btnSave.Attributes.Add("onclick", "isDirty = 0;");
                btnClear.Attributes.Add("onclick", "isDirty = 0;");

                if ((new PAP_HouseholdBLL()).IsResident(Convert.ToInt32(Session["HH_ID"])) == false)
                {
                    // Whole Acreage Acres section is available only for Residents.
                    txtAcreageAcres.Enabled = false;
                    txtAcreageHA.Enabled    = false;
                }


                int HHID_ = Convert.ToInt32(Session["HH_ID"]);
                ViewDependents(HHID_);
                upnAcreageVal.Update();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIO_ECONOMIC) == false)
                {
                    lnkAcrValuation.Visible = false;
                    btnSave.Visible         = false;
                    btnClear.Visible        = false;
                }
            }
            if (Mode == "Readonly")
            {
                ValuationMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible       = false;
                lnkAcrValuation.Visible = false;
                btnSave.Visible         = false;
                btnClear.Visible        = false;
            }
        }
Пример #2
0
        /// <summary>
        /// Set Page header,Call getApprrequtStatusMajorSchock() to get the data of the Approvar request status major shocks
        /// call GetTypeofshock() to get the data of the type of shock
        /// call Getcopingmechanism() to get the status of the coping mechanism from the database
        /// call Gethelpedmost() to get the data from the database of helped most
        /// call BindGrid() to get the data from the data base and bind it to the gridview
        /// to set the status of the link button lnkMajorSchock,lnkLogout
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            CompSocioEconomyMenu1.HighlightMenu = CompSocioEconomyMenu.MenuValue.MajorShocks;
            ViewMasterCopy1.HighlightMenu       = ViewMasterCopy.MenuValue.ShockDetails;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            if (!Page.IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Socio-Economic - Major Shocks";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                // To get type of shock from MST_SHOCKSEXPERIENCED
                GetTypeofshock();

                //To get coping mechanism from the table MST_COPING_MECHANISM
                Getcopingmechanism();

                //To get coping mechanism from the table MST_SUPPORT
                Gethelpedmost();


                getApprrequtStatusMajorSchock(); //Added BY Ramu
                BindGrid();                      //Calling the Grid Data
                projectFrozen();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIO_ECONOMIC) == false)
                {
                    lnkMajorSchock.Visible       = false;
                    btnSave.Visible              = false;
                    btnClear.Visible             = false;
                    grdshocks.Columns[4].Visible = false;
                    grdshocks.Columns[5].Visible = false;
                }
                //Added BY Ramu
            }
            if (Mode == "Readonly")
            {
                CompSocioEconomyMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible            = false;
                lnkMajorSchock.Visible       = false;
                btnSave.Visible              = false;
                btnClear.Visible             = false;
                grdshocks.Columns[4].Visible = false;
                grdshocks.Columns[5].Visible = false;
            }
        }
Пример #3
0
        /// <summary>
        /// Set Page header,call  Getcategory() to get category
        /// call  Getresolby() to get result by id
        /// call Getactionby() to get action
        /// call   BindGrid() to bind the data to the grid
        /// Set attributes to link buttons lnkGrievances,lnkUploadDoc
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            calactionDatePicker.Format     = UtilBO.DateFormat;
            calresolutionDatePicker.Format = UtilBO.DateFormat;
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS", CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }

            if (!IsPostBack)
            {
                descriptionTextBox.Attributes.Add("maxlength", descriptionTextBox.MaxLength.ToString());
                actionTextBox.Attributes.Add("maxlength", actionTextBox.MaxLength.ToString());
                ViewState["GRIEVANCEID"] = 0;
                Master.PageHeader        = Session["PROJECT_CODE"].ToString() + " - Grievances";
                int hhid   = Convert.ToInt32(Session["HH_ID"]);
                int userID = Convert.ToInt32(Session["USER_ID"]);

                ResolutionStatusChange.Visible = false;
                screenIntialization(hhid);

                Getcategory();
                Getresolby();
                Getactionby();
                BindGrid();
                lnkGrievances.Visible = false;
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_GRIEVANCES) == false)
                {
                    lnkGrievances.Visible = false;
                    btnSave.Visible       = false;
                    btnClear.Visible      = false;
                    lnkUploadDoc.Visible  = false;
                    grdgrvlist.Columns[grdgrvlist.Columns.Count - 1].Visible = false;
                    grdgrvlist.Columns[grdgrvlist.Columns.Count - 2].Visible = false;
                    grdgrvlist.Columns[grdgrvlist.Columns.Count - 3].Visible = false;
                }
            }



            // checkGrievanceApprovalExitOrNot();
            //projectFrozen();
            if (Mode == "Readonly")
            {
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible             = false;
                lnkGrievances.Visible         = false;
                btnSave.Visible               = false;
                btnClear.Visible              = false;
                lnkUploadDoc.Visible          = false;
                grdgrvlist.Columns[4].Visible = false;
                grdgrvlist.Columns[5].Visible = false;
            }
        }
Пример #4
0
        /// <summary>
        /// Set Page header,Call  bindDDLDwelling() to bind the Dwelling data to the dropDown
        /// call bindDDLTenure() to bind the Tenure data to the DropDown
        /// call  bindDDLRoofs() to bind the DDlRoofs data to the dropdown
        /// call bindDDLWall() to bind the Wall data to the respective dropdown
        /// call bindDDLFloor() to bind the Floor data to the respective dropdown
        /// call BindGrid() method to Bind the data to the GridView
        /// to set the status of the Link button lnkLandInfoResOFF,lnkLogout
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        #region PageEvents
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            CompSocioEconomyMenu1.HighlightMenu = CompSocioEconomyMenu.MenuValue.OffAffectedLand;
            ViewMasterCopy1.HighlightMenu       = ViewMasterCopy.MenuValue.LivingoffAffectedLand;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            if (!Page.IsPostBack)
            {
                Master.PageHeader = "Socio-Economic - Land Information - Respondents living off Affected Plot";

                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Socio-Economic - Land Information - Respondents living off Affected Plot";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                ViewState["LIVINGOFFID"] = 0;
                bindDDLDwelling();
                bindDDLTenure();
                bindDDLRoofs();
                bindDDLWall();
                bindDDLFloor();
                BindGrid(false, false);
                projectFrozen();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIO_ECONOMIC) == false)
                {
                    lnkLandInfoResOFF.Visible = false;
                    btnSave.Visible           = false;
                    btnClear.Visible          = false;
                    grdLandInfoRespondentsOff.Columns[grdLandInfoRespondentsOff.Columns.Count - 1].Visible = false;
                    grdLandInfoRespondentsOff.Columns[grdLandInfoRespondentsOff.Columns.Count - 2].Visible = false;
                }
            }
            if (Mode == "Readonly")
            {
                CompSocioEconomyMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible         = false;
                lnkLandInfoResOFF.Visible = false;
                btnSave.Visible           = false;
                btnClear.Visible          = false;
                grdLandInfoRespondentsOff.Columns[grdLandInfoRespondentsOff.Columns.Count - 1].Visible = false;
                grdLandInfoRespondentsOff.Columns[grdLandInfoRespondentsOff.Columns.Count - 2].Visible = false;
            }
        }
Пример #5
0
        /// <summary>
        /// Set Page header,Call BindDropDownDistrict() to bind the district names to the dropdownlist
        /// call GetLandInfo() to bind the Land Info to the dropDown
        /// Call DisplayPanel() to set the status of the panel
        /// to set the status of the link button lnkLandInfoResOn
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            CompSocioEconomyMenu1.HighlightMenu = CompSocioEconomyMenu.MenuValue.OnAffectedLand;
            ViewMasterCopy1.HighlightMenu       = ViewMasterCopy.MenuValue.LivingonAffectedLand;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Socio-Economic - Land Information - Respondents living on Affected Plot";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                txtYesLandHold.Enabled = false;
                BindDropDownDistrict();
                GetLandInfo();
                DisplayPanel();
                projectFrozen();
                chkFamilyMember.Attributes.Add("onclick", string.Format("EnableBuried(this,'{0}');", txtBuried.ClientID));

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIO_ECONOMIC) == false)
                {
                    lnkLandInfoResOn.Visible = false;
                    btnSave.Visible          = false;
                    btnClear.Visible         = false;
                }
            }
            if (Mode == "Readonly")
            {
                CompSocioEconomyMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible        = false;
                lnkLandInfoResOn.Visible = false;
                btnSave.Visible          = false;
                btnClear.Visible         = false;
            }
        }
Пример #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)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            ValuationMenu1.HighlightMenu     = ValuationMenu.MenuValue.OtherFixtures;
            OtherFixturesMenu1.HighlightMenu = OtherFixturesMenu.MenuValue.Grave;
            ViewMasterCopy1.HighlightMenu    = ViewMasterCopy.MenuValue.Grave;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Valuation - Other Fixtures";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                ViewState["PAP_GRAVEID"] = 0;

                // To get type of Grave from MST_GRAVEFINISH
                GetGraveFinish();
                BindGrid();

                lengthTextBox.Attributes.Add("onchange", "surfacearea();");
                widthTextBox.Attributes.Add("onchange", "surfacearea();");
                surfaceareaTextBox.Attributes.Add("onKeyDown", "doCheck();");

                popupData();
                //lnkViewPhoto.Visible = false;

                lengthTextBox.Attributes.Add("onblur", "setDirtyText();");
                widthTextBox.Attributes.Add("onblur", "setDirtyText();");
                depreciatedvalueTextBox.Attributes.Add("onchange", "setDirtyText();");

                projectFrozen();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_VALUATION) == false)
                {
                    lnkGrave.Visible = false;
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdGrave.Columns[grdGrave.Columns.Count - 1].Visible = false;
                    grdGrave.Columns[grdGrave.Columns.Count - 2].Visible = false;
                    grdGrave.Columns[grdGrave.Columns.Count - 4].Visible = false;
                }
            }

            if (Mode == "Readonly")
            {
                ValuationMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible = false;
                lnkGrave.Visible  = false;
                btnSave.Visible   = false;
                btnClear.Visible  = false;
                grdGrave.Columns[grdGrave.Columns.Count - 1].Visible = false;
                grdGrave.Columns[grdGrave.Columns.Count - 2].Visible = false;
                grdGrave.Columns[grdGrave.Columns.Count - 4].Visible = false;
            }
        }
Пример #7
0
        /// <summary>
        /// Check User permitions
        /// Set Page Header
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            if (Session["PROJECT_CODE"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            Page.Response.Cache.SetNoStore();

            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Compensation Packages";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }
                checkApprovalExitOrNot();
                LoadComponestion();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_PACKAGE_DOCUMENTS) == false)
                {
                    lnkValuationPCI.Visible = false;
                    foreach (RepeaterItem item1 in rptPKGDoccatName.Items)
                    {
                        Repeater rptDOCitem = (Repeater)item1.FindControl("rptDOCitem");
                        thPrint.Visible    = false;
                        thApprover.Visible = false;
                        foreach (RepeaterItem item in rptDOCitem.Items)
                        {
                            System.Web.UI.HtmlControls.HtmlTableCell tdPrintButton    = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdPrintButton");
                            System.Web.UI.HtmlControls.HtmlTableCell tdApproverButton = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdApproverButton");
                            tdPrintButton.Visible    = false;
                            tdApproverButton.Visible = false;
                        }
                    }
                }
            }

            if (Mode == "Readonly")
            {
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible       = false;
                lnkValuationPCI.Visible = false;

                foreach (RepeaterItem item1 in rptPKGDoccatName.Items)
                {
                    Repeater rptDOCitem = (Repeater)item1.FindControl("rptDOCitem");
                    thPrint.Visible    = false;
                    thApprover.Visible = false;
                    thStatus.Visible   = true;
                    foreach (RepeaterItem item in rptDOCitem.Items)
                    {
                        System.Web.UI.HtmlControls.HtmlTableCell tdPrintButton    = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdPrintButton");
                        System.Web.UI.HtmlControls.HtmlTableCell tdApproverButton = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdApproverButton");
                        System.Web.UI.HtmlControls.HtmlTableCell tdStatusButton   = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdStatusButton");
                        tdPrintButton.Visible    = false;
                        tdApproverButton.Visible = false;
                        tdStatusButton.Visible   = true;
                    }
                }
            }
        }
Пример #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)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            ValuationMenu1.HighlightMenu  = ValuationMenu.MenuValue.PermanentBuildings;
            ViewMasterCopy1.HighlightMenu = ViewMasterCopy.MenuValue.PermanentBuilding;
            Page.Response.Cache.SetNoStore();
            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Valuation - Permanent Buildings";
                }
                else
                {
                    Response.Redirect("~/UI/Project/ViewProjects.aspx");
                }

                ViewState["PERM_STRUCTUREID"] = 0; // ViewState ID
                BindGrid(false, false);            //Calling the Grid Data

                GetStructureTypeData();

                GetRoofMaterial();

                GetWallmaterial();

                GetFloorMaterial();

                GetWindowMaterial();

                GetOccupantStatus();

                GetConditionData();

                txtbxDepreciatedValue.Attributes.Add("onblur", "CalculateAmount();");
                txtbxReplacementValue.Attributes.Add("onblur", "CalculateAmount();");
                txtbxReplacementUplift.Attributes.Add("onKeyDown", "doCheck();");

                txtbxLength.Attributes.Add("onchange", "surfacearea();");
                txtbxWidth.Attributes.Add("onchange", "surfacearea();");
                txtbxSurfaceArea.Attributes.Add("onKeyDown", "doCheck();");


                txtbxDepreciatedValue.Attributes.Add("onchange", "setDirtyText();");
                txtbxReplacementValue.Attributes.Add("onchange", "setDirtyText();");


                RbtnSelf.Attributes.Add("onclick", "EnableDisableOtherOwner(0);");
                RbtnOther.Attributes.Add("onclick", "EnableDisableOtherOwner(1);");
                RdbtnSelfoccupied.Attributes.Add("onclick", "EnableDisableOtherOccupant(0);");
                RdbtnOccupantOther.Attributes.Add("onclick", "EnableDisableOtherOccupant(1);");

                ddlOccupantStatus.Attributes.Add("onchange", "EnableDisableOtherOccupantStatus(this);");

                popupData();
                //lnkViewPhoto.Visible = false;

                projectFrozen();

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_VALUATION) == false)
                {
                    lnkPermBuild.Visible = false;
                    btnSave.Visible      = false;
                    btnClear.Visible     = false;
                    grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 1].Visible = false;
                    grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 2].Visible = false;
                    grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 4].Visible = false;
                }
            }

            if (Mode == "Readonly")
            {
                ValuationMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible    = false;
                lnkPermBuild.Visible = false;
                btnSave.Visible      = false;
                btnClear.Visible     = false;
                grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 1].Visible = false;
                grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 2].Visible = false;
                grdPermanentBuilding.Columns[grdPermanentBuilding.Columns.Count - 4].Visible = false;
            }
        }
Пример #9
0
        /// <summary>
        /// to Set Page header,Call BindDiseases() to get the all diease data from the database
        /// call BindDisabilities() to bind the disability data from the database to the dropdown
        /// call BindDisabilityGrid to bind the Disability data from the database by HHId
        /// call GetHealthCenter() to get the HealthCenter Data from the database
        /// call BindHIVContracted() to get the HIV Contracted Data from the database
        /// call GetHealthInfo() to get the health info records from the database
        /// set the status of the Link Button lnkPAPHealthDisability,lnkPAPHealthInfo
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string Mode = string.Empty;

            if (Request.QueryString["ProjectID"] != null)
            {
                Session["PROJECT_ID"] = Convert.ToInt32(Request.QueryString["ProjectID"]);
                if (Request.QueryString["HHID"] != null)
                {
                    Session["HH_ID"] = Convert.ToInt32(Request.QueryString["HHID"]);
                }
                else
                {
                    Session["HH_ID"] = null;
                }
                Session["PROJECT_CODE"] = Request.QueryString["ProjectCode"].ToString();
                Mode = Request.QueryString["Mode"].ToString();
            }
            CompSocioEconomyMenu1.HighlightMenu = CompSocioEconomyMenu.MenuValue.Health;
            ViewMasterCopy1.HighlightMenu       = ViewMasterCopy.MenuValue.HealthCareDetails;
            ViewMasterCopy2.HighlightMenu       = ViewMasterCopy.MenuValue.DisabilityDetails;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (Session["USER_ID"] == null)
            {
                Response.Redirect("~/Login.aspx");
            }
            if (Session["PROJECT_ID"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            if (!IsPostBack)
            {
                chkUsedByFamily.Attributes.Add("onclick", string.Format("EnableBuried(this,'{0}');", txtNonUseReason.ClientID));
                Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - Socio-Economic - Health Information";

                ViewState["HEALTH_ID"] = 0;

                BindDiseases();
                BindDisabilities();
                BindDisabilityGrid();
                GetHealthCenter();
                BindHIVContracted();
                GetHealthInfo();
                projectFrozen();
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIO_ECONOMIC) == false)
                {
                    lnkPAPHealthDisability.Visible = false;
                    lnkPAPHealthInfo.Visible       = false;
                    btnSaveDisability.Visible      = false;
                    btnClearDisability.Visible     = false;
                    btnSaveHealthInfo.Visible      = false;
                    btnClearHealthInfo.Visible     = false;
                    grdDisabilities.Columns[grdDisabilities.Columns.Count - 1].Visible = false;
                    grdDisabilities.Columns[grdDisabilities.Columns.Count - 2].Visible = false;
                    grdDisabilities.Columns[grdDisabilities.Columns.Count - 3].Visible = false;
                }
            }
            if (Mode == "Readonly")
            {
                CompSocioEconomyMenu1.Visible = false;
                Label userNameLabel = (Label)Master.FindControl("userNameLabel");
                userNameLabel.Visible = false;
                LinkButton lnkLogout = (LinkButton)Master.FindControl("lnkLogout");
                lnkLogout.Visible = false;
                Menu NavigationMenu = (Menu)Master.FindControl("NavigationMenu");
                NavigationMenu.Visible = false;
                ImageButton imgSearch = (ImageButton)HouseholdSummary1.FindControl("imgSearch");
                imgSearch.Visible = false;
                lnkPAPHealthDisability.Visible     = false;
                lnkPAPHealthInfo.Visible           = false;
                btnSaveDisability.Visible          = false;
                btnClearDisability.Visible         = false;
                btnSaveHealthInfo.Visible          = false;
                btnClearHealthInfo.Visible         = false;
                grdDisabilities.Columns[3].Visible = false;
                grdDisabilities.Columns[4].Visible = false;
                grdDisabilities.Columns[5].Visible = false;
            }
        }