コード例 #1
0
        public int BindInputsList(EHSProfilePeriod period, string context)
        {
            int status = 0;

            if (period != null && period.InputsList.Count > 0)
            {
                pnlInputsList.Visible        = true;
                hfInputsListPeriodDate.Value = period.PeriodDate.ToShortDateString();
                if (currentProfile != null)
                {
                    hfInputsListPlantID.Value = currentProfile.Plant.PLANT_ID.ToString();
                }

                gvInputsList.DataSource = period.InputsList;
                gvInputsList.DataBind();
            }
            else
            {
                pnlInputsList.Visible   = false;
                gvInputsList.DataSource = null;
                gvInputsList.DataBind();
            }

            return(status);
        }
コード例 #2
0
        protected void rgProfilePeriodList_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                HiddenField  hf;
                Label        lbl;

                try
                {
                    EHSProfilePeriod period = (EHSProfilePeriod)e.Item.DataItem;

                    LinkButton lnk = (LinkButton)e.Item.FindControl("lnkPeriod");
                    lnk.Text            = SQMBasePage.FormatDate(period.PeriodDate, "MMMM yyyy", false);
                    lnk.CommandArgument = period.PeriodDate.ToShortDateString();

                    Ucl_MetricList ucl = (Ucl_MetricList)e.Item.FindControl("uclInputsList");
                    ucl.BindInputsList(period, "");
                }
                catch (Exception ex)
                {
                }
            }
        }