Esempio 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)
        {
            if (!IsPostBack)
            {
                Master.PageHeader       = "Type of Line";
                ViewState["LineTypeId"] = 0;
                BindGrid(-1);
                txtLineType.Attributes.Add("onchange", "setDirtyText();");
                txtRightOfWay.Attributes.Add("onchange", "setDirtyText();");
                txtWayleave.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_MST_PROJECT) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    dv_Details.Columns[4].Visible = false;
                    dv_Details.Columns[5].Visible = false;
                    dv_Details.Columns[6].Visible = false;
                    foreach (GridViewRow grRow in dv_Details.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio 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)
        {
            if (!IsPostBack)
            {
                Master.PageHeader          = "Social Support";
                ViewState["SUPPORTEDBYID"] = 0;
                BindGrid(false, false);
                txtSupportedBy.Attributes.Add("onchange", "isDirty = 1;");
                txtSupportedBy.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    gvSupportedBy.Columns[2].Visible = false;
                    gvSupportedBy.Columns[3].Visible = false;
                    gvSupportedBy.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in gvSupportedBy.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio 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)
        {
            if (Session["USERNAME"] != null)
            {
                string userName = (Session["USERNAME"].ToString());
            }
            if (!IsPostBack)
            {
                Master.PageHeader = "Current School Status";
                ViewState["CurrentSchoolStatusID"] = 0;
                BindGrid();
                txtCurrSchlStatus.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_EDUCATION) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    gvCurSchlStatus.Columns[3].Visible = false;
                    gvCurSchlStatus.Columns[4].Visible = false;
                    gvCurSchlStatus.Columns[5].Visible = false;
                    foreach (GridViewRow grRow in gvCurSchlStatus.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio 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)
        {
            if (!IsPostBack)
            {
                Master.PageHeader           = "Relationship";
                ViewState["RELATIONSHIPID"] = 0;
                BindGrid(true, false);
                //txtrel.Attributes.Add("onchange","isDirty = 1;");
                txtrel.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    btn_Save.Visible  = false;
                    btn_Clear.Visible = false;
                    grdRelationship.Columns[2].Visible = false;
                    grdRelationship.Columns[3].Visible = false;
                    grdRelationship.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in grdRelationship.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - MAXCAP";
                }
                else
                {
                    Response.Redirect("ViewProjects.aspx");
                }
                //Master.PageHeader = "MAXCAP";
                ViewState["MAXCAPID"] = 0;
                GetDistrictName();
                BindGrid();
                getFrozen();
                txtMaxCap.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.CREATE_PROJECT) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdDistrict.Columns[grdDistrict.Columns.Count - 1].Visible = false;
                    grdDistrict.Columns[grdDistrict.Columns.Count - 2].Visible = false;
                    grdDistrict.Columns[grdDistrict.Columns.Count - 3].Visible = false;
                }
            }
        }
Esempio 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.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;
                }
            }
        }
Esempio 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)
            {
                Master.PageHeader             = "PAP Status";
                ViewState["PAPDESIGNATIONID"] = 0;  // ViewState ID
                BindGrid(false, false);
                pstatusTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_MST_PROJECT) == false)
                {
                    SaveButton.Visible            = false;
                    ClearButton.Visible           = false;
                    grdpstatus.Columns[2].Visible = false;
                    grdpstatus.Columns[3].Visible = false;
                    grdpstatus.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in grdpstatus.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Check User Permitions and Call Bind grid Method
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["PROJECT_CODE"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            caldpBatchFromDate.Format = UtilBO.DateFormat;
            CaldpBatchToDate.Format   = UtilBO.DateFormat;

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

            //ViewStateProjectId = Convert.ToInt32(Request.QueryString["projID"]);
            //ViewStateProjectId = Convert.ToInt32(Session["PROJECT_ID"]);

            if (!IsPostBack)
            {
                //ViewState["BATCH_PROJECT_ID"] = Request.QueryString["projID"];
                ViewState["BATCH_PROJECT_ID"] = Convert.ToInt32(Session["PROJECT_ID"]);
                //if (ViewState["BATCH_PROJECT_ID"] != null)
                //    ViewStateProjectId = Convert.ToInt32(ViewState["BATCH_PROJECT_ID"]);
                dpBatchFromDate.Attributes.Add("readonly", "readonly");
                dpBatchToDate.Attributes.Add("readonly", "readonly");
                BindRepeater();
                //  checkForApprover();PRIV_BATCH_PAYMENT
                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_BATCH_PAYMENT) == false)
                {
                    btnSubmitForPayment.Visible = false;
                    grdPaymentRequestBatch.Columns[grdPaymentRequestBatch.Columns.Count - 1].Visible = false;
                }
            }
        }
Esempio 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)
        {
            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"));
                }
            }
        }
