Ejemplo n.º 1
0
        protected void cgvMetric_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int CellIndex = 5;
                switch (Mode)
                {
                case enMode.List:
                    CellIndex = 5;
                    break;

                case enMode.PIAdd:
                case enMode.PIEdit:
                case enMode.PiRef:
                    CellIndex = 4;
                    break;
                }
                if (e.Row.DataItem is MetricTrac.Bll.Metric.Extend)
                {
                    MetricTrac.Bll.Metric.Extend rData = (MetricTrac.Bll.Metric.Extend)e.Row.DataItem;
                    if (rData.MetricTypeID == 2)
                    {
                        e.Row.Cells[CellIndex].Text = "---";
                    }
                }
                else
                {
                    MetricTrac.Bll.Sp_SelectUnassignedMetricResult rData = (MetricTrac.Bll.Sp_SelectUnassignedMetricResult)e.Row.DataItem;
                    if (rData.MetricTypeID == 2)
                    {
                        e.Row.Cells[CellIndex].Text = "---";
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public MetricCache(Guid PerformanceIndicatorID, System.Web.SessionState.HttpSessionState vs, bool IsContinue)
        {
            this.PerformanceIndicatorID = PerformanceIndicatorID;

            object o = vs[StateObjectName];

            if (IsContinue && o != null && o is Guid[])
            {
                Guid[] MetricIds = (Guid[])o;
                NewMetrics = new List <MetricTrac.Bll.Metric.Extend>();
                foreach (Guid MetricId in MetricIds)
                {
                    MetricTrac.Bll.Metric.Extend k = MetricTrac.Bll.Metric.Get(MetricId);
                    if (k != null)
                    {
                        NewMetrics.Add(k);
                    }
                }
            }
            else
            {
                NewMetrics = new List <MetricTrac.Bll.Metric.Extend>();
                foreach (MetricTrac.Bll.Metric.Extend k in OldMetrics)
                {
                    NewMetrics.Add(k);
                }
            }
        }
Ejemplo n.º 3
0
 protected void cgvMetric_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     MetricTrac.Bll.Metric.Extend m = e.Row.DataItem as MetricTrac.Bll.Metric.Extend;
     if (m != null)
     {
         Repeater rpLocation = e.Row.FindControl("rpLocation") as Repeater;
         rpLocation.DataSource = m.AssignedOrgLocations;
         rpLocation.DataBind();
     }
 }
Ejemplo n.º 4
0
 private bool Contains(List <MetricTrac.Bll.Metric.Extend> l, MetricTrac.Bll.Metric.Extend k)
 {
     foreach (MetricTrac.Bll.Metric.Extend lk in l)
     {
         if (lk.MetricID == k.MetricID)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 5
0
        protected void cgvMetric_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int CellIndex = 6;
                switch (Mode)
                {
                case enMode.List:
                    CellIndex = 6;
                    break;

                case enMode.PIAdd:
                case enMode.PIEdit:
                case enMode.PiRef:
                    CellIndex = 5;
                    break;
                }
                if (e.Row.DataItem is MetricTrac.Bll.Metric.Extend)
                {
                    MetricTrac.Bll.Metric.Extend rData = (MetricTrac.Bll.Metric.Extend)e.Row.DataItem;
                    if (rData.AssignedOrgLocations != null)
                    {
                        if (rData.AssignedOrgLocations.Count > 1)
                        {
                            CreateToolTip(rData.AssignedLocationName, rData.AssignedLocationsNames, /*e.Row.ClientID*/ e.Row.Cells[4].ClientID);
                        }
                    }
                    if (rData.MetricTypeID == 2)
                    {
                        e.Row.Cells[CellIndex].Text = "---";
                    }
                }
                else
                {
                    MetricTrac.Bll.Sp_SelectUnassignedMetricResult rData = (MetricTrac.Bll.Sp_SelectUnassignedMetricResult)e.Row.DataItem;
                    //CreateToolTip("", "", e.Row.ClientID);
                    if (rData.MetricTypeID == 2)
                    {
                        e.Row.Cells[CellIndex].Text = "---";
                    }
                }
            }
        }