protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());
        BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
        }
        if (objUA.Edit == 0)
        {
            btnApprove.Visible      = false;
            btnFinalizeEval.Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
        if (objUA.Delete == 0)
        {
            // You don't have sufficient previlege to access the requested page.
        }
    }
예제 #2
0
    protected void UserAccessValidation()
    {
        int CurrentUserID = GetSessionUserID();

        string PageURL = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            ImgAdd.Visible = false;
        }
        if (objUA.Edit == 1)
        {
            uaEditFlag = true;
        }
        else
        {
            btnSaveUserDetails.Visible = false;
        }
        if (objUA.Delete == 1)
        {
            uaDeleteFlage = true;
        }
    }
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            imgAttach.Visible = false; //  ucPurcAttachment1.Visible = false;
        }
        if (objUA.Edit == 0)
        {
            btnSavePODetails.Visible = false;
        }
        if (objUA.Approve == 0)
        {
            btnApprove.Visible = false;
        }
        if (objUA.Delete == 0)
        {
            btnDeleteLO.Visible  = false;
            btnCancelLPO.Visible = false;
        }
    }
예제 #4
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.IsAdmin == 0)
        {
            if (objUA.View == 0)
            {
                Response.Write("You don't have sufficient previlege to access the requested page.");
                Response.End();
            }
            if (objUA.Add == 0)
            {
                lnkAddAttachment.Visible = false;
            }
            if (objUA.Edit == 0)
            {
            }
            if (objUA.Delete == 0)
            {
            }
            if (objUA.Approve == 0)
            {
            }
        }
    }
예제 #5
0
    protected void UserAccessValidation()
    {
        try
        {
            int    CurrentUserID = Convert.ToInt32(Session["userid"]);
            string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());
            SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

            objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

            if (objUA.View == 0)
            {
                Response.Redirect("~/default.aspx?msgid=1");
            }

            if (objUA.Add == 0)
            {
            }
            if (objUA.Edit == 0)
            {
                gvSeniorityRecords.Columns[gvSeniorityRecords.Columns.Count - 3].Visible = false;
            }
            if (objUA.Approve == 0)
            {
            }
            if (objUA.Delete == 0)
            {
                gvSeniorityRecords.Columns[gvSeniorityRecords.Columns.Count - 2].Visible = false;
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
예제 #6
0
    protected void UserAccessValidation()
    {
        string PageURL = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(GetSessionUserID(), PageURL);

        if (objUA.View == 0)
        {
            MainDiv.Visible      = false;
            AccessMsgDiv.Visible = true;
        }
        else
        {
            MainDiv.Visible      = true;
            AccessMsgDiv.Visible = false;
        }

        if (objUA.Add == 0)
        {
            GridView_Certificate.Columns[GridView_Certificate.Columns.Count - 1].Visible = false;
            GridView_Certificate.Columns[GridView_Certificate.Columns.Count - 2].Visible = false;
        }
    }
예제 #7
0
    protected void UserAccessValidation()
    {
        try
        {
            int    CurrentUserID = GetSessionUserID();
            string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

            SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
            SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
            objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

            if (objUA.View == 0)
            {
                Response.Redirect("~/default.aspx?msgid=1");
            }

            if (objUA.Add == 0)
            {
                ImgBtnAddFollowup.Visible = false;
                pnlAddAttachment.Visible  = false;
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
예제 #8
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
        }
        if (objUA.Edit == 0)
        {
        }
        if (objUA.Approve == 0)
        {
        }
        if (objUA.Delete == 0)
        {
        }
    }
예제 #9
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);


        if (objUA.View == 0)
        {
            MainDiv.Visible      = false;
            AccessMsgDiv.Visible = true;
        }
        else
        {
            MainDiv.Visible      = true;
            AccessMsgDiv.Visible = false;
        }
        if (objUA.Approve == 0)
        {
            grdSurveylist.Columns[grdSurveylist.Columns.Count - 3].Visible = false;
            grdSurveylist.Columns[grdSurveylist.Columns.Count - 4].Visible = false;
        }
    }
    protected void UserAccessValidation()
    {
        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();

        int    CurrentUserID = Convert.ToInt32(Session["USERID"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            lnkAddNewQuestion.Visible = false;
        }
        if (objUA.Edit == 0)
        {
            grdQuestion.Columns[grdQuestion.Columns.Count - 2].Visible = false;
        }
        if (objUA.Delete == 0)
        {
            grdQuestion.Columns[grdQuestion.Columns.Count - 1].Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }
예제 #11
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx");
        }

        if (objUA.Add == 0)
        {
            ImgAdd.Visible = false;
        }
        if (objUA.Edit == 1)
        {
            uaEditFlag = true;
        }
        else
        {
            ImgSave.Visible = false;
        }
        if (objUA.Delete == 1)
        {
            uaDeleteFlage = true;
        }
    }
예제 #12
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
        }
        if (objUA.Edit == 0)
        {
            gvAllotments.Columns[gvAllotments.Columns.Count - 3].Visible = false;
            btnSaveFlagRemark.Visible = false;
            btnMarkCompleted.Visible  = false;
            btnReOpenFlag.Visible     = false;
        }
        if (objUA.Approve == 0)
        {
        }
        if (objUA.Delete == 0)
        {
            gvAllotments.Columns[gvAllotments.Columns.Count - 2].Visible = false;
        }
    }
