Example #1
0
        public static IEnumerable <MonitorOperators> GetEehMonitorOperatorsRange(this ICoreDataSource db, ListEditItemsRequestedByFilterConditionEventArgs args)
        {
            // db must be CorePortalEntities:
            var dbCPE    = (CorePortalEntities)db;
            var tranDT   = new ObjectParameter("tranDT", typeof(DateTime?));
            var result   = new ObjectParameter("result", typeof(int?));
            var debugMsg = new ObjectParameter("debugMsg", typeof(string));

            return(dbCPE.GetEehMonitorOperatorsByRange($"%{args.Filter}%", args.BeginIndex, args.EndIndex, tranDT, result, 0,
                                                       debugMsg).ToList());
        }
Example #2
0
        public static ICollection <MonitorOperators> GetMonitorOperators(this ICoreDataSource db,
                                                                         string monitorLoginLocation)
        {
            // db must be CorePortalEntities:
            var dbCPE    = (CorePortalEntities)db;
            var tranDT   = new ObjectParameter("tranDT", typeof(DateTime?));
            var result   = new ObjectParameter("result", typeof(int?));
            var debugMsg = new ObjectParameter("debugMsg", typeof(string));

            return(dbCPE.GetMonitorOperators(monitorLoginLocation, tranDT, result, 0, debugMsg).ToList());
        }
Example #3
0
        public static MonitorOperators GetEehMonitorOperatorsByOperator(this ICoreDataSource db, ListEditItemRequestedByValueEventArgs args)
        {
            if (args.Value == null)
            {
                return((MonitorOperators)null);
            }
            // db must be CorePortalEntities:
            var dbCPE    = (CorePortalEntities)db;
            var tranDT   = new ObjectParameter("tranDT", typeof(DateTime?));
            var result   = new ObjectParameter("result", typeof(int?));
            var debugMsg = new ObjectParameter("debugMsg", typeof(string));

            return(dbCPE.GetEehMonitorOperator(args.Value.ToString(), tranDT, result, 0, debugMsg)
                   .SingleOrDefault());
        }