Esempio n. 1
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        e.Row.Cells.FromKey("ItemName").Text = "<a href='../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + e.Row.Cells.FromKey("ItemName").Text + "</a>";
        e.Row.Cells.FromKey("Status").Text   = Utils.ColorStatus(e.Row.Cells.FromKey("Status").Text);

        string filter = txtFilter.Text.Trim();

        e.Row.Cells.FromKey("ItemName").Style.Wrap   = true;
        e.Row.Cells.FromKey("ItemNumber").Style.Wrap = true;
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("ItemName");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cSku  = e.Row.Cells.FromKey("ItemNumber");
        if ((cName.Text.ToLower().IndexOf(filter.ToLower()) >= 0) || (cSku.Text.ToLower().IndexOf(filter.ToLower()) >= 0))
        {
            e.Row.Cells.FromKey("ItemName").Text   = Utils.CReplace(e.Row.Cells.FromKey("ItemName").Text, filter, "<font color=red><b>" + filter + "</b></font>", 1);
            e.Row.Cells.FromKey("ItemNumber").Text = Utils.CReplace(e.Row.Cells.FromKey("ItemNumber").Text, filter, "<font color=red><b>" + filter + "</b></font>", 1);
        }

        // Bundle group
        if (e.Row.Cells.FromKey("Anomaly").Text == "")
        {
            e.Row.Cells.FromKey("CountryFlag").Text  = "<img src='/hc_v4/img/flags/" + e.Row.Cells.FromKey("CountryCode").Text + ".gif'/>";
            e.Row.Cells.FromKey("CountryFlag").Title = "[" + e.Row.Cells.FromKey("CountryCode").Text + "] " + HyperCatalog.Business.Country.GetByKey(e.Row.Cells.FromKey("CountryCode").Text).Name;
            foreach (UltraGridCell cell in e.Row.Cells)
            {
                cell.Style.Font.Bold = true;
            }
        }

        if (e.Row.Cells.FromKey("Anomaly").Text == "None")
        {
            e.Row.Cells.FromKey("Anomaly").Text = string.Empty;
        }
    }
Esempio n. 2
0
        public bool IsClickColumn(string columnKey, Infragistics.WebUI.UltraWebGrid.UltraGridCell cell)
        {
            if (cell.Column.Key == columnKey)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 3
0
        public bool IsClickEditColumn(Infragistics.WebUI.UltraWebGrid.UltraGridCell cell)
        {
            if (cell.Column.Key == EditColumnKey)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 4
0
        protected virtual void Grid_ClickCell(Infragistics.WebUI.UltraWebGrid.UltraGridCell cell)
        {
            if (this.gridHelper.IsClickEditColumn(cell))
            {
                object obj = this.GetEditObject(cell.Row);

                if (obj != null)
                {
                    this.SetEditObject(obj);

                    this.buttonHelper.PageActionStatusHandle(PageActionType.Update);
                }
            }
        }
Esempio n. 5
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cName   = e.Row.Cells.FromKey("ItemName");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cNum    = e.Row.Cells.FromKey("sku");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cStatus = e.Row.Cells.FromKey("ContentStatus");

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

        cNum.Text = "<a href='javascript://' onclick='r(" + e.Row.Cells.FromKey("ItemId").Text + ");'>" + cNum.Text + "</a>";
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cd = e.Row.Cells.FromKey("POD");
        //-- Pod formatting
        cd      = e.Row.Cells.FromKey("POD");
        cd.Text = SessionState.User.FormatUtcDateForGrid(cd.Value);
        //-- Removal formatting
        cd      = e.Row.Cells.FromKey("Removal");
        cd.Text = cd.Value != null?SessionState.User.FormatUtcDateForGrid(cd.Value) : cd.Text;

        //-- Pid formatting
        cd      = e.Row.Cells.FromKey("PID");
        cd.Text = SessionState.User.FormatUtcDateForGrid(cd.Value);
        cd.Text = "<a href='javascript://' onclick='EditPLC(" + e.Row.Cells.FromKey("ItemId").Text +
                  "," + e.Row.Cells.FromKey("PID").Column.Index.ToString() +
                  "," + e.Row.Index.ToString() +
                  ",&quot;" + dg.ClientID + "&quot;" +
                  ");'>" + cd.Text + "</a>";
    }
Esempio n. 6
0
    protected void dgByUser_InitializeRow(object sender, RowEventArgs e)
    {
        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 + "' target='_BLANK'\">" + cName.Text + "</a>";
        string altStatus = string.Empty;
        string status    = e.Row.Cells.FromKey("Status").Text;

        switch (status)
        {
        case "M": altStatus = "Missing"; break;

        //case "R": altStatus = "Rejected"; break; --Commented for alternate for CR 5096
        case "D": altStatus = "Draft"; break;

        case "F": altStatus = "Final"; break;

        default: altStatus = string.Empty; break;
        }
        e.Row.Cells.FromKey("Status").Text = "<img src='/hc_v4/img/S" + status + ".gif' align='center' valign='middle' alt='" + altStatus + "'/>";
        e.Row.Cells.FromKey("Value").Text  = UITools.HtmlEncode(e.Row.Cells.FromKey("Value").Text);
    }
Esempio n. 7
0
        protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("ItemName");
            Infragistics.WebUI.UltraWebGrid.UltraGridCell cNum  = e.Row.Cells.FromKey("sku");

            #region Search colorization
            string search = txtFilter.Text.Trim();
            if (search != string.Empty)
            {
                if ((cName.Text.ToLower().IndexOf(search.ToLower())) >= 0 || (cNum.Text.ToLower().IndexOf(search.ToLower()) >= 0))
                {
                    cName.Text = Utils.CReplace(cName.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                    cNum.Text  = Utils.CReplace(cNum.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
                }
                else
                {
                    e.Row.Delete();
                    return;
                }
            }
            #endregion
        }
Esempio n. 8
0
        protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
        {
            string status  = e.Row.Cells.FromKey("Status").Text.ToLower().Substring(0, 1);
            bool   isRoll  = (bool)e.Row.Cells.FromKey("IsRoll").Value;
            string company = e.Row.Cells.FromKey("COMPANY").Text;

            Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;
            UITools.HiglightGridRowFilter(ref r, searchString);
            if (e.Row.Cells.FromKey("Sku").Value != null)
            {
                e.Row.Cells.FromKey("FullName").Text = "[" + e.Row.Cells.FromKey("Sku").Text + "] - " + e.Row.Cells.FromKey("FullName").Text;
            }
            switch (status)
            {
            case "o": e.Row.Cells.FromKey("FullName").Text = "<font color=gray>[O] </font>" + e.Row.Cells.FromKey("FullName").Text;
                break;

            case "f": e.Row.Cells.FromKey("FullName").Text = "<font color=green>[F] </font>" + e.Row.Cells.FromKey("FullName").Text;
                break;

            case "e": e.Row.Cells.FromKey("FullName").Text = "<font color=darkblue>[E] </font>" + e.Row.Cells.FromKey("FullName").Text;
                break;
            }
            if (isRoll)
            {
                e.Row.Cells.FromKey("FullName").Text = e.Row.Cells.FromKey("FullName").Text + " <img border='0' title='Roll Item' valign='top' src='/hc_v4/img/ed_roll.gif'/>";
                e.Row.Style.VerticalAlign            = VerticalAlign.Bottom;
            }
            Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("FullName");
            if (SessionState.Culture.Type == HyperCatalog.Business.CultureType.Locale)
            {
                cName.Text = "<a href='../redirect.aspx?i=" + e.Row.Cells.FromKey("Id").Text + "&c=" + SessionState.Culture.Code + "&p=UI/Globalize/qdetranslate.aspx'\">" + cName.Text + "</a>";
            }
            else
            {
                cName.Text = "<a href='../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("Id").Text + "'\">" + cName.Text + "</a>";
            }
        }