public async void onSearchAlarms()
        {
            //Implement for each query Group by PropertyName : StationName , Priority or Desc.
            //ExpressGen();

            IEnumerable <IGrouping <string, Item> > groupFields =
                from item in searchList
                group item by item.FieldName;

            string[] search_Parse_Pri_List = search_Parse_Pri.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
            Console.WriteLine(search_Parse_Pri_List.Length);

            //searchParseDeleg = SearchingExpressionBuilder.GetExpression<RestorationAlarmList>(groupFields, search_Parse_Pri);
            searchParseDeleg = SearchingExpressionBuilder.GetExpression <RestorationAlarmLists>(groupFields, search_Parse_Pri_List, _search_Parse_Sec);

            if (searchParseDeleg == null)
            {
                Console.WriteLine("Expression Building Error");
            }
            else
            {
                RestAlarmsRepo.custPageIndex    = 1;
                RestAlarmsRepo.filterParseDeleg = searchParseDeleg;
                RestAlarmsRepo.fDateTimeCondEnd = DateTime.Now;
                await RestAlarmsRepo.TGetCustAlarmAct();

                Console.WriteLine(searchParseDeleg.Body);
            }
        }
        // WPF Call with 2 parameter
        private async void RunFilterTimeCond(object value)
        {
            RestAlarmsRepo.fDateTimeCondItem = (TimeCondItem)value;
            RestAlarmsRepo.fDateTimeCondEnd = DateTime.Now;
            await RestAlarmsRepo.TGetCustAlarmAct();

            //Console.WriteLine(filterParseDeleg.Body);
        }
 private async void onNextPageCommand()
 {
     custPageIndex += 1;
     Console.WriteLine(DateTime.Now.ToString() + " : goto page : " + _custPageIndex);
     RestAlarmsRepo.custPageIndex = custPageIndex;
     //RestAlarmsRepo.fDateTimeCondEnd = DateTime.Now;
     await RestAlarmsRepo.TGetCustAlarmAct();
 }
        public async void onFilterAlarms()
        {
            //Implement for each query Group by PropertyName : StationName , Priority or Desc.
            //ExpressGen();
            Console.WriteLine("Run Filter cmd");
            //CustAlarmViewModel = _custAlarmViewModel;

            IEnumerable<IGrouping<string, Item>> groupFields =
                    from item in filters
                    group item by item.FieldName;

            filterParseDeleg = FilterExpressionBuilder.GetExpression<RestorationAlarmLists>(groupFields);

            RestAlarmsRepo.filterParseDeleg = filterParseDeleg;
            RestAlarmsRepo.fDateTimeCondEnd = DateTime.Now;
            await RestAlarmsRepo.TGetCustAlarmAct();

            Console.WriteLine(filterParseDeleg.Body);

        }
        private async void EnterPage(object txtPage)
        {
            custPageIndex = Convert.ToInt32(txtPage);
            if (_custPageIndex <= 0)
            {
                custPageIndex = 1;
            }
            if (_custPageIndex > RestAlarmsRepo.custPageCount)
            {
                custPageIndex = RestAlarmsRepo.custPageCount;
            }

            Console.WriteLine(DateTime.Now.ToString() + " : goto page : " + _custPageIndex);
            RestAlarmsRepo.custPageIndex = custPageIndex;
            //RestAlarmsRepo.fDateTimeCondEnd = DateTime.Now;
            await RestAlarmsRepo.TGetCustAlarmAct();

            //To Do function Update RestAlarmsRepo.RestAlarmListDump
            //CustRestAlarmListDump = await RestAlarmsRepo.GetCustomRestAlarmsAsync(RestAlarmsRepo.filterParseDeleg, custPageIndex, pageSize);
            //CustomAlarms = new ObservableCollection<RestorationAlarmList>(CustRestAlarmListDump);
        }
 private async void RunSearchTimeCond(object value)
 {
     RestAlarmsRepo.fDateTimeCondItem = (TimeCondItem)value;
     RestAlarmsRepo.fDateTimeCondEnd  = DateTime.Now;
     await RestAlarmsRepo.TGetCustAlarmAct();
 }