Example #1
0
        protected void ddlSelectLocation_Change(object sender, EventArgs e)
        {
            pnlSelectCompany.Visible = true;
            switch (ddlSelectLocation.SelectedValue)
            {
            case "2":
                uclCompanyList.BindCompanyList(SQMModelMgr.SelectCompanyList(new PSsqmEntities(), false, true, false));
                btnCancel.Enabled = true;
                break;

            case "3":
                uclCompanyList.BindCompanyList(SQMModelMgr.SelectCompanyList(new PSsqmEntities(), true, false, false));
                btnCancel.Enabled = true;
                break;

            default:
                SelectCompany(SessionManager.UserContext.HRLocation.Company.COMPANY_ID);
                return;

                break;
            }
            uclItemHdr.ToggleVisible(null);
            uclCompanyList.CloseCompanyListButton.Visible = false;
            ddlSelectLocation.Focus();
        }
Example #2
0
        protected void btnListCompanies_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            pnlSelectCompany.Visible = true;
            switch (btn.CommandArgument)
            {
            case "prime":
                SelectCompany(SessionManager.UserContext.HRLocation.Company.COMPANY_ID);
                return;

                break;

            case "cust":
                uclCompanyList.BindCompanyList(SQMModelMgr.SelectCompanyList(new PSsqmEntities(), true, false, false));
                btnCancel.Enabled = true;
                break;

            case "supp":
                uclCompanyList.BindCompanyList(SQMModelMgr.SelectCompanyList(new PSsqmEntities(), false, true, false));
                btnCancel.Enabled = true;
                break;

            case "reset":
                pnlSelectCompany.Visible = btnCancel.Enabled = false;
                newLocation        = null;
                lblSelCompany.Text = lblSelBusOrg.Text = lblSelPlant.Text = "";
                break;

            default:        // cancel
                pnlSelectCompany.Visible = btnCancel.Enabled = false;
                BindBusinessLocation(currentLocation, true, true, true, false);
                if (OnBusinessLocationChange != null)
                {
                    OnBusinessLocationChange(currentLocation);
                }
                break;
            }
            uclCompanyList.CloseCompanyListButton.Visible = false;
            btn.Focus();
        }