Ejemplo n.º 1
0
        public Fltr(int DId, int UId, int HourOffset, DateTime Start, DateTime End, DateRange Range, Grouping YAxis, Grouping SubYAxis, int PriorityID, int ClassID, int ClassLevel, int SubClassLevel, int CreationCategoryID, int LocationID, int LocationTypeID, int SubLocationTypeID, int TechnicianID, int SubmittedByID, int ClosedByID, int AccountID, int AccountLocationId, int accountParentLocationId, int SubmissionCategoryID, int ResolutionCategoryID, int AgeDay, EqualRange AgeRange, int TicketLevelID, int SupportGroupID, TechnicianType technicianType, HandledByCallCenter handledByCallCenter, string asset_filter)
            : this(DId, UId, HourOffset, Start, End, Range, YAxis)
        {
            _subyaxis              = SubYAxis;
            _priority              = PriorityID;
            _class                 = ClassID;
            _classlevel            = ClassLevel;
            _subclasslevel         = SubClassLevel;
            _creationcategory      = CreationCategoryID;
            _submissioncat         = SubmissionCategoryID;
            _resolutioncat         = ResolutionCategoryID;
            _location              = LocationID;
            _locationtype          = LocationTypeID;
            _sublocationtype       = SubLocationTypeID;
            _technician            = TechnicianID;
            _submittedby           = SubmittedByID;
            _closedby              = ClosedByID;
            _account               = AccountID;
            _accountLocation       = AccountLocationId;
            _accountParentLocation = accountParentLocationId;
            _age                     = AgeDay;
            _age_equal               = AgeRange;
            this.technicianType      = technicianType;
            this.handledByCallCenter = handledByCallCenter;
            //tkt #3949: Level Filter added to Ticket Count Report
            _ticket_level = TicketLevelID;
            //tkt #3632: Add Support Groups to Ticket Count Report criteria
            _support_group = SupportGroupID;

            _asset_filter = asset_filter;
        }
Ejemplo n.º 2
0
            public void Add(TKey Key_, TValue Value_)
            {
                Queue <TValue> EqualRange;

                if (!_Datas.TryGetValue(Key_, out EqualRange))
                {
                    EqualRange   = new Queue <TValue>();
                    _Datas[Key_] = EqualRange;
                }

                EqualRange.Enqueue(Value_);

                ++_Count;
            }
Ejemplo n.º 3
0
 public void ResetToDefaults()
 {
     _id                    = 0;
     _name                  = string.Empty;
     _reptype               = ReportType.NotSet;
     _range                 = DateRange.Custom;
     _start                 = DateTime.UtcNow.Date;
     _end                   = DateTime.UtcNow;
     _yaxis                 = Grouping.None;
     _subyaxis              = Grouping.None;
     _age_equal             = EqualRange.Less;
     technicianType         = TechnicianType.All;
     handledByCallCenter    = HandledByCallCenter.All;
     _priority              = 0;
     _class                 = 0;
     _classlevel            = 0;
     _classnull             = false;
     _subclasslevel         = 0;
     _creationcategory      = 0;
     _submissioncat         = 0;
     _resolutioncat         = 0;
     _location              = 0;
     _locationtype          = 0;
     _sublocationtype       = 0;
     _technician            = 0;
     _submittedby           = 0;
     _closedby              = 0;
     _account               = 0;
     _accountLocation       = 0;
     _accountParentLocation = 0;
     _month                 = 0;
     _age                   = -1;
     _ticket_level          = 0;
     _support_group         = 0;
     _asset_filter          = string.Empty;
     _sla_graph_width_id    = 0;
     _sla_graph_view_id     = 0;
     LoadReportDefaults(_did, _uid, true);
     _end   = _end.AddHours(-_houroffset);
     _start = _start.AddMonths(-1).AddHours(-_houroffset);
 }
Ejemplo n.º 4
0
 public void ResetToDefaults()
 {
     _id = 0;
     _name = string.Empty;
     _reptype = ReportType.NotSet;
     _range = DateRange.Custom;
     _start = DateTime.UtcNow.Date;
     _end = DateTime.UtcNow;
     _yaxis = Grouping.None;
     _subyaxis = Grouping.None;
     _age_equal = EqualRange.Less;
     technicianType = TechnicianType.All;
     handledByCallCenter = HandledByCallCenter.All;
     _priority = 0;
     _class = 0;
     _classlevel = 0;
     _classnull = false;
     _subclasslevel = 0;
     _creationcategory = 0;
     _submissioncat = 0;
     _resolutioncat = 0;
     _location = 0;
     _locationtype = 0;
     _sublocationtype = 0;
     _technician = 0;
     _submittedby = 0;
     _closedby = 0;
     _account = 0;
     _accountLocation = 0;
     _accountParentLocation = 0;
     _month = 0;
     _age = -1;
     _ticket_level = 0;
     _support_group = 0;
     _asset_filter = string.Empty;
     _sla_graph_width_id = 0;
     _sla_graph_view_id = 0;
     LoadReportDefaults(_did, _uid, true);
     _end = _end.AddHours(-_houroffset);
     _start = _start.AddMonths(-1).AddHours(-_houroffset);
 }
Ejemplo n.º 5
0
 public Fltr(int DId, int UId, int HourOffset, DateTime Start, DateTime End, DateRange Range, Grouping YAxis, Grouping SubYAxis, int PriorityID, int ClassID, int ClassLevel, int SubClassLevel, int CreationCategoryID, int LocationID, int LocationTypeID, int SubLocationTypeID, int TechnicianID, int SubmittedByID, int ClosedByID, int AccountID, int AccountLocationId, int accountParentLocationId, int SubmissionCategoryID, int ResolutionCategoryID, int AgeDay, EqualRange AgeRange, int TicketLevelID, int SupportGroupID, TechnicianType technicianType, HandledByCallCenter handledByCallCenter, string asset_filter, int sla_graph_width_id, int sla_graph_view_id)
     : this(DId, UId, HourOffset, Start, End, Range, YAxis, SubYAxis, PriorityID, ClassID, ClassLevel, SubClassLevel, CreationCategoryID, LocationID, LocationTypeID, SubLocationTypeID, TechnicianID, SubmittedByID, ClosedByID, AccountID, AccountLocationId, accountParentLocationId, SubmissionCategoryID, ResolutionCategoryID, AgeDay, AgeRange, TicketLevelID, SupportGroupID, technicianType, handledByCallCenter, asset_filter)
 {
     _sla_graph_width_id = sla_graph_width_id;
     _sla_graph_view_id = sla_graph_view_id;
 }
Ejemplo n.º 6
0
        public Fltr(int DId, int UId, int HourOffset, DateTime Start, DateTime End, DateRange Range, Grouping YAxis, Grouping SubYAxis, int PriorityID, int ClassID, int ClassLevel, int SubClassLevel, int CreationCategoryID, int LocationID, int LocationTypeID, int SubLocationTypeID, int TechnicianID, int SubmittedByID, int ClosedByID, int AccountID, int AccountLocationId, int accountParentLocationId, int SubmissionCategoryID, int ResolutionCategoryID, int AgeDay, EqualRange AgeRange, int TicketLevelID, int SupportGroupID, TechnicianType technicianType, HandledByCallCenter handledByCallCenter, string asset_filter)
            : this(DId, UId, HourOffset, Start, End, Range, YAxis)
        {
            _subyaxis = SubYAxis;
            _priority = PriorityID;
            _class = ClassID;
            _classlevel = ClassLevel;
            _subclasslevel = SubClassLevel;
            _creationcategory = CreationCategoryID;
            _submissioncat = SubmissionCategoryID;
            _resolutioncat = ResolutionCategoryID;
            _location = LocationID;
            _locationtype = LocationTypeID;
            _sublocationtype = SubLocationTypeID;
            _technician = TechnicianID;
            _submittedby = SubmittedByID;
            _closedby = ClosedByID;
            _account = AccountID;
            _accountLocation = AccountLocationId;
            _accountParentLocation = accountParentLocationId;
            _age = AgeDay;
            _age_equal = AgeRange;
            this.technicianType = technicianType;
            this.handledByCallCenter = handledByCallCenter;
            //tkt #3949: Level Filter added to Ticket Count Report
            _ticket_level = TicketLevelID;
            //tkt #3632: Add Support Groups to Ticket Count Report criteria
            _support_group = SupportGroupID;

            _asset_filter = asset_filter;
        }
Ejemplo n.º 7
0
 public Fltr(int DId, int Id)
 {
     _did = DId;
     _id = Id;
     DataRow _row = SelectFilter(DId, _id);
     _uid = (int)_row["UId"];
     if (_row == null) return;
     _name = _row["Name"].ToString();
     _reptype = (ReportType)(byte)_row["ReportType"];
     string[] _state = _row["FilterState"].ToString().Split('&');
     System.Collections.Specialized.StringDictionary _sd = new System.Collections.Specialized.StringDictionary();
     for (int i = 0; i < _state.Length; i++)
     {
         if (_state[i].Length == 0) continue;
         string[] _item = _state[i].Split('=');
         if (_item.Length > 1) _sd.Add(_item[0], _item[1]);
         else _sd.Add(_item[0], string.Empty);
     }
     string[] expectedFormats = { "MM/dd/yyyy HH:mm:ss", "MM/dd/yyyyHH:mm:ss", "MM.dd.yyyy HH:mm:ss", "MM.dd.yyyyHH:mm:ss" };
     IFormatProvider culture = new CultureInfo("en-US", false);
     if (_sd.ContainsKey("ds") && _sd["ds"].Length > 0) _start = DateTime.ParseExact(HttpUtility.UrlDecode(_sd["ds"]), expectedFormats, culture, DateTimeStyles.None);
     if (_sd.ContainsKey("de") && _sd["de"].Length > 0) _end = DateTime.ParseExact(HttpUtility.UrlDecode(_sd["de"]), expectedFormats, culture, DateTimeStyles.None);
     if (_sd.ContainsKey("dr") && _sd["dr"].Length > 0) this.DateRange = ConvertStringToRange(HttpUtility.UrlDecode(_sd["dr"]));
     if (_sd.ContainsKey("ya") && _sd["ya"].Length > 0)
     {
         string _val = HttpUtility.UrlDecode(_sd["ya"]);
         if (_val.IndexOf(Grouping.Location.ToString()) >= 0)
         {
             _yaxis = Grouping.Location;
             _locationtype = int.Parse(_val.Split(',')[1]);
         }
         else if (_val.IndexOf(Grouping.Class.ToString()) >= 0)
         {
             _yaxis = Grouping.Class;
             string[] _arr = _val.Split(',');
             if (_arr.Length > 1) _classlevel = int.Parse(_arr[1]);
         }
         else _yaxis = (Grouping)Enum.Parse(typeof(Grouping), _val, true);
     }
     if (_sd.ContainsKey("sya") && _sd["sya"].Length > 0)
     {
         string _val = HttpUtility.UrlDecode(_sd["sya"]);
         if (_val.IndexOf(Grouping.Location.ToString()) >= 0)
         {
             _subyaxis = Grouping.Location;
             _sublocationtype = int.Parse(_val.Split(',')[1]);
         }
         else if (_val.IndexOf(Grouping.Class.ToString()) >= 0)
         {
             _subyaxis = Grouping.Class;
             string[] _arr = _val.Split(',');
             if (_arr.Length > 1) _subclasslevel = int.Parse(_arr[1]);
         }
         else _subyaxis = (Grouping)Enum.Parse(typeof(Grouping), _val, true);
     }
     if (_sd.ContainsKey("prt") && _sd["prt"].Length > 0) _priority = int.Parse(_sd["prt"]);
     if (_sd.ContainsKey("cls") && _sd["cls"].Length > 0) _class = int.Parse(_sd["cls"]);
     if (_sd.ContainsKey("ctg") && _sd["ctg"].Length > 0) _creationcategory = int.Parse(_sd["ctg"]);
     if (_sd.ContainsKey("stg") && _sd["stg"].Length > 0) _submissioncat = int.Parse(_sd["stg"]);
     if (_sd.ContainsKey("rtg") && _sd["rtg"].Length > 0) _resolutioncat = int.Parse(_sd["rtg"]);
     if (_sd.ContainsKey("lct") && _sd["lct"].Length > 0) _location = int.Parse(_sd["lct"]);
     if (_sd.ContainsKey("tch") && _sd["tch"].Length > 0) _technician = int.Parse(_sd["tch"]);
     if (_sd.ContainsKey("sby") && _sd["sby"].Length > 0) _submittedby = int.Parse(_sd["sby"]);
     if (_sd.ContainsKey("cby") && _sd["cby"].Length > 0) _closedby = int.Parse(_sd["cby"]);
     if (_sd.ContainsKey("acc") && _sd["acc"].Length > 0) _account = int.Parse(_sd["acc"]);
     if (_sd.ContainsKey("accl") && _sd["accl"].Length > 0) _accountLocation = int.Parse(_sd["accl"]);
     if (_sd.ContainsKey("accpl") && _sd["accpl"].Length > 0) _accountParentLocation = int.Parse(_sd["accpl"]);
     if (_sd.ContainsKey("tcht") && _sd["tcht"].Length > 0) technicianType = (TechnicianType)Enum.Parse(typeof(TechnicianType), HttpUtility.UrlDecode(_sd["tcht"]), true);
     if (_sd.ContainsKey("hcc") && _sd["hcc"].Length > 0) handledByCallCenter = (HandledByCallCenter)Enum.Parse(typeof(HandledByCallCenter), HttpUtility.UrlDecode(_sd["hcc"]), true);
     if (_sd.ContainsKey("lvl") && _sd["lvl"].Length > 0) _ticket_level = int.Parse(_sd["lvl"]);
     if (_sd.ContainsKey("sg") && _sd["sg"].Length > 0) _support_group = int.Parse(_sd["sg"]);
     if (_sd.ContainsKey("age") && _sd["age"].Length > 0) _age = int.Parse(_sd["age"]);
     if (_sd.ContainsKey("ager") && _sd["ager"].Length > 0) _age_equal = (EqualRange)Enum.Parse(typeof(EqualRange), HttpUtility.UrlDecode(_sd["ager"]), true);
     if (_sd.ContainsKey("ass") && _sd["ass"].Length > 0) _asset_filter = HttpUtility.UrlDecode(_sd["ass"]);
     if (_sd.ContainsKey("slaw") && _sd["slaw"].Length > 0) _sla_graph_width_id = int.Parse(_sd["slaw"]);
     if (_sd.ContainsKey("slag") && _sd["slag"].Length > 0) _sla_graph_view_id = int.Parse(_sd["slag"]);
 }
Ejemplo n.º 8
0
 public Fltr(int DId, int UId, int HourOffset, DateTime Start, DateTime End, DateRange Range, Grouping YAxis, Grouping SubYAxis, int PriorityID, int ClassID, int ClassLevel, int SubClassLevel, int CreationCategoryID, int LocationID, int LocationTypeID, int SubLocationTypeID, int TechnicianID, int SubmittedByID, int ClosedByID, int AccountID, int AccountLocationId, int accountParentLocationId, int SubmissionCategoryID, int ResolutionCategoryID, int AgeDay, EqualRange AgeRange, int TicketLevelID, int SupportGroupID, TechnicianType technicianType, HandledByCallCenter handledByCallCenter, string asset_filter, int sla_graph_width_id, int sla_graph_view_id)
     : this(DId, UId, HourOffset, Start, End, Range, YAxis, SubYAxis, PriorityID, ClassID, ClassLevel, SubClassLevel, CreationCategoryID, LocationID, LocationTypeID, SubLocationTypeID, TechnicianID, SubmittedByID, ClosedByID, AccountID, AccountLocationId, accountParentLocationId, SubmissionCategoryID, ResolutionCategoryID, AgeDay, AgeRange, TicketLevelID, SupportGroupID, technicianType, handledByCallCenter, asset_filter)
 {
     _sla_graph_width_id = sla_graph_width_id;
     _sla_graph_view_id  = sla_graph_view_id;
 }
Ejemplo n.º 9
0
        public Fltr(int DId, int Id)
        {
            _did = DId;
            _id  = Id;
            DataRow _row = SelectFilter(DId, _id);

            _uid = (int)_row["UId"];
            if (_row == null)
            {
                return;
            }
            _name    = _row["Name"].ToString();
            _reptype = (ReportType)(byte)_row["ReportType"];
            string[] _state = _row["FilterState"].ToString().Split('&');
            System.Collections.Specialized.StringDictionary _sd = new System.Collections.Specialized.StringDictionary();
            for (int i = 0; i < _state.Length; i++)
            {
                if (_state[i].Length == 0)
                {
                    continue;
                }
                string[] _item = _state[i].Split('=');
                if (_item.Length > 1)
                {
                    _sd.Add(_item[0], _item[1]);
                }
                else
                {
                    _sd.Add(_item[0], string.Empty);
                }
            }
            string[]        expectedFormats = { "MM/dd/yyyy HH:mm:ss", "MM/dd/yyyyHH:mm:ss", "MM.dd.yyyy HH:mm:ss", "MM.dd.yyyyHH:mm:ss" };
            IFormatProvider culture         = new CultureInfo("en-US", false);

            if (_sd.ContainsKey("ds") && _sd["ds"].Length > 0)
            {
                _start = DateTime.ParseExact(HttpUtility.UrlDecode(_sd["ds"]), expectedFormats, culture, DateTimeStyles.None);
            }
            if (_sd.ContainsKey("de") && _sd["de"].Length > 0)
            {
                _end = DateTime.ParseExact(HttpUtility.UrlDecode(_sd["de"]), expectedFormats, culture, DateTimeStyles.None);
            }
            if (_sd.ContainsKey("dr") && _sd["dr"].Length > 0)
            {
                this.DateRange = ConvertStringToRange(HttpUtility.UrlDecode(_sd["dr"]));
            }
            if (_sd.ContainsKey("ya") && _sd["ya"].Length > 0)
            {
                string _val = HttpUtility.UrlDecode(_sd["ya"]);
                if (_val.IndexOf(Grouping.Location.ToString()) >= 0)
                {
                    _yaxis        = Grouping.Location;
                    _locationtype = int.Parse(_val.Split(',')[1]);
                }
                else if (_val.IndexOf(Grouping.Class.ToString()) >= 0)
                {
                    _yaxis = Grouping.Class;
                    string[] _arr = _val.Split(',');
                    if (_arr.Length > 1)
                    {
                        _classlevel = int.Parse(_arr[1]);
                    }
                }
                else
                {
                    _yaxis = (Grouping)Enum.Parse(typeof(Grouping), _val, true);
                }
            }
            if (_sd.ContainsKey("sya") && _sd["sya"].Length > 0)
            {
                string _val = HttpUtility.UrlDecode(_sd["sya"]);
                if (_val.IndexOf(Grouping.Location.ToString()) >= 0)
                {
                    _subyaxis        = Grouping.Location;
                    _sublocationtype = int.Parse(_val.Split(',')[1]);
                }
                else if (_val.IndexOf(Grouping.Class.ToString()) >= 0)
                {
                    _subyaxis = Grouping.Class;
                    string[] _arr = _val.Split(',');
                    if (_arr.Length > 1)
                    {
                        _subclasslevel = int.Parse(_arr[1]);
                    }
                }
                else
                {
                    _subyaxis = (Grouping)Enum.Parse(typeof(Grouping), _val, true);
                }
            }
            if (_sd.ContainsKey("prt") && _sd["prt"].Length > 0)
            {
                _priority = int.Parse(_sd["prt"]);
            }
            if (_sd.ContainsKey("cls") && _sd["cls"].Length > 0)
            {
                _class = int.Parse(_sd["cls"]);
            }
            if (_sd.ContainsKey("ctg") && _sd["ctg"].Length > 0)
            {
                _creationcategory = int.Parse(_sd["ctg"]);
            }
            if (_sd.ContainsKey("stg") && _sd["stg"].Length > 0)
            {
                _submissioncat = int.Parse(_sd["stg"]);
            }
            if (_sd.ContainsKey("rtg") && _sd["rtg"].Length > 0)
            {
                _resolutioncat = int.Parse(_sd["rtg"]);
            }
            if (_sd.ContainsKey("lct") && _sd["lct"].Length > 0)
            {
                _location = int.Parse(_sd["lct"]);
            }
            if (_sd.ContainsKey("tch") && _sd["tch"].Length > 0)
            {
                _technician = int.Parse(_sd["tch"]);
            }
            if (_sd.ContainsKey("sby") && _sd["sby"].Length > 0)
            {
                _submittedby = int.Parse(_sd["sby"]);
            }
            if (_sd.ContainsKey("cby") && _sd["cby"].Length > 0)
            {
                _closedby = int.Parse(_sd["cby"]);
            }
            if (_sd.ContainsKey("acc") && _sd["acc"].Length > 0)
            {
                _account = int.Parse(_sd["acc"]);
            }
            if (_sd.ContainsKey("accl") && _sd["accl"].Length > 0)
            {
                _accountLocation = int.Parse(_sd["accl"]);
            }
            if (_sd.ContainsKey("accpl") && _sd["accpl"].Length > 0)
            {
                _accountParentLocation = int.Parse(_sd["accpl"]);
            }
            if (_sd.ContainsKey("tcht") && _sd["tcht"].Length > 0)
            {
                technicianType = (TechnicianType)Enum.Parse(typeof(TechnicianType), HttpUtility.UrlDecode(_sd["tcht"]), true);
            }
            if (_sd.ContainsKey("hcc") && _sd["hcc"].Length > 0)
            {
                handledByCallCenter = (HandledByCallCenter)Enum.Parse(typeof(HandledByCallCenter), HttpUtility.UrlDecode(_sd["hcc"]), true);
            }
            if (_sd.ContainsKey("lvl") && _sd["lvl"].Length > 0)
            {
                _ticket_level = int.Parse(_sd["lvl"]);
            }
            if (_sd.ContainsKey("sg") && _sd["sg"].Length > 0)
            {
                _support_group = int.Parse(_sd["sg"]);
            }
            if (_sd.ContainsKey("age") && _sd["age"].Length > 0)
            {
                _age = int.Parse(_sd["age"]);
            }
            if (_sd.ContainsKey("ager") && _sd["ager"].Length > 0)
            {
                _age_equal = (EqualRange)Enum.Parse(typeof(EqualRange), HttpUtility.UrlDecode(_sd["ager"]), true);
            }
            if (_sd.ContainsKey("ass") && _sd["ass"].Length > 0)
            {
                _asset_filter = HttpUtility.UrlDecode(_sd["ass"]);
            }
            if (_sd.ContainsKey("slaw") && _sd["slaw"].Length > 0)
            {
                _sla_graph_width_id = int.Parse(_sd["slaw"]);
            }
            if (_sd.ContainsKey("slag") && _sd["slag"].Length > 0)
            {
                _sla_graph_view_id = int.Parse(_sd["slag"]);
            }
        }