Esempio 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)
        {
            if (!IsPostBack)
            {
                Master.PageHeader           = "Health Center";
                ViewState["HEALTHCENTERID"] = 0; // ViewState ID
                BindGrid(false, false);          //Calling the Grid Data
                HealthCenterNameTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_HEALTH_CENTER) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    grdHealtCenter.Columns[grdHealtCenter.Columns.Count - 1].Visible = false;
                    grdHealtCenter.Columns[grdHealtCenter.Columns.Count - 2].Visible = false;
                    grdHealtCenter.Columns[grdHealtCenter.Columns.Count - 3].Visible = false;
                    foreach (GridViewRow grRow in grdHealtCenter.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 11
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 (Session["userName"] != null)
            {
                //Retrieving UserName from Session
                string userName = (Session["userName"].ToString());
                string uID      = Session["USER_ID"].ToString();
            }
            if (!IsPostBack)
            {
                Master.PageHeader = "Never Attended School";
                ViewState["NVR_ATT_SCH_REASONID"] = 0; // ViewState ID
                BindGrid(false, false);                //Calling the Grid Data
                // NeverAttndSchlTextBox.Attributes.Add("onclick", "isDirty=1;");
                NeverAttndSchlTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_EDUCATION) == false)
                {
                    saveButton.Visible             = false;
                    ClearButton.Visible            = false;
                    grdNASchool.Columns[3].Visible = false;
                    grdNASchool.Columns[4].Visible = false;
                    grdNASchool.Columns[5].Visible = false;
                    foreach (GridViewRow grRow in grdNASchool.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 12
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)
            {
                Master.PageHeader             = "Consultant Type";
                ViewState["consultantTypeID"] = 0;  // ViewState ID
                BindGrid(false, false);
                consultanttypeTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_CONSULTANT_TYPE) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    grdconsultanttype.Columns[grdconsultanttype.Columns.Count - 1].Visible = false;
                    grdconsultanttype.Columns[grdconsultanttype.Columns.Count - 2].Visible = false;
                    grdconsultanttype.Columns[grdconsultanttype.Columns.Count - 3].Visible = false;
                    foreach (GridViewRow grRow in grdconsultanttype.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 13
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)
     {
         Master.PageHeader      = "Culture Property Type";
         ViewState["CONCERNID"] = 0; // ViewState ID
         BindGrid(false, false);     //Calling the Grid Data
         if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.Cul_Property_Type) == false)
         {
             SaveButton.Visible  = false;
             ClearButton.Visible = false;
             grdCultureProp.Columns[2].Visible = false;
             grdCultureProp.Columns[3].Visible = false;
             grdCultureProp.Columns[4].Visible = false;
             foreach (GridViewRow grRow in grdCultureProp.Rows)
             {
                 if (grRow.RowType == DataControlRowType.DataRow)
                 {
                     CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                     chk.Enabled = false;
                 }
             }
         }
     }
 }
Esempio n. 14
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)
            {
                Master.PageHeader             = "Consultant Type";
                ViewState["GRIEVANCECATEGID"] = 0;  // ViewState ID
                BindGrid(false, false);

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.Grievances_Category) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    grdGrievancesCategory.Columns[grdGrievancesCategory.Columns.Count - 1].Visible = false;
                    grdGrievancesCategory.Columns[grdGrievancesCategory.Columns.Count - 2].Visible = false;
                    grdGrievancesCategory.Columns[grdGrievancesCategory.Columns.Count - 3].Visible = false;
                    foreach (GridViewRow grRow in grdGrievancesCategory.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 15
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 (Session["USERNAME"] != null)
            {
                string userName = (Session["USERNAME"].ToString());
            }
            if (!IsPostBack)
            {
                Master.PageHeader       = "Crop Type";
                ViewState["CROPTYPEID"] = 0;
                BindGrid();
                txtCropType.Attributes.Add("onchange", "isDirty = 1;");
                //Getunitofmeasure();

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_CROP) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    gvCropType.Columns[2].Visible = false;
                    gvCropType.Columns[3].Visible = false;
                    gvCropType.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in gvCropType.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 16
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;
                }
            }
        }
Esempio n. 17
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 (Session["userName"] != null)
            {
                string userName = (Session["userName"].ToString());
                string uID      = Session["USER_ID"].ToString();
            }

            if (!IsPostBack)
            {
                Master.PageHeader = "Welfare Indicator";
                ViewState["WelfareIndicatorID"] = 0;
                BindGrid();
                //txtWelfareIndicator.Attributes.Add("onchange", "isDirty = 1;");
                txtWelfareIndicator.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_OPTION_GROUP) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdWelfareIndicator.Columns[3].Visible = false;
                    grdWelfareIndicator.Columns[4].Visible = false;
                    grdWelfareIndicator.Columns[5].Visible = false;
                }
            }
        }
