// using this method on RowDataBound - CreateToolTip(rData, e.Row.ClientID); private void CreateToolTip(MetricTrac.Bll.PerformanceIndicator.Extend rData, string rowClientID) { RadToolTip rtt = new RadToolTip(); rtt.Position = ToolTipPosition.BottomCenter; rtt.Title = rData.Name; rtt.TargetControlID = rowClientID; rtt.IsClientID = true; rtt.Animation = ToolTipAnimation.Slide; rtt.AutoCloseDelay = 12000; rtt.Text = "<table border=\"0\" cellpadding=\"2px\" cellspacing=\"0\" style=\"color:Gray;width:300px;\">" + "<tr><td class=\"GridHeader\">Description</td><td>" + (String.IsNullOrEmpty(rData.Description) ? "---" : rData.Description) + "</td>" + "<tr><td class=\"GridHeader\">Group->Category->Aspect</td><td>" + (String.IsNullOrEmpty(rData.GCAName) ? "---" : rData.GCAName) + "</td>" + "<tr><td class=\"GridHeader\">Sector</td><td>" + (String.IsNullOrEmpty(rData.SectorName) ? "---" : rData.SectorName) + "</td>" + "<tr><td class=\"GridHeader\">Requirement</td><td>" + (String.IsNullOrEmpty(rData.RequirementName) ? "---" : rData.RequirementName) + "</td>" + "<tr><td class=\"GridHeader\">Help Text</td><td>" + (String.IsNullOrEmpty(rData.Help) ? "---" : rData.Help) + "</td>" + "<tr><td colspan=\"2\"><span class=\"GridHeader\">Metrics</span><br />"; /*List<MetricTrac.Bll.Metric.Extend> _Metrics = MetricTrac.Bll.Metric.List(rData.PerformanceIndicatorID); * if (_Metrics.Count > 0) * { * rtt.Text += "<table border=\"0\" cellpadding=\"2px\" cellspacing=\"0\" style=\"color:Gray;\">"; * rtt.Text += "<tr style=\"background-color:Gray;color:White;\"><td>Category</td><td>Name</td><td>Input Unit of Measure</td><td>Output Unit of Measure</td><td>Collection Frequency</td><td>Description</td><tr>"; * foreach (MetricTrac.Bll.Metric.Extend m in _Metrics) * rtt.Text += "<tr><td>" + m.MetricCategoryName + "</td><td>" + m.Name + "</td><td>" + m.InputUnitOfMeasureName + "</td><td>" + m.UnitOfMeasureName + "</td><td>" + m.FrequencyName + "</td><td>" + m.Notes + "</td></tr>"; * rtt.Text += "</table>"; * } * else * rtt.Text += "No assigned Metrics"; * rtt.Text += "</td></tr></table>";*/ pnlToolTips.Controls.Add(rtt); }
MetricTrac.Bll.PerformanceIndicator.Extend GetPI() { MetricTrac.Bll.PerformanceIndicator.Extend pi = null; if (PerformanceIndicatorID != Guid.Empty) { pi = MetricTrac.Bll.PerformanceIndicator.Get(PerformanceIndicatorID); } return(pi); }
public void _SavePI(MetricTrac.Bll.PerformanceIndicator.Extend pi) { if (!string.IsNullOrEmpty(hfFormulaParameters.Value)) { DateTime dt; string[] ss = hfFormulaParameters.Value.Split('&'); if (ss.Length > 0 && !string.IsNullOrEmpty(ss[0])) { string s = System.Web.HttpUtility.UrlDecode(ss[0]); if (DateTime.TryParse(s, out dt)) { pi.FormulaBeginDate = dt; } } if (ss.Length > 1 && !string.IsNullOrEmpty(ss[1])) { string s = System.Web.HttpUtility.UrlDecode(ss[1]); if (DateTime.TryParse(s, out dt)) { pi.FormulaEndDate = dt; } } if (ss.Length > 2 && !string.IsNullOrEmpty(ss[2])) { pi.FormulaComment = System.Web.HttpUtility.UrlDecode(ss[2]); } } pi.Formula = Request.Form[mfPerformanceIndicator.UniqueID + "$heExpression$txt"]; bool InserMode = pi.PerformanceIndicatorID == Guid.Empty; pi.SortCode = GetSortCode(pi.Code); MetricTrac.Bll.PerformanceIndicator.Save(pi); if (InserMode) { cMetricList.SaveInsert(pi.PerformanceIndicatorID); } if (PerformanceIndicatorID != Guid.Empty) { OrgTree.SaveTree(); } RedirectToGrid(); }
// === simple List and Select for PerformanceIndicatorForm modes === // grid void cgvPerformanceIndicator_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { System.Web.UI.WebControls.CheckBox chbHeader = (System.Web.UI.WebControls.CheckBox)e.Row.FindControl("chbHeaderCheck"); chbHeader.Checked = false; chbHeader.Attributes.Add("onclick", String.Format("toggleCheckBoxes('{0}');", chbHeader.ClientID)); } if (e.Row.RowType != DataControlRowType.DataRow) { return; } MetricTrac.Bll.PerformanceIndicator.Extend rData = (MetricTrac.Bll.PerformanceIndicator.Extend)e.Row.DataItem; HiddenField hfComplexId = (HiddenField)e.Row.FindControl("hfComplexId"); if (hfComplexId != null) { hfComplexId.Value = rData.PerformanceIndicatorID.ToString(); } //CreateToolTip(rData, e.Row.ClientID); }
public MetricTrac.Bll.PerformanceIndicator.Extend _SelectPI() { MetricTrac.Bll.PerformanceIndicator.Extend pi = GetPI(); string p = string.Empty; if (pi != null && pi.FormulaBeginDate != null) { p += System.Web.HttpUtility.UrlEncode(((DateTime)pi.FormulaBeginDate).ToShortDateString()); } p += "&"; if (pi != null && pi.FormulaEndDate != null) { p += System.Web.HttpUtility.UrlEncode(((DateTime)pi.FormulaEndDate).ToShortDateString()); } p += "&"; if (pi != null && pi.FormulaComment != null) { p += System.Web.HttpUtility.UrlEncode(pi.FormulaComment); } hfFormulaParameters.Value = p; return(pi); }
public static void DeletePI(MetricTrac.Bll.PerformanceIndicator.Extend pi) { CurrentPage._DeletePI(pi); }
void _DeletePI(MetricTrac.Bll.PerformanceIndicator.Extend pi) { MetricTrac.Bll.PerformanceIndicator.Delete(pi.PerformanceIndicatorID); RedirectToGrid(); }