void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPandSSellPriceListRepository pandsRepository = new PandSSellPriceListRepository();

            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";
            }
        }
        private void RefreshData()
        {
            IPandSSellPriceListRepository pandsRepository = new PandSSellPriceListRepository();

            this.PandSSellPriceList = pandsRepository.GetPandSList().OrderBy(x => x.PandSName).ToList();
            this.ShowAllCount       = this.PandSSellPriceList.Count();
            this.ShowSelectedCount  = 0;
            FullList    = this.PandSSellPriceList.ToList();
            DefaultList = this.PandSSellPriceList.ToList();
            this.PandSSellPriceListcmb     = this.PandSSellPriceList.OrderBy(x => x.PandSName).ToList();
            this.PandSSellPriceListcmbCode = this.PandSSellPriceList.OrderBy(x => x.PandSCode).ToList();
            this.PandSSellPriceListcmbCat1 = this.PandSSellPriceList.GroupBy(x => x.Category1).Select(e => e.First()).OrderBy(x => x.Category1).ToList();
            this.PandSSellPriceListcmbCat2 = this.PandSSellPriceList.GroupBy(x => x.Category2).Select(e => e.First()).OrderBy(x => x.Category2).ToList();

            allPosition.Category1 = "All";
            allPosition.Category2 = "All";
            this.PandSSellPriceListcmbCat1.Insert(0, allPosition);
            this.PandSSellPriceListcmbCat2.Insert(0, allPosition);
            GetOptionsandTaxValues();
            this.ShowAllTrue      = true;
            this.ShowBoth         = true;
            this.ShowSelectedTrue = false;
            this.ShowProducts     = false;
            this.ShowServices     = false;

            if (this.ShowIncTaxTrue == true)
            {
                foreach (var item in this.PandSSellPriceList)
                {
                    item.StandardSellPriceStr = item.PandSStdSellPriceaftGST.ToString();
                    item.AverageSellPriceStr  = item.PandSAveSellPriceaftGST.ToString();
                    item.LastSellPriceStr     = item.PandSLastSoldPriceaftGST.ToString();
                }
            }
            else
            {
                foreach (var item in DefaultList)
                {
                    item.StandardSellPriceStr = item.PandSStdSellPricebefGST.ToString();
                    item.AverageSellPriceStr  = item.PandSAveSellPricebefGST.ToString();
                    item.LastSellPriceStr     = item.PandSLastSoldPricebefGST.ToString();
                }
            }
        }