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();
        }
    }
Exemple #2
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();
        }
    }
Exemple #3
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");
        }
    }
Exemple #4
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();
        }
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Ajax.Utility.RegisterTypeForAjax(typeof(CompetitorPriceMaint));
        utility = new MaintenanceUtility();
        ViewState["Operation"] = "";
        lblMessage.Text        = "";
        lnkCode.Attributes.Add("onclick", "Javascript:ShowDetail(this.id);return false;");
        PageMode   = Request.QueryString["PageMode"].ToString().Trim().ToLower();
        custNo     = Request.QueryString["CustNo"].ToString().Trim();
        CompListCd = (Request.QueryString["CompListCd"] != null ? Request.QueryString["CompListCd"].ToString().Trim() : "");
        CompItemId = (Request.QueryString["CompItemId"] != null ? Request.QueryString["CompItemId"].ToString().Trim() : "");
        PFCItemNo  = (Request.QueryString["ItemNo"] != null ? Request.QueryString["ItemNo"].ToString().Trim() : "");

        if (!Page.IsPostBack)
        {
            //Session["CommentSecurity"] = null;
            //Session["CommentSecurity"] = utility.GetSecurityCode(Session["UserName"].ToString(), MaintenaceTable.OrganisationComments);
            Pager1.Visible = false;
            BindCompetitorDropdown();
            ViewState["Mode"] = "Add";

            // Change display based on page mode
            if (PageMode == "itemhistory")
            {
                lblGridHeading.Text         = "Competitor Price History";
                btnAdd.Visible              = false;
                tblPriceMaintHeader.Visible = false;
                btnSearch.Visible           = false;
                ddlCompName.Enabled         = false;
                divdatagrid.Attributes.Add("style", "height: 540px; overflow-x: auto; overflow-y: auto; position: relative; top: 0px; left: 0px; width: 1015px; border: 0px solid;");
            }
            else if (PageMode == "pircemode" && CompItemId != "")
            {
                if (CompItemId != "0")
                {
                    hidpCompetitorItemsID.Value = CompItemId;
                    dtTablesData = GetCompetitorTablesData("getgriditems", hidRegionId.Value, ddlCompName.SelectedValue, "", CompItemId);
                    DisplayRecord();
                }
                tblGrid.Visible     = false;
                dgCompPrice.Visible = false;
                btnSearch.Visible   = false;
                ddlCompName.Enabled = false;
                btnAdd.Visible      = false;
                btnCancel.Visible   = false;
                UpdatePanels();
            }
            else if (PageMode == "competitormode")
            {
                tblPriceMaint.Visible = true;
                tblDataEntry.Visible  = true;
                btnAdd.Visible        = false;
            }
        }
    }
Exemple #6
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();
        }
    }