private void RefreshData()
        {
            IPurchaseQuotationListRepository purchaseRepository = new PurchaseQuotationListRepository();

            this.DateFormat   = purchaseRepository.GetDateFormat();
            this.ShowAllCount = purchaseRepository.GetAllPurQuotation().Count();
            GetOptionsandTaxValues();
            this.JsonData = purchaseRepository.GetLastSelectionData(Convert.ToInt32(ScreenId.PurchaseQuotationList));
            this.PurchaseQuotationList    = purchaseRepository.GetAllPurQuotationJson(this.JsonData, this.IncludingGSTTrue).OrderBy(e => e.SupplierName).ToList();
            this.ShowSelectedCount        = this.PurchaseQuotationList.Count();
            this.PurchaseQuotationListcmb = purchaseRepository.GetAllPurQuotation().OrderBy(x => x.SupplierName).ToList();
            this.PurchaseQuotationListSup = this.PurchaseQuotationList.GroupBy(x => x.SupplierName).Select(y => y.First()).OrderBy(x => x.SupplierName).Distinct().ToList();

            this.YearRange = purchaseRepository.GetYearRange().ToList();
            //changedateformat(this.PurchaseQuotationList);
            changeNumberformat(this.PurchaseQuotationList);
            changeNumberformat(this.PurchaseQuotationListcmb);
            this.PurchaseQuotationListQno = purchaseRepository.GetAllPurQuotation().OrderBy(e => e.SortQuotationNo).ToList();
            DefaultList = this.PurchaseQuotationListcmb;
            FullPQList  = this.PurchaseQuotationListcmb;
            //this.ShowAllCount = this.PurchaseQuotationListcmb.Count();
            SetDefaultSearchSelection(this.JsonData);
            var    Updateddate = this.PurchaseQuotationListcmb.Max(x => x.CreatedDateList);
            string date        = this.DateFormat as string;

            this.LastUpdateDate  = Convert.ToDateTime(Updateddate).ToString(date);
            TotalQuotationAmount = Convert.ToString(PurchaseQuotationList.Sum(e => e.QAmount));
            //this.GetData(this.SelectedSearchSupplier);
        }
        public void LoadSearchResult(string Suppliername)
        {
            IPurchaseQuotationListRepository purchaseRepository = new PurchaseQuotationListRepository();

            this.ShowAllCount          = purchaseRepository.GetAllPurQuotation().Count();
            this.PurchaseQuotationList = purchaseRepository.GetAllPurQuotation().Where(x => x.SupplierName == Suppliername).ToList();
        }
        void showexcGST(object param)
        {
            int decimalpoints = Convert.ToInt32(this.DecimalPlaces);
            //foreach (var item in this.PurchaseQuotationList)
            //{
            //    //item.QuotationAmount = item.QuotationAmountExcGST;
            //    item.QuotationAmount = Math.Round(Convert.ToDouble(item.QuotationAmountExcGST), decimalpoints).ToString();
            //}
            //if (this.ShowAllTrue == false)
            //    this.PurchaseQuotationList = DefaultList.Where(x => x.ExcIncGST == false).ToList();
            //else
            //    this.PurchaseQuotationList = FullPQList.Where(x => x.ExcIncGST == false).ToList();
            IPurchaseQuotationListRepository purchaseRepository = new PurchaseQuotationListRepository();

            this.PurchaseQuotationList = purchaseRepository.GetAllPurQuotationJson(this.JsonData, this.IncludingGSTTrue).ToList();

            if (this.ShowAllTrue == false)
            {
                this.ShowSelectedCount = this.PurchaseQuotationList.Count();
            }
            else
            {
                this.ShowSelectedCount = 0;
            }
            this.PurchaseQuotationListcmb = this.PurchaseQuotationList.OrderBy(e => e.SupplierName).ToList();
            this.PurchaseQuotationListSup = this.PurchaseQuotationList.GroupBy(x => x.SupplierName).Select(y => y.First()).OrderBy(x => x.SupplierName).Distinct().ToList();
            this.PurchaseQuotationListQno = purchaseRepository.GetAllPurQuotation().OrderBy(e => e.SortQuotationNo).ToList();
            DefaultList = this.PurchaseQuotationListcmb;
            //changedateformat(this.PurchaseQuotationList);
            //changeNumberformat(this.PurchaseQuotationList);
        }