private void RefreshData()
        {
            ICountAndAdjustStockListRepository casRepository = new CountAndAdjustStockListRepository();

            this.DateFormat   = casRepository.GetDateFormat();
            this.ShowAllCount = casRepository.GetAllStockCount().Count();
            GetOptionsandTaxValues();
            this.JsonData = casRepository.GetLastSelectionData(Convert.ToInt32(ScreenId.PurchaseQuotationList));
            this.CountAndAdjustStockList    = casRepository.GetAllStockCountJson(this.JsonData).OrderBy(e => e.CountAndAdjustStockNo).ToList();
            this.ShowSelectedCount          = this.CountAndAdjustStockList.Count();
            this.CountAndAdjustStockListcmb = casRepository.GetAllStockCount().OrderBy(x => x.CountAndAdjustStockNo).ToList();


            this.YearRange = casRepository.GetYearRange().ToList();
            //changedateformat(this.PurchaseQuotationList);
            changeNumberformat(this.CountAndAdjustStockList);
            changeNumberformat(this.CountAndAdjustStockListcmb);
            this.CountAndAdjustStockListDate   = this.CountAndAdjustStockList.GroupBy(x => x.CountAndAdjustStockDateDatetime).Select(y => y.First()).OrderBy(x => x.CountAndAdjustStockDateDatetime).Distinct().ToList();
            this.CountAndAdjustStockListSCNo   = casRepository.GetAllStockCount().OrderBy(e => e.CountAndAdjustStockListSCNo).ToList();
            this.CountAndAdjustStockListAmount = casRepository.GetAllStockCount().GroupBy(x => x.AdjustedAmountd).Select(y => y.First()).OrderBy(x => x.AdjustedAmountd).Distinct().ToList();
            DefaultList = this.CountAndAdjustStockListcmb;
            FullPQList  = this.CountAndAdjustStockListcmb;
            //this.ShowAllCount = this.PurchaseQuotationListcmb.Count();
            SetDefaultSearchSelection(this.JsonData);
            var    Updateddate = this.CountAndAdjustStockListcmb.Max(x => x.CreatedDateList);
            string date        = this.DateFormat as string;

            this.LastUpdateDate = Convert.ToDateTime(Updateddate).ToString(date);
            TotalStockAmount    = Convert.ToString(CountAndAdjustStockList.Sum(e => e.AdjustedAmountd));
            //this.GetData(this.SelectedSearchSupplier);
        }
        void ShowAll(object param)
        {
            this.YearmonthQuartTrue = false; //added after client feedback
            this.StartEndDateTrue   = false; //added after client feedback

            this.CountAndAdjustStockList    = FullPQList;
            this.CountAndAdjustStockListcmb = FullPQList;
            if (this.ShowAllTrue == false)
            {
                this.ShowSelectedCount = this.CountAndAdjustStockList.Count();
            }
            else
            {
                this.ShowSelectedCount = 0;
            }
            this.SelectedSearchEndDate   = null;
            this.SelectedSearchMonth     = null;
            this.SelectedSearchQuarter   = null;
            this.SelectedSearchYear      = null;
            this.SelectedSearchStartDate = null;
            this.SelectedSearchEndDate   = null;

            //commented and added on 23 may 2017
            this.CountAndAdjustStockList       = FullPQList.ToList();
            this.CountAndAdjustStockListDate   = this.CountAndAdjustStockList.GroupBy(x => x.CountAndAdjustStockDateDatetime).Select(y => y.First()).OrderBy(x => x.CountAndAdjustStockDateDatetime).Distinct().ToList();
            this.CountAndAdjustStockListSCNo   = CountAndAdjustStockList.OrderBy(e => e.CountAndAdjustStockNo).ToList();
            this.CountAndAdjustStockListAmount = this.CountAndAdjustStockList.GroupBy(x => x.AdjustedAmountd).Select(y => y.First()).OrderBy(x => x.AdjustedAmountd).Distinct().ToList();
            //if (this.IncludingGSTTrue == true)
            //    this.PurchaseQuotationList = FullPQList.Where(x => x.ExcIncGST == true).ToList();
            //else
            //    this.PurchaseQuotationList = FullPQList.Where(x => x.ExcIncGST == false).ToList();
            Mouse.OverrideCursor = Cursors.Wait;
            Search(null);
            Mouse.OverrideCursor = null;
        }