Esempio n. 18
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 (Session["userName"] != null)
     {
         string userName = (Session["userName"].ToString());
         string uID      = Session["USER_ID"].ToString();
     }
     if (!IsPostBack)
     {
         Master.PageHeader           = "Crop Diameter";
         ViewState["CropDiaMeterID"] = 0;
         BindGrid();
         CropDiameterIDTextBox.Text = "0";
         CropDiameterTextBox.Attributes.Add("onchange", "isDirty = 1;");
         if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_CROP) == false)
         {
             SaveButton.Visible  = false;
             ClearButton.Visible = false;
             grdCropDiameter.Columns[2].Visible = false;
             grdCropDiameter.Columns[3].Visible = false;
             grdCropDiameter.Columns[4].Visible = false;
             foreach (GridViewRow grRow in grdCropDiameter.Rows)
             {
                 if (grRow.RowType == DataControlRowType.DataRow)
                 {
                     CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                     chk.Enabled = false;
                 }
             }
         }
     }
 }
Esempio n. 19
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)
            {
                Master.PageHeader            = "Mode of Payment";
                ViewState["ModeofPaymentID"] = 0;
                BindGrid();
                txtModeofPaymentID.Text = "0";
                rdoTypeCash.Checked     = true;
                txtModeofPayment.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_MODE_OF_PAYMENT) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdModeofPayment.Columns[2].Visible = false;
                    grdModeofPayment.Columns[3].Visible = false;
                    grdModeofPayment.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in grdModeofPayment.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 20
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 (Session["userName"] != null)
            {
                string userName = (Session["userName"].ToString());
                string uID      = Session["USER_ID"].ToString();
            }
            if (!IsPostBack)
            {
                Master.PageHeader         = "CDAP Budget Item";
                ViewState["CDAPBUDGETID"] = 0;
                BindGrid();
                txtBudgetItem.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdBudgetItem.Columns[3].Visible = false;
                    grdBudgetItem.Columns[4].Visible = false;
                    grdBudgetItem.Columns[5].Visible = false;
                    foreach (GridViewRow grRow in grdBudgetItem.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 21
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        #region Page Load
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Master.PageHeader       = "Wall Type";
                ViewState["WallTypeID"] = 0;
                BindGrid(false, false);
                //txtWallType.Attributes.Add("onchange", "isDirty = 1;");
                txtWallType.Attributes.Add("onchange", "setDirtyText();");
                //   ClearDetails();

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_STRUCTURE) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdWallType.Columns[3].Visible = false;
                    grdWallType.Columns[4].Visible = false;
                    grdWallType.Columns[5].Visible = false;
                    foreach (GridViewRow grRow in grdWallType.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 22
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 (Session["userName"] != null)
            {
                //Retrieving UserName from Session
                string userName = (Session["userName"].ToString());
                string uID      = Session["USER_ID"].ToString();
            }
            if (!IsPostBack)
            {
                Master.PageHeader        = "Literacy Status";
                ViewState["LitStatusID"] = 0;
                BindGrid(false, false);
                ClearDetails();

                txtLiteracyStatus.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_EDUCATION) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    grdLitStatus.Columns[3].Visible = false;
                    grdLitStatus.Columns[4].Visible = false;
                    grdLitStatus.Columns[5].Visible = false;
                    foreach (GridViewRow grRow in grdLitStatus.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 23
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)
            {
                Master.PageHeader = "M&amp;E Goal Element";
                BindGrid();
                ViewState["GOALELEMENTID"] = 0;

                txtGoalElement.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_MNE) == false)
                {
                    btnSave.Visible = false;
                    btnClr.Visible  = false;
                    gvGoalElement.Columns[2].Visible = false;
                    gvGoalElement.Columns[3].Visible = false;
                    gvGoalElement.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in gvGoalElement.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 24
0
        /// <summary>
        /// Set Page header,Call BindGrid() method
        /// Check User Permitions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        #region for pageload Screen Intialliation
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Master.PageHeader            = "Disability";
                ViewState["VulnerabilityID"] = 0;
                BindGrid();
                //txtVulnerability.Attributes.Add("onchange", "isDirty = 1;");
                txtVulnerability.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    dv_Details.Columns[2].Visible = false;
                    dv_Details.Columns[3].Visible = false;
                    dv_Details.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in dv_Details.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 25
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)
            {
                Master.PageHeader = "GOU Allowance";
                ViewState["GOUALLOWANCECATEGORYID"] = 0;
                BindGrid();

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.GOUAllowance) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                    gv_Details.Columns[gv_Details.Columns.Count - 1].Visible = false;
                    gv_Details.Columns[gv_Details.Columns.Count - 2].Visible = false;
                    gv_Details.Columns[gv_Details.Columns.Count - 3].Visible = false;
                    foreach (GridViewRow grRow in gv_Details.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 26
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)
            {
                Master.PageHeader         = "Structure Tenure";
                ViewState["STR_TENUREID"] = 0;
                BindGrid(false, false);
                //txtStructuretenure.Attributes.Add("onchange", "isDirty = 1;");
                txtStructuretenure.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_TENURE) == false)
                {
                    btn_Save.Visible      = false;
                    btn_Clear.Visible     = false;
                    btnShowAdd.Visible    = false;
                    btnSearch.Visible     = false;
                    btnShowSearch.Visible = false;
                    GrdStructureTenure.Columns[2].Visible = false;
                    GrdStructureTenure.Columns[3].Visible = false;
                    GrdStructureTenure.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in GrdStructureTenure.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 27
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)
        {
            DataTable dt = new System.Data.DataTable();

            if (!IsPostBack)
            {
                Master.PageHeader           = "Budget Estimation Category";
                ViewState["BGT_CATEGORYID"] = 0; // ViewState ID
                BindGrid(false, false);          //Calling the Grid Data
                CategoryTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_BUDGET_EST_CATEGORY) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    grdCategory.Columns[grdCategory.Columns.Count - 1].Visible = false;
                    grdCategory.Columns[grdCategory.Columns.Count - 2].Visible = false;
                    grdCategory.Columns[grdCategory.Columns.Count - 3].Visible = false;
                    foreach (GridViewRow grRow in grdCategory.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 28
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)
            {
                Master.PageHeader      = "Concern";
                ViewState["CONCERNID"] = 0; // ViewState ID
                BindGrid(false, false);     //Calling the Grid Data
                ConcernTextBox.Attributes.Add("onchange", "setDirtyText(this," + SaveButton.ClientID + ");");


                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    SaveButton.Visible            = false;
                    ClearButton.Visible           = false;
                    grdConcern.Columns[2].Visible = false;
                    grdConcern.Columns[3].Visible = false;
                    grdConcern.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in grdConcern.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 29
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 (Session["userName"] != null)
            {
                //Retrieving UserName from Session
                string userName = (Session["userName"].ToString());
                string uID      = Session["USER_ID"].ToString();
            }
            if (!IsPostBack)
            {
                Master.PageHeader         = "Social Occupation";
                ViewState["OCCUPATIONID"] = 0; // ViewState ID
                BindGrid(false, false);        //Calling the Grid Data
                // MainOccupationTextBox.Attributes.Add("onchange", "isDirty = 1;");
                MainOccupationTextBox.Attributes.Add("onchange", "setDirtyText();");

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_SOCIAL) == false)
                {
                    SaveButton.Visible  = false;
                    ClearButton.Visible = false;
                    grdOccupation.Columns[2].Visible = false;
                    grdOccupation.Columns[3].Visible = false;
                    grdOccupation.Columns[4].Visible = false;
                    foreach (GridViewRow grRow in grdOccupation.Rows)
                    {
                        if (grRow.RowType == DataControlRowType.DataRow)
                        {
                            CheckBox chk = (CheckBox)grRow.FindControl("IsObsolete");
                            chk.Enabled = false;
                        }
                    }
                }
            }
        }
Esempio n. 30
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)
        {
            if (Session["PROJECT_CODE"] == null)
            {
                Response.Redirect("~/UI/Project/ViewProjects.aspx");
            }
            if (Session["HH_ID"] == null)
            {
                Response.Redirect("~/UI/Compensation/PAPList.aspx");
            }
            calDeliveryDate.Format = UtilBO.DateFormat;

            if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "MasterJS"))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MasterJS",
                                                            CreateStartupScript());
            }
            if (!IsPostBack)
            {
                Master.PageHeader = "Compensation Financial";

                txtValuationAfterMaxCap.Attributes.Add("readonly", "readonly");
                //txtValuationAfterMaxCap.Attributes.Add("disabled", "disabled");
                //chkMaxCapCase.Attributes.Add("disabled", "disable");
                chkMaxCapCase.Enabled = false;

                if (Session["PROJECT_CODE"] != null)
                {
                    Master.PageHeader = Session["PROJECT_CODE"].ToString() + " - " + "Compensation Financial";
                }
                ClearItems();
                int HH_ID = 0;
                if (Session["PROJECT_ID"] != null)
                {
                    BindDeliveredBy();
                }
                if (Session["HH_ID"] != null)
                {
                    HH_ID = Convert.ToInt32(Session["HH_ID"]);
                    if (HH_ID > 0)
                    {
                        LoadData();
                    }
                }

                Load_RoundOffValue();//getting the Round Off Value From the DB

                if (CheckAuthorization.HasUpdatePrivilege(UtilBO.PrivilegeCode.PRIV_COMPENSATION_FINANCIALS) == false)
                {
                    btnSave.Visible  = false;
                    btnClear.Visible = false;
                }
            }
        }