예제 #13
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA   = new SMS.Properties.UserAccess();
        BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
        }

        if (objUA.Edit == 0)
        {
        }
        if (objUA.Delete == 0)
        {
        }
        if (objUA.Approve == 0)
        {
        }
    }
예제 #14
0
    protected void UserAccessValidation()
    {
        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();

        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            dvPageContent.Visible = false;
        }
        if (objUA.Add == 0)
        {
            lnkAddNewContract.Visible = false;
        }
        if (objUA.Edit == 0)
        {
            gvContract.Columns[gvContract.Columns.Count - 2].Visible = false;
        }
        if (objUA.Delete == 0)
        {
            gvContract.Columns[gvContract.Columns.Count - 1].Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx");
        }

        if (objUA.Add == 0)
        {
            btnAddItemToExistingContract.Visible = false;
            btnAddToNewContract.Visible          = false;
        }
        if (objUA.Edit == 0)
        {
            btnAddItemToExistingContract.Visible = false;
            btnAddToNewContract.Visible          = false;
        }
        if (objUA.Approve == 0)
        {
        }
        if (objUA.Delete == 0)
        {
            // You don't have sufficient previlege to access the requested page.
        }
    }
예제 #16
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            lblMessage.Text      = "You don't have sufficient previlege to access the requested information.";
            pnlAllotment.Visible = false;
        }
        if (objUA.Add == 0)
        {
            lblMessage.Text      = "You don't have sufficient previlege to access the requested information.";
            pnlAllotment.Visible = false;
        }

        if (objUA.Edit == 0)
        {
        }
        if (objUA.Delete == 0)
        {
        }
        if (objUA.Approve == 0)
        {
        }
    }
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            MainDiv.Visible      = false;
            AccessMsgDiv.Visible = true;
        }
        else
        {
            MainDiv.Visible      = true;
            AccessMsgDiv.Visible = false;
        }

        if (objUA.Add == 0)
        {
            lnkAddNewAuthority.Visible = false;
        }
        if (objUA.Edit == 1)
        {
            uaEditFlag = true;
        }
        if (objUA.Delete == 1)
        {
            uaDeleteFlage = true;
        }
    }
예제 #18
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            btnNewItemItem.Visible      = false;
            btnSaveItemAndAdd.Enabled   = false;
            btnSaveItemAndClose.Enabled = false;

            btnSavePacket.Enabled  = false;
            btnSaveAndSend.Enabled = false;
            btnAddToPacket.Enabled = false;
        }
        if (objUA.Edit == 0)
        {
        }
        if (objUA.Delete == 0)
        {
            GridView_MailItems.Columns[GridView_MailItems.Columns.Count - 1].Visible = false;
            btnDiscardPacket.Enabled = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }
예제 #19
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx");
        }

        if (objUA.Add == 0)
        {
        }
        if (objUA.Edit == 0)
        {
        }
        if (objUA.Approve == 0)
        {
            rgdWebQuoDetails.Columns.FindByUniqueName("AcceptPO_ID").Visible = false;
        }
        if (objUA.Delete == 0)
        {
        }
    }
예제 #20
0
    protected void gridRule_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            ImageButton btnDelete     = (ImageButton)e.Row.FindControl("lnlDelete");
            ImageButton btnEdit       = (ImageButton)e.Row.FindControl("lblEdit");
            int         CurrentUserID = GetSessionUserID();
            string      PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

            SMS.Properties.UserAccess objUA   = new SMS.Properties.UserAccess();
            BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();
            objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

            if (objUA.Edit == 0)
            {
                btnEdit.Visible = false;
            }
            else
            {
                btnEdit.Visible = true;
            }

            if (objUA.Delete == 0)
            {
                btnDelete.Visible = false;
            }
            else
            {
                btnDelete.Visible = true;
            }
        }
    }
예제 #21
0
    protected void UserAccessValidation()
    {
        int CurrentUserID = GetSessionUserID();

        string PageURL = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            GridViewDocType.Columns[GridViewDocType.Columns.Count - 1].Visible = false;
            btnSaveDocType.Enabled       = false;
            btnSaveAttribute.Enabled     = false;
            btnSaveMandatoryRank.Enabled = false;
        }
        if (objUA.Edit == 0)
        {
            GridViewDocType.Columns[GridViewDocType.Columns.Count - 3].Visible = false;
        }
        if (objUA.Delete == 0)
        {
            GridViewDocType.Columns[GridViewDocType.Columns.Count - 2].Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }
예제 #22
0
    protected void UserAccessValidation()
    {
        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();

        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            ImgAdd_C_Status.Visible = false;
            ImgAddStatus.Visible    = false;
        }
        if (objUA.Edit == 0)
        {
            GridView_Status.Columns[2].Visible      = false;
            GridView_Calc_Status.Columns[2].Visible = false;
        }
        if (objUA.Delete == 0)
        {
            GridView_Status.Columns[GridView_Status.Columns.Count - 1].Visible           = false;
            GridView_Calc_Status.Columns[GridView_Calc_Status.Columns.Count - 1].Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }
예제 #23
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);
        ViewState["Admin"] = objUA.Add;
        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }
    }
    /// <summary>
    ///GridView Row Data Bound.
    ///Code written for Configuration fields that are editable
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
            SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
            int CurrentUserID = GetSessionUserID();

            string PageURL = UDFLib.GetPageURL(Request.Path.ToUpper());
            objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label       lbl       = (Label)e.Row.FindControl("lblKey");
                Label       lblD      = (Label)e.Row.FindControl("lblDisplay");
                Label       lblC      = (Label)e.Row.FindControl("lblConfiguration");
                ImageButton imgButton = (ImageButton)e.Row.FindControl("ImgEdit");
                if (lbl.Text == "Addressformat")
                {
                    //  ((RadioButton)e.Row.FindControl("rdbDisplay")).Attributes.Add("onclick", "javascript:checkMutuallyExclusive('" + ((RadioButton)e.Row.FindControl("rdbConf")).ClientID + "','" + ((CheckBox)e.Row.FindControl("rdbDisplay")).ClientID + "')");
                    ((CheckBox)e.Row.FindControl("chkDisplay")).Visible    = false;
                    ((RadioButton)e.Row.FindControl("rdbDisplay")).Visible = true;
                    ((RadioButton)e.Row.FindControl("rdbDisplay")).Text    = "US";
                    //((RadioButton)e.Row.FindControl("rdbConf")).Attributes.Add("onclick", "javascript:checkMutuallyExclusive('" + ((RadioButton)e.Row.FindControl("rdbDisplay")).ClientID + "','" + ((CheckBox)e.Row.FindControl("rdbConf")).ClientID + "')");
                    ((CheckBox)e.Row.FindControl("chkConfidential")).Visible = false;
                    ((RadioButton)e.Row.FindControl("rdbConf")).Visible      = true;
                    ((RadioButton)e.Row.FindControl("rdbConf")).Text         = "International";
                }
                if (lbl.Text == "CF1" || lbl.Text == "CF2" || lbl.Text == "CF3")
                {
                    if (objUA.Admin == 1)
                    {
                        imgButton.Visible = true;
                    }
                    else
                    {
                        imgButton.Visible = false;
                    }
                }
                else
                {
                    imgButton.Visible = false;
                }
            }
        }
        catch (Exception ex) { UDFLib.WriteExceptionLog(ex); }
    }
예제 #25
0
    protected void UserAccessValidation()
    {
        int CurrentUserID = GetSessionUserID();

        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();
        string PageURL = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            grdCrewDoc.Columns[grdCrewDoc.Columns.Count - 1].Visible = false;
        }
        if (objUA.Edit == 0)
        {
        }
        if (objUA.Delete == 0)
        {
        }

        if (objUA.Approve == 0)
        {
        }

        //-- MANNING OFFICE LOGIN --
        if (Session["UTYPE"].ToString() == "MANNING AGENT")
        {
        }
        //-- VESSEL MANAGER -- //
        else if (Session["UTYPE"].ToString() == "VESSEL MANAGER")
        {
        }
        else//--- CREW TEAM LOGIN--
        {
        }
    }
예제 #26
0
    protected void UserAccessValidation()
    {
        int    CurrentUserID = Convert.ToInt32(Session["userid"]);
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();

        try
        {
            objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL + hdfUserdepartmentid.Value);
            if (objUA != null)
            {
                if (objUA.Admin == 0)
                {
                    btnSetDefault.Visible = false;
                }
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
예제 #27
0
    protected void UserAccessValidation()
    {
        SMS.Properties.UserAccess objUA = new SMS.Properties.UserAccess();

        int    CurrentUserID = GetSessionUserID();
        string PageURL       = UDFLib.GetPageURL(Request.Path.ToUpper());

        SMS.Business.Infrastructure.BLL_Infra_UserCredentials objUser = new SMS.Business.Infrastructure.BLL_Infra_UserCredentials();
        objUA = objUser.Get_UserAccessForPage(CurrentUserID, PageURL);

        if (objUA.View == 0)
        {
            Response.Redirect("~/default.aspx?msgid=1");
        }

        if (objUA.Add == 0)
        {
            lnkAddNewCategory.Visible = false;
            lnkAddNewType.Visible     = false;
            lnkAddNewGrade.Visible    = false;
        }
        if (objUA.Edit == 0)
        {
            //GridView_Category.Columns[GridView_Category.Columns.Count - 2].Visible = false;
            //GridView_EvaluationType.Columns[GridView_EvaluationType.Columns.Count - 2].Visible = false;
            //GridView_Grading.Columns[GridView_Grading.Columns.Count - 2].Visible = false;
        }
        if (objUA.Delete == 0)
        {
            //GridView_Category.Columns[GridView_Category.Columns.Count - 1].Visible = false;
            //GridView_EvaluationType.Columns[GridView_EvaluationType.Columns.Count - 1].Visible = false;
            //GridView_Grading.Columns[GridView_Grading.Columns.Count - 1].Visible = false;
        }
        if (objUA.Approve == 0)
        {
        }
    }