Пример #1
0
    private void GetSecurity()
    {
        hidSecurity.Value = CustContMaint.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CustomerContract);
        if (hidSecurity.Value.ToString() == "")
        {
            hidSecurity.Value = "Query";
        }
        else
        {
            hidSecurity.Value = "Full";
        }

        //Response.Write(Session["UserName"].ToString());
        //Response.Write("<br>");
        //Response.Write(hidSecurity.Value.ToString());

        //switch (hidSecurity.Value.ToString())
        //{
        //    case "None":
        //        Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
        //        break;
        //    case "Full":
        //        btnAdd.Visible = true;
        //        break;
        //}
    }
Пример #2
0
    private void GetSecurity()
    {
        hidSecurity.Value = freightAddr.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.FreightAddr);
        if (hidSecurity.Value.ToString() == "")
        {
            hidSecurity.Value = "Query";
        }
        else
        {
            hidSecurity.Value = "Full";
        }

        //Response.Write(Session["UserName"].ToString());
        //Response.Write("<br>");
        //Response.Write(hidSecurity.Value.ToString());

        switch (hidSecurity.Value.ToString())
        {
        case "None":
            Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
            break;

        case "Full":
            btnAdd.Visible = true;
            break;
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ViewState["Operation"] = "";
        lblMessage.Text        = "";

        // Session["UserName"] = "******";

        if (!Page.IsPostBack)
        {
            SetTabIndex();
            Session["CountrySecurity"] = null;
            lnkCode.Attributes.Add("onclick", "Javascript:ShowToolTipAtTop(this.id);return false;");
            Session["CountrySecurity"] = maintanceUtility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.StandardComments);
            //Session["CountrySecurity"] = "testing";
            btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");

            // Fill dropdowns
            BindDropDown(ddlCommentLoc, "LocOnDoc");
            BindDropDown(ddlDocType, "FormType");

            ViewState["Mode"] = "Add";
            BindDataGrid();
            btncheck();
        }

        if (CountrySecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ViewState["Operation"] = "";
            lblMessage.Text        = "";
            SetTabIndex();
            lblDelete.Visible = false;
            if (!Page.IsPostBack)
            {
                Session["CountrySecurity"] = null;
                lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
                Session["CountrySecurity"] = maintenanceUtils.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.GLAccount);
                btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
                ViewState["Mode"] = "Add";
                BindDropDownLocation();
                ddlLocation.SelectedValue = Session["BranchID"].ToString();
                BindDropDownDept();
                BindDataGrid();
                btncheck();
                SelectItem(ddlLocation, Session["BranchID"].ToString());
                upnlEntry.Update();
            }

            if (CountrySecurity == "")
            {
                EnableQueryMode();
            }
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TermsCode = new MaintenanceUtility();
        ViewState["Operation"] = "";
        lblMessage.Text        = "";
        //Session["UserName"] = "******";
        //Session["CountrySecurity"] = "testing";
        //connectionString = PFC.Intranet.MaintenanceApps.MaintenanceUtility.GetConnectionString();
        connectionString = ConfigurationManager.AppSettings["PFCERPConnectionString"].ToString();
        if (!Page.IsPostBack)
        {
            SetTabIndex();
            lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
            Session["CountrySecurity"] = TermsCode.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.TermsCodes);

            btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
            ViewState["Mode"] = "Add";
            BindDataGrid();
            BindColorCodes();
            btncheck();
        }

        if (CountrySecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Ajax.Utility.RegisterTypeForAjax(typeof(PriceCostMaint));
        ViewState["Operation"] = "";
        lblMessage.Text        = "";

        if (!Page.IsPostBack)
        {
            hidFileName.Value = "PriceCostReport_" + Session["UserName"].ToString() + ".xls";

            #region Set Security

            ViewState["PriceCostSecurity"] = SecurityUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.PriceCostOverlayAccess);

            if (ViewState["PriceCostSecurity"].ToString() != "")
            {
                ViewState["PriceCostSecurity"] = "Full";
            }

            #endregion

            BindDropdowns();
            ViewState["GridViewMode"] = "getgridlines";
            //btnSearch_Click(this.Page, new ImageClickEventArgs(0, 0));
        }

        if (ViewState["PriceCostSecurity"].ToString() == "")
        {
            btnAdd.Visible    = false;
            btnSave.Visible   = false;
            btnCancel.Visible = false;
        }
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ViewState["Operation"] = "";
            lblMessage.Text        = "";
            SetTabIndex();

            if (!Page.IsPostBack)
            {
                Session["CountrySecurity"] = null;
                lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
                Session["CountrySecurity"] = formMessages.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.FormMessage);
                btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
                ViewState["Mode"] = "Add";

                // Fill Data Entry Drop Down
                BindDropDown(ddlFormType, ddlSearcFrmType, "FormType");
                BindDropDown(ddlMsgType, ddlSearchMsgType, "FormMsgType");
                BindBanchDropDown();

                BindDataGrid();
                btncheck();
            }

            if (CountrySecurity == "")
            {
                EnableQueryMode();
            }
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }
Пример #8
0
    /// <summary>
    /// Page Load Event Handler
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            connectionString = ConfigurationManager.AppSettings["PFCERPConnectionString"].ToString();

            fiscalPeriod     = new FiscalPeriod();
            maintenanceUtils = new MaintenanceUtility();
            lblMessage.Text  = "";

            if (!Page.IsPostBack)
            {
                // lblCurrentDate.Text = DateTime.Now.ToShortDateString();
                Session["FiscalSecurity"] = maintenanceUtils.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.FiscalPeriod);
                Mode = "Add";
                BindDataGrid();
            }

            if (FiscalSecurity == "")
            {
                EnableQueryMode();
            }
            //btnSave.Visible = false;
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //connectionString = PFC.Intranet.MaintenanceApps.MaintenanceUtility.GetConnectionString();
        expenseCode            = new MaintenanceUtility();
        ViewState["Operation"] = "";
        lblMessage.Text        = "";
        SetTabIndex();


        if (!Page.IsPostBack)
        {
            lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
            Session["ExpenseSecurity"] = expenseCode.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.ExpenseCodes);

            btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
            ViewState["Mode"] = "Add";
            BindDataGrid();
            BindDropDown(ddlExpType, "ExpType");
            BindDropDown(ddlIndicator, "ExpInd");
            BindDropDown(ddlTaxStatus, "TaxStatusCd");
            BindAccountsDropDown(ddlGLAccount);
            btncheck();
        }

        if (ExpenseSecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #10
0
    private void GetSecurity()
    {
        hidSecurity.Value = Notes.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.ItemNotes);
        if (hidSecurity.Value.ToString() == "")
        {
            hidSecurity.Value = "Query";
        }
        else
        {
            hidSecurity.Value = "Full";
        }

        //Response.Write(Session["UserName"].ToString());
        //Response.Write("<br>");
        //Response.Write(hidSecurity.Value.ToString());

        switch (hidSecurity.Value.ToString())
        {
        case "None":
            Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
            break;

        case "Query":
            DisplayStatusMessage("Query Only", "fail");
            break;

        case "Full":
            break;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        standardComment        = new OrgStandardComment();
        utility                = new MaintenanceUtility();
        connectionString       = PFC.Intranet.MaintenanceApps.MaintenanceUtility.GetConnectionString();
        ViewState["Operation"] = "";
        lblMessage.Text        = "";
        lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
        //Session["UserName"] = "******";

        if (!Page.IsPostBack)
        {
            txtCustNo.Text             = Request.QueryString["CustNumber"].ToString().Trim();
            code                       = txtCustNo.Text.ToString();
            Session["CommentSecurity"] = null;
            Session["CommentSecurity"] = utility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.OrganisationComments);

            ViewState["Mode"] = "Add";
            btncheck();
            GetSearch();
        }
        code = txtCustNo.Text.ToString();

        if (CommentSecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ViewState["Operation"] = "";
            lblMessage.Text        = "";

            if (!Page.IsPostBack)
            {
                Session["CountrySecurity"] = null;
                lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
                Session["CountrySecurity"] = maintenanceUtils.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CVCAdder);

                ViewState["Mode"] = "Add";

                // Fill Data Entry Drop Down
                BindLocationDropDowns();
                BindDropDown(ddlMsgType, "eCommAppType");
                BindDropDown(ddlCustType, "CustType");
                BindDropDown(ddlFormType, "eComOrderType");

                BindDataGrid();
            }

            if (CountrySecurity == "")
            {
                EnableQueryMode();
            }
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }
Пример #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Initializing AJAX.NET Library
        Ajax.Utility.RegisterTypeForAjax(typeof(CatPriceSchedMaint));
        CPSMScriptManager.SetFocus("txtCustNo");

        if (!IsPostBack)
        {
            SubmitUpdatePanel.Visible  = false;
            ApproveUpdatePanel.Visible = false;
            ExcelUpdatePanel.Visible   = false;

            ApprovalOKHidden.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CatPriceSchedMaintApproval);
            hidShowCostBasis.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CatPriceSchedMaintSetCost);
            hidPriceAnalysis.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.PriceAnalysisReportAccess);
            rdoPackage.Visible     = (MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CatPriceSchedulePKGOption) != "" ? true : false);

            if (ApprovalOKHidden.Value.ToString() != "")
            {
                ApprovalOKHidden.Value = "TRUE";
            }

            if (hidShowCostBasis.Value.ToString() != "")
            {
                hidShowCostBasis.Value = "TRUE";
            }
            if (hidPriceAnalysis.Value.ToString() != "")
            {
                hidPriceAnalysis.Value = "TRUE";
            }

            if ((MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CatPriceSchedMaintAccess) == "") && (ApprovalOKHidden.Value.ToUpper() != "TRUE"))
            {
                txtCustNo.Enabled    = false;
                btnSearch.Visible    = false;
                lblErrorMessage.Text = "You do not have sufficient security to access this application.";
                MessageUpdatePanel.Update();
            }

            if (Request.QueryString["CustNo"] != null && Request.QueryString["CustNo"].ToString() != "")
            {
                txtCustNo.Text = Request.QueryString["CustNo"].ToString();
                btnSearch_Click(btnSearch, new EventArgs());
            }
        }
    }
Пример #14
0
    private void GetSecurity()
    {
        #region Cross-Ref Builder Security
        hidXRefSec.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.ItemAlias);
        if (hidXRefSec.Value.ToString() == "")
        {
            hidXRefSec.Value = "Query";
        }
        else
        {
            hidXRefSec.Value = "Full";
        }

        if (hidXRefSec.Value.ToString() == "Query")
        {
            hidXRefSec.Value = "None";
        }

        switch (hidXRefSec.Value.ToString())
        {
        case "None":
            Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
            break;

        case "Full":
            break;
        }
        #endregion

        #region SubItem Security
        hidSubItemSec.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.SubItemAlias);
        if (hidSubItemSec.Value.ToString() == "")
        {
            hidSubItemSec.Value = "Query";
        }
        else
        {
            hidSubItemSec.Value = "Full";
        }

        if (hidSubItemSec.Value.ToString() == "Query")
        {
            hidSubItemSec.Value = "None";
        }
        #endregion
    }
Пример #15
0
 private void GetSecurity()
 {
     hidSecurity.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.BillOfMaterials);
     if (hidSecurity.Value.ToString() == "")
     {
         hidSecurity.Value = "Query";
     }
     else
     {
         hidSecurity.Value = "Full";
     }
 }
Пример #16
0
 private void GetSecurity()
 {
     hidSecurity.Value = BuyGroupMaint.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CategoryBuyGroups);
     if (hidSecurity.Value.ToString() == "")
     {
         hidSecurity.Value = "Query";
     }
     else
     {
         hidSecurity.Value = "Full";
     }
 }
Пример #17
0
    protected void GetSecurity()
    {
        string _Security = string.Empty;

        _Security = Security.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.IMFastMaint);

        if (_Security.ToString() == "")
        {
            _Security = "None";
            Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
        }
        else
        {
            _Security = "Full";
        }
    }
Пример #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ViewState["Operation"] = "";
            lblMessage.Text        = "";
            SetTabIndex();

            if (!Page.IsPostBack)
            {
                Session["CountrySecurity"] = null;
                lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
                Session["CountrySecurity"] = maintenanceUtils.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.GLPosting);
                btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
                ViewState["Mode"] = "Add";

                // Fill Data Entry Drop Down
                BindDropDown(ddlAppType, "GLTypeCd");
                BindDropDown(ddlCustCode, "GLCustCode");
                BindDropDown(ddlItemCode, "GLItemcd");
                BindBanchDropDown();

                BindAccountsDropDown(ddlSales);
                BindAccountsDropDown(ddlInvMaterial);
                BindAccountsDropDown(ddlInvLabor);
                BindAccountsDropDown(ddlCOGSMaterial);
                BindAccountsDropDown(ddlCOGSLabor);
                BindAccountsDropDown(ddlSalesDiscount);
                BindAccountsDropDown(ddlARTrade);
                BindAccountsDropDown(ddlMiscellanous);

                BindDataGrid();
                btncheck();
            }

            if (CountrySecurity == "")
            {
                EnableQueryMode();
            }
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }
Пример #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(_WhseShipListMaintenance));
            lblListMsg.Visible = false;
            BindMessage("", false);
            if (!Page.IsPostBack)
            {
                BindDropDowns();
                Session["ListDetailIDSelected"] = "";
                Session["ShipListSecurity"]     = maintenanceUtility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.ShipListMaintAccess);

                if (Session["ShipListSecurity"].ToString() == "")
                {
                    lblBtnHeader.Text += " [Query Only]";
                }
                SetDefaults();
            }
        }
Пример #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        standardComment        = new OrgStandardComment();
        utility                = new MaintenanceUtility();
        connectionString       = ConfigurationManager.AppSettings["PFCERPConnectionString"].ToString();
        ViewState["Operation"] = "";
        lblMessage.Text        = "";
        lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
        //Session["UserName"] = "******";
        code = txtCode.Text.ToString();
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["Mode"] != null && Request.QueryString["Mode"].ToString() == "POE")
            {
                Session["UserName"]   = Request.QueryString["UserName"].ToString();
                Session["UserID"]     = Request.QueryString["UserID"].ToString();
                ddlType.SelectedValue = "Vend";
            }

            BindTypes();
            SetTabIndex();
            Session["CountrySecurity"] = null;
            Session["CountrySecurity"] = utility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.OrganisationComments);

            ViewState["Mode"] = "Add";
            btncheck();

            if (Request.QueryString["Mode"] != null && Request.QueryString["Mode"].ToString() == "POE")
            {
                if (Request.QueryString["VendorNo"].ToString() != "")
                {
                    txtCode.Text = Request.QueryString["VendorNo"].ToString();
                    code         = txtCode.Text;
                    btnSearch_Click(txtCode, new ImageClickEventArgs(0, 0));
                }
            }
        }

        if (CountrySecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ViewState["Operation"] = "";
        lblMessage.Text        = "";

        if (!Page.IsPostBack)
        {
            lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
            //Session["CountrySecurity"] = "asd";
            Session["CountrySecurity"] = maintenanceUtility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.AppPref);

            ViewState["Mode"] = "Add";
            BindDataGrid();
        }

        if (CountrySecurity == "")
        {
            EnableQueryMode();
        }
    }
Пример #22
0
        private void GetSecurity()
        {
            hidSecurity.Value = Maint.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.SecurityGroups);
            if (hidSecurity.Value.ToString() == "")
            {
                hidSecurity.Value = "Query";
            }
            else
            {
                hidSecurity.Value = "Full";
            }

            //Response.Write(Session["UserName"].ToString());
            //Response.Write("<br>");
            //Response.Write(hidSecurity.Value.ToString());

            if (hidSecurity.Value.ToString() == "None")
            {
                Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
            }
        }
Пример #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SystemCheck systemCheck = new SystemCheck();
            systemCheck.SessionCheck();

            // Register The Class Name in Ajax Utility
            Ajax.Utility.RegisterTypeForAjax(typeof(PriceAnalysisReport));
            lblMessage.Text = "";
            _customerNumber = Request.QueryString["CustNo"].ToString();
            _categoryNo = Request.QueryString["Category"];
            if (!IsPostBack)
            {
                string _todaysDate = DateTime.Now.ToShortDateString();
                string _beginDtofSixMo = DateTime.Now.AddMonths(-6).ToShortDateString();
                
                cldStartDt.SelectedDate = Convert.ToDateTime(_beginDtofSixMo);
                cldEndDt.SelectedDate = Convert.ToDateTime(_todaysDate);
                cldStartDt.VisibleDate = Convert.ToDateTime(_beginDtofSixMo);
                cldEndDt.VisibleDate = Convert.ToDateTime(_todaysDate);

                hidShowAvgCost.Value = (MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.PriceAnalysisShowAvgCost) != "" ? "TRUE" : "FALSE");
                hidFileName.Value = "PriceAnalysisReport" + Session["SessionID"].ToString() + ".xls";
                lblBeginDate.Text = "Beginning Date: " + _beginDtofSixMo;
                lblEndDate.Text = "Ending Date: " + _todaysDate;
                if (_categoryNo != null)
                    lblCategory.Text = "Category: " + _categoryNo;
                
                Session["PriceAnalysisData"] = null;
                BindDataGrid();
            }

            if (hidShowMode.Value == "Show")
                ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "Show", "ShowPanel();", true);
            else
                if (hidShowMode.Value == "ShowL")
                    ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "ShowL", "ShowHide('Show');", true);
                else
                    if (hidShowMode.Value == "HideL")
                        ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "HideL", "ShowHide('Hide');", true);
        } 
Пример #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ViewState["Operation"] = "";
        lblMessage.Text = "";
        //Session["UserName"] = "******";

        if (!Page.IsPostBack)
        {
            SetTabIndex();
            lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
            Session["CountrySecurity"] = reasonCode.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.ReasonCodes);
            //Session["CountrySecurity"] = "testing";
            btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');");
            ViewState["Mode"] = "Add";
            BindDataGrid();
            btncheck();

        }

        if (CountrySecurity == "")
            EnableQueryMode();
    }
Пример #25
0
    //
    //Determine user security for this page
    //For RepMaster: ADMIN (W); MAINTENANCE (W); RepMasterMaint (W)
    //
    private void GetSecurity()
    {
        hidSecurity.Value = MaintUtil.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.RepMaster);
        if (hidSecurity.Value.ToString() == "")
        {
            hidSecurity.Value = "Query";
        }
        else
        {
            hidSecurity.Value = "Full";
        }

        //
        //If the page does not allow 'Query' only, change to 'None'
        //
        if (hidSecurity.Value.ToString() == "Query")
        {
            hidSecurity.Value = "None";
        }


        //Hard code the security value(s) until specific security is implemented
        //Toggle between Query, Full and None
        //hidSecurity.Value = "Query";
        //hidSecurity.Value = "Full"; //
        //hidSecurity.Value = "None";


        switch (hidSecurity.Value.ToString())
        {
        case "None":
            Response.Redirect("~/Common/ErrorPage/unauthorizedpage.aspx", true);
            break;

        case "Full":
            break;
        }
    }
Пример #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ViewState["Operation"] = "";
            lblMessage.Text        = "";
            btnSetAllEffDt.Attributes.Add("onclick", "return confirm('This process will set effecting date for all the CVC Adder records. Are you sure you want to continue?');");

            if (!Page.IsPostBack)
            {
                Session["CountrySecurity"] = null;
                lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
                Session["CountrySecurity"] = maintenanceUtils.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.CVCAdder);


                hidFileName.Value = "CVCAdderReport" + Session["SessionID"].ToString() + ".xls";
                ViewState["Mode"] = "Add";

                // Fill Data Entry Drop Down
                BindDropDown(ddlCategory, "CategoryDesc");
                BindDropDown(ddlPlating, "PlatingCodes");
                BindDropDown(ddlCVCCode, "CVCCodes");

                BindDataGrid();
            }

            if (CountrySecurity == "")
            {
                EnableQueryMode();
            }
        }
        catch (Exception ex)
        {
            DisplaStatusMessage(ex.Message, "Fail");
        }
    }