コード例 #1
0
    protected void eventsGrid_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.UltraGridCell s = e.Row.Cells.FromKey("Status");
        if (s.Text == "F")
        {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Style.ForeColor = System.Drawing.Color.Red;
            }
        }
        else if (s.Text == "R")
        {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Style.ForeColor = System.Drawing.Color.Blue;
            }
        }
        //else if (s.Text == "S")
        //{
        //    for (int i = 0; i < e.Row.Cells.Count; i++)
        //    { e.Row.Cells[i].Style.ForeColor = System.Drawing.Color.Blue; }
        //}

        //s.Value = "<a href= 'eventbrowserdetail.aspx?e=" + e.Row.Cells.FromKey("JobId").Value.ToString() + "' target='jobdetail'>" + s.Text + "</a>";
    }
コード例 #2
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        e.Row.Cells.FromKey("Level").Text = "[" + e.Row.Cells.FromKey("LevelId").Text + "] " + e.Row.Cells.FromKey("Level").Text;
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("Name");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cId   = e.Row.Cells.FromKey("TRId");

        #region Search colorization
        string search  = txtFilter.Text.Trim();
        string cIdText = cId.Text;
        if (search != string.Empty)
        {
            if (cId.Text != null)
            {
                if ((cId.Text.ToLower().IndexOf(search.ToLower())) >= 0 || (cName.Text.ToLower().IndexOf(search.ToLower())) >= 0)
                {
                    cName.Text = Utils.CReplace(cName.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                    cId.Text   = Utils.CReplace(cId.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                }
                else
                {
                    e.Row.Delete();
                }
            }
        }
        #endregion

        if (r == "2")
        {
            cId.Text = "<a href='javascript://' onclick=\"EditTR(" + cIdText + ")\">" + cId.Text + "</a>";
        }
        else
        {
            cName.Text = "<a href='../../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + cName.Text + "</a>";
        }
    }
コード例 #3
0
 protected void eventsGrid_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     if (e.Row.Cells.FromKey("Culture").Value != null)
     {
         e.Row.Cells.FromKey("Geography").Value = e.Row.Cells.FromKey("Culture").Value;
     }
     else if (e.Row.Cells.FromKey("Country").Value != null)
     {
         e.Row.Cells.FromKey("Geography").Value = e.Row.Cells.FromKey("Country").Value;
     }
     else if (e.Row.Cells.FromKey("Language").Value != null)
     {
         e.Row.Cells.FromKey("Geography").Value = e.Row.Cells.FromKey("Language").Value;
     }
     else
     {
         e.Row.Cells.FromKey("Geography").Value = HyperCatalog.Shared.SessionState.MasterCulture.Name;
     }
     Infragistics.WebUI.UltraWebGrid.UltraGridCell dateCell = e.Row.Cells.FromKey("Date");
     dateCell.Value = HyperCatalog.Shared.SessionState.User.GMTTimeZone.ToLocalTime((DateTime)dateCell.Value).ToString();
     if (e.Row.Cells.FromKey("ItemDeleted").Text != "1")
     {
         Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("ItemName");
         cName.Text = "<a href='../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "'\">" + cName.Text + "</a>";
     }
 }
コード例 #4
0
 protected void dgResults_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     e.Row.Cells.FromKey("ContainerName").Text = "<a href='javascript://' onclick=\"return OpenChunkWindow('" + e.Row.Cells.FromKey("ContainerId").Text + "')\">" + e.Row.Cells.FromKey("ContainerName").Text + "</a>";
     Infragistics.WebUI.UltraWebGrid.UltraGridCell newValue = e.Row.Cells.FromKey("NewValue");
     Infragistics.WebUI.UltraWebGrid.UltraGridCell oldValue = e.Row.Cells.FromKey("OldValue");
     if (newValue.Text == HyperCatalog.Business.Chunk.BlankValue)
     {
         newValue.Text            = HyperCatalog.Business.Chunk.BlankText;
         newValue.Style.ForeColor = System.Drawing.Color.Gray;
     }
     if (oldValue.Text == HyperCatalog.Business.Chunk.BlankValue)
     {
         oldValue.Text            = HyperCatalog.Business.Chunk.BlankText;
         oldValue.Style.ForeColor = System.Drawing.Color.Gray;
     }
 }
コード例 #5
0
ファイル: TM.aspx.cs プロジェクト: GitJayanth/test3
 /// <summary>
 /// Display TM datagrid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     /// display format for ModifyDate
     Infragistics.WebUI.UltraWebGrid.UltraGridCell c = e.Row.Cells.FromKey("ModifyDate");
     if (c.Text != null)
     {
         c.Text = ((DateTime)c.Value).ToShortDateString();
     }
     #region Search colorization
     string search = txtFilter.Text.Trim();
     if (search != string.Empty)
     {
         c      = e.Row.Cells.FromKey("TMExpressionValue");
         c.Text = Utils.CReplace(c.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
     }
     #endregion
 }
コード例 #6
0
ファイル: PLCReport.aspx.cs プロジェクト: GitJayanth/test3
 protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("Name");
     cName.Text = "<a href='../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + cName.Text + "</a>";
     #region Search colorization
     string search = txtFilter.Text.Trim();
     if (search != string.Empty)
     {
         if ((cName.Text.ToLower().IndexOf(search.ToLower())) >= 0)
         {
             cName.Text = Utils.CReplace(cName.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
         }
         else
         {
             e.Row.Delete();
         }
     }
     #endregion
 }
コード例 #7
0
 protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     e.Row.Cells.FromKey("Level").Text = "[" + e.Row.Cells.FromKey("LevelId").Text + "] " + e.Row.Cells.FromKey("Level").Text;
     Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("Name");
     //Modified by Prabhu for ACQ 3.0 (PCF1: Regional Project Management)-- 21/May/09
     cName.Text = "<a href='../../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "&c=" + e.Row.Cells.FromKey("CultureCode").Text + "' target='_BLANK'\">" + cName.Text + "</a>";
     #region Search colorization
     string search = txtFilter.Text.Trim();
     if (search != string.Empty)
     {
         if ((cName.Text.ToLower().IndexOf(search.ToLower())) >= 0)
         {
             cName.Text = Utils.CReplace(cName.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
         }
         else
         {
             e.Row.Delete();
         }
     }
     #endregion
 }
コード例 #8
0
    protected void eventsGrid_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.UltraGridCell s  = e.Row.Cells.FromKey("StartDate");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell f  = e.Row.Cells.FromKey("EndDate");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell d  = e.Row.Cells.FromKey("Duration");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell ev = e.Row.Cells.FromKey("Events");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell r  = e.Row.Cells.FromKey("Result");

        TimeSpan duration = f.Value != null ? ((DateTime)f.Value).Subtract((DateTime)s.Value).Duration() : DateTime.UtcNow.Subtract((DateTime)s.Value).Duration();

        d.Text = displayDuration(duration);
        /****** Below line is commented for QC# 791 ****/
        //s.Value = HyperCatalog.Shared.SessionState.User.GMTTimeZone.ToLocalTime((DateTime)s.Value).ToString();
        s.Value = "<a href= 'eventbrowserdetail.aspx?e=" + e.Row.Cells.FromKey("JobId").Value.ToString() + "' target='jobdetail'>" + s.Text + "</a>";
        r       = e.Row.Cells.FromKey("Result");
        r.Text  = GetStatus(Convert.ToInt32(r.Value));

        ev       = e.Row.Cells.FromKey("Events");
        ev.Text  = GetEvents((bool)e.Row.Cells.FromKey("HasInfos").Value, (bool)e.Row.Cells.FromKey("HasWarnings").Value, (bool)e.Row.Cells.FromKey("HasErrors").Value);
        ev.Value = ev.Text;
    }
コード例 #9
0
ファイル: NPIReport.aspx.cs プロジェクト: GitJayanth/test3
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cName   = null;
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cNumber = null;
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cClass  = null;
        if (e.Row.Cells.FromKey("Name") != null)
        {
            cName = e.Row.Cells.FromKey("Name");
        }
        if (e.Row.Cells.FromKey("PN") != null)
        {
            cNumber = e.Row.Cells.FromKey("PN");
        }
        if (e.Row.Cells.FromKey("Class") != null)
        {
            cClass = e.Row.Cells.FromKey("Class");
        }

        #region Search colorization
        if (cName != null && cNumber != null && cClass != null)
        {
            string search     = txtFilter.Text.Trim();
            string itemName   = cName.Text.ToLower();
            string itemNumber = cNumber.Text.ToLower();
            string className  = cClass.Text.ToLower();

            if (search.Length > 0)
            {
                if ((itemName.IndexOf(search.ToLower())) >= 0)
                {
                    cName.Text = Utils.CReplace(cName.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                }
                if ((itemNumber.IndexOf(search.ToLower())) >= 0)
                {
                    cNumber.Text = Utils.CReplace(cNumber.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                }
                if ((className.IndexOf(search.ToLower())) >= 0)
                {
                    cClass.Text = Utils.CReplace(cClass.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                }
            }
        }
        #endregion

        #region Level name
        if (e.Row.Cells.FromKey("Level") != null && e.Row.Cells.FromKey("LevelId") != null)
        {
            e.Row.Cells.FromKey("Level").Text = "[" + e.Row.Cells.FromKey("LevelId") + "] " + e.Row.Cells.FromKey("Level");
        }
        #endregion

        #region Product name
        if (cName != null)
        {
            if (curCultureType == HyperCatalog.Business.CultureType.Locale)
            {
                cName.Text = "<a href='../../redirect.aspx?i=" + e.Row.Cells.FromKey("ItemId").Text + "&c=" + DDL_Countries.SelectedValue + "&p=UI/Globalize/qdetranslate.aspx' target='_BLANK'\">" + cName.Text + "</a>";
            }
            else
            {
                cName.Text = "<a href='../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + cName.Text + "</a>";
            }
        }
        #endregion
    }