예제 #1
0
        private void BindProfile(EHSProfile profile)
        {
            if (profile != null)
            {
                gvMetricList.DataSource = profile.Profile.EHS_PROFILE_MEASURE.OrderBy(l => l.EHS_MEASURE.MEASURE_CD);
                gvMetricList.DataBind();
                SQMBasePage.SetGridViewDisplay(gvMetricList, lblMetricListEmpty, divMetricListGVScroll, -1, 0);

                ddlDayDue.SelectedValue      = staticProfile.Profile.DAY_DUE.ToString();
                ddlWarningDays.SelectedValue = staticProfile.Profile.REMINDER_DAYS.ToString();

                ddlMetricCurrency.SelectedValue = staticProfile.Plant.CURRENCY_CODE;
                pnlMetricEdit.Enabled           = btnMetricCancel.Enabled = btnMetricSave.Enabled = false;
                btnProfileMeasureNew.Enabled    = true;
            }
        }
예제 #2
0
        private void UpdateMetricList(EHSProfile profile)
        {
            if (profile != null)
            {
                switch (profile.Profile.DISPLAY_OPTION)
                {
                case 1:
                    gvMetricList.DataSource = profile.Profile.EHS_PROFILE_MEASURE.OrderBy(l => l.EHS_MEASURE.MEASURE_CD);
                    break;

                case 2:
                    gvMetricList.DataSource = profile.Profile.EHS_PROFILE_MEASURE.OrderBy(l => l.EHS_MEASURE.MEASURE_NAME);
                    break;

                default:
                    gvMetricList.DataSource = profile.Profile.EHS_PROFILE_MEASURE.OrderBy(l => l.EHS_MEASURE.MEASURE_CATEGORY).ThenBy(l => l.EHS_MEASURE.MEASURE_CD);
                    break;
                }

                gvMetricList.DataBind();
                SQMBasePage.SetGridViewDisplay(gvMetricList, lblMetricListEmpty, divMetricListGVScroll, -1, 0);
            }
        }