コード例 #1
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            TSSmartErrorCause smartErrorCause = (TSSmartErrorCause)obj;
            string            strLocations    = "";

            if (smartErrorCause.Locations != null)
            {
                for (int i = 0; i < smartErrorCause.Locations.Length; i++)
                {
                    strLocations += smartErrorCause.Locations[i].ErrorLocation + "; ";
                }
                if (strLocations.Length > 0)
                {
                    strLocations = strLocations.Substring(0, strLocations.Length - 2);
                }
            }
            string strErrorParts = "";

            if (smartErrorCause.ErrorParts != null)
            {
                for (int i = 0; i < smartErrorCause.ErrorParts.Length; i++)
                {
                    strErrorParts += smartErrorCause.ErrorParts[i].ErrorPart + "; ";
                }
                if (strErrorParts.Length > 0)
                {
                    strErrorParts = strErrorParts.Substring(0, strErrorParts.Length - 2);
                }
            }
            return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                       new object[] {
                smartErrorCause.ErrorCauseGroupCode,
                smartErrorCause.ErrorCauseCode,
                strLocations,
                strErrorParts,
                FormatHelper.ToDateString(smartErrorCause.MaintainDate),
                smartErrorCause.Count
            }));
        }
コード例 #2
0
        protected override string[] FormatExportRecord(object obj)
        {
            TSSmartErrorCause smartErrorCause = (TSSmartErrorCause)obj;
            string            strLocations    = "";

            if (smartErrorCause.Locations != null)
            {
                for (int i = 0; i < smartErrorCause.Locations.Length; i++)
                {
                    strLocations += smartErrorCause.Locations[i].ErrorLocation + "; ";
                }
                if (strLocations.Length > 0)
                {
                    strLocations = strLocations.Substring(0, strLocations.Length - 2);
                }
            }
            string strErrorParts = "";

            if (smartErrorCause.ErrorParts != null)
            {
                for (int i = 0; i < smartErrorCause.ErrorParts.Length; i++)
                {
                    strErrorParts += smartErrorCause.ErrorParts[i].ErrorPart + "; ";
                }
                if (strErrorParts.Length > 0)
                {
                    strErrorParts = strErrorParts.Substring(0, strErrorParts.Length - 2);
                }
            }
            return(new string[] {
                smartErrorCause.ErrorCauseGroupCode,
                smartErrorCause.ErrorCauseCode,
                strLocations,
                strErrorParts,
                FormatHelper.ToDateString(smartErrorCause.MaintainDate),
                smartErrorCause.Count.ToString()
            });
        }