private void RefreshData()
        {
            IPandSStockQuantitiesListRepository pandsRepository = new PandSStockQuantitiesListRepository();

            this.PandSStockQuantitiesList = pandsRepository.GetPandSList().OrderBy(x => x.PandSName).ToList();
            CheckInQty(this.PandSStockQuantitiesList);


            this.ShowAllCount      = this.PandSStockQuantitiesList.Count();
            this.ShowSelectedCount = 0;
            FullList    = this.PandSStockQuantitiesList.ToList();
            DefaultList = this.PandSStockQuantitiesList.ToList();
            this.PandSStockQuantitiesListcmb     = this.PandSStockQuantitiesList.OrderBy(x => x.PandSName).ToList();
            this.PandSStockQuantitiesListcmbCode = this.PandSStockQuantitiesList.OrderBy(x => x.PandSCode).ToList();
            this.PandSStockQuantitiesListcmbCat1 = this.PandSStockQuantitiesList.GroupBy(x => x.Category1).Select(e => e.First()).OrderBy(x => x.Category1).ToList();
            this.PandSStockQuantitiesListcmbCat2 = this.PandSStockQuantitiesList.GroupBy(x => x.Category2).Select(e => e.First()).OrderBy(x => x.Category2).ToList();

            allPosition.Category1 = "All";
            allPosition.Category2 = "All";
            this.PandSStockQuantitiesListcmbCat1.Insert(0, allPosition);
            this.PandSStockQuantitiesListcmbCat2.Insert(0, allPosition);
            //GetOptionsandTaxValues();
            this.ShowAllTrue      = true;
            this.ShowBoth         = true;
            this.ShowSelectedTrue = false;
            //this.ShowProducts = false;
            //this.ShowServices = false;
        }
        void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPandSStockQuantitiesListRepository pandsRepository = new PandSStockQuantitiesListRepository();

            oData = pandsRepository.GetOptionDetails();
            if (oData != null)
            {
                this.CurrencyName   = oData.CurrencyCode;   //there is no currency name field in database
                this.CurrencyCode   = oData.CurrencyCode;
                this.CurrencyFormat = oData.NumberFormat;
                this.DateFormat     = oData.DateFormat;
                this.DecimalPlaces  = oData.DecimalPlaces;
                if (oData.ShowAmountIncGST == true)
                {
                    this.ShowIncTaxTrue = true;
                    this.ShowExcTaxTrue = false;
                    //int decimalpoints = Convert.ToInt32(DecimalPlaces);
                    //foreach (var item in this.PurchaseQuotationList)
                    //{
                    //    item.QuotationAmount = Math.Round(Convert.ToDouble(item.QuotationAmount), decimalpoints).ToString();
                    //}
                    //this.PurchaseQuotationList = this.PurchaseQuotationList.Where(x => x.ExcIncGST == true).ToList();
                }
                else
                {
                    this.ShowIncTaxTrue = false;
                    this.ShowExcTaxTrue = true;
                    int decimalpoints = Convert.ToInt32(DecimalPlaces);
                    //foreach (var item in this.PurchaseQuotationList)
                    //{
                    //    //item.QuotationAmount = item.QuotationAmountExcGST;
                    //    //item.QuotationAmount = Math.Round(Convert.ToDouble(item.QuotationAmountExcGST), decimalpoints).ToString();
                    //    item.QuotationAmount = Math.Round(Convert.ToDouble(item.QuotationAmount), decimalpoints).ToString();
                    //}
                    //commented on 23 May 2017
                    //if (this.PurchaseQuotationList != null)
                    //    this.PurchaseQuotationList = this.PurchaseQuotationList.Where(x => x.ExcIncGST == false).ToList();
                }
            }
            else
            {
                this.CurrencyName   = "USD";
                this.CurrencyCode   = "USD";
                this.CurrencyFormat = "en-US";
                this.DateFormat     = "dd/MM/yyyy";
            }
            var objDefaultTax = pandsRepository.GetTaxes().FirstOrDefault();

            if (objDefaultTax != null)
            {
                this.TaxName = objDefaultTax.TaxName;
            }
            else
            {
                this.TaxName = "GST";
            }
        }