Example #1
0
        void ShowAll(object param)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            //  this.YearmonthQuartTrue = false;//added after client feedback
            // this.StartEndDateTrue = false;//added after client feedback
            this.PandSHistoryList    = FullPQList.OrderBy(x => x.ProductCode).ToList();
            this.PandSHistoryListcmb = FullPQList.OrderBy(x => x.ProductCode).ToList();
            //this.PandSHistorycmbCredit = this.PandSHistorycmb.GroupBy(x => x.CashCreditNo).Select(g => g.First()).OrderBy(x => x.CreditCashNO).Where(y => y.CashCreditNo != null).ToList();
            //this.PandSHistorycmbSup = this.PandSHistory.GroupBy(x => x.CustomerName).Select(y => y.First()).OrderBy(x => x.CustomerName).Distinct().ToList();
            //this.PandSHistorycmbInv = this.PandSHistory.GroupBy(x => x.InvoiceNo).Select(y => y.First()).OrderBy(x => x.SortInvoiceNo).Distinct().ToList();
            //if (this.ShowAllTrue == false)
            //    this.ShowSelectedCount = this.PandSHistory.Count();
            //else
            //    this.ShowSelectedCount = 0;

            this.SelectedSearchEndDate   = null;
            this.SelectedSearchMonth     = null;
            this.SelectedSearchQuarter   = null;
            this.SelectedSearchYear      = null;
            this.SelectedSearchStartDate = null;
            this.SelectedSearchEndDate   = null;
            if (this.IncludingGST == true)
            {
                this.PandSHistoryList = FullPQList.Where(x => x.ExcIncGST == true).OrderBy(x => x.ProductCode).ToList();
            }
            else
            {
                this.PandSHistoryList = FullPQList.Where(x => x.ExcIncGST == false).OrderBy(x => x.ProductCode).ToList();
            }
            Search(null);
            Mouse.OverrideCursor = null;
        }
 void ShowAll(object param)
 {
     this.YearmonthQuartTrue       = false; //added after client feedback
     this.StartEndDateTrue         = false; //added after client feedback
     this.SalesQuotationList       = FullPQList.OrderBy(x => x.CustomerName).ToList();
     this.SalesQuotationListcmb    = FullPQList.OrderBy(x => x.CustomerName).ToList();
     this.SalesQuotationListcmbSup = this.SalesQuotationList.GroupBy(x => x.CustomerName).Select(y => y.First()).OrderBy(x => x.CustomerName).Distinct().ToList();
     this.SalesQuotationListcmbQNo = this.SalesQuotationList.GroupBy(x => x.QuotationNo).Select(y => y.First()).OrderBy(x => x.SortQuotationNo).Distinct().ToList();
     if (this.ShowAllTrue == false)
     {
         this.ShowSelectedCount = this.SalesQuotationList.Count();
     }
     else
     {
         this.ShowSelectedCount = 0;
     }
     this.SelectedSearchEndDate   = null;
     this.SelectedSearchMonth     = null;
     this.SelectedSearchQuarter   = null;
     this.SelectedSearchYear      = null;
     this.SelectedSearchStartDate = null;
     this.SelectedSearchEndDate   = null;
     //added on 23 may 2017
     this.SalesQuotationList = FullPQList.OrderBy(x => x.CustomerName).ToList();
     //if (this.IncludingGSTTrue == true)
     //    this.SalesQuotationList = FullPQList.Where(x => x.ExcIncGST == true).ToList();
     //else
     //    this.SalesQuotationList = FullPQList.Where(x => x.ExcIncGST == false).ToList();
     //end
     Search(null);
 }
        void ShowAll(object param)
        {
            Mouse.OverrideCursor          = Cursors.Wait;
            this.YearmonthQuartTrue       = false; //added after client feedback
            this.StartEndDateTrue         = false; //added after client feedback
            this.RefundToCustomersList    = FullPQList.OrderBy(x => x.CustomerName).ToList();
            this.RefundToCustomersListcmb = FullPQList.OrderBy(x => x.CustomerName).ToList();
            // this.RefundToCustomersListcmbDebit = this.RefundToCustomersListcmb.GroupBy(x => x.CashDebitNo).Select(g => g.First()).Where(y => y.CashDebitNo != null).ToList();
            this.RefundToCustomersListcmbSup = this.RefundToCustomersList.GroupBy(x => x.CustomerName).Select(y => y.First()).Distinct().OrderBy(x => x.CustomerName).ToList();
            this.RefundToCustomersListcmbInv = this.RefundToCustomersList.GroupBy(x => x.InvoiceNo).Select(y => y.First()).Distinct().OrderBy(x => x.InvoiceNo).ToList();
            if (this.ShowAllTrue == false)
            {
                this.ShowSelectedCount = this.RefundToCustomersList.Count();
            }
            else
            {
                this.ShowSelectedCount = 0;
            }
            this.SelectedSearchEndDate   = null;
            this.SelectedSearchMonth     = null;
            this.SelectedSearchQuarter   = null;
            this.SelectedSearchYear      = null;
            this.SelectedSearchStartDate = null;
            this.SelectedSearchEndDate   = null;

            Search(null);
            Mouse.OverrideCursor = null;
        }
 void ShowAll(object param)
 {
     this.ShowAllTrue             = true;
     Mouse.OverrideCursor         = Cursors.Wait;
     this.YearmonthQuartTrue      = false; //added after client feedback
     this.StartEndDateTrue        = false; //added after client feedback
     this.CreditNoteList          = FullPQList.OrderBy(x => x.CustomerName).ToList();
     this.CreditNoteListcmb       = FullPQList.OrderBy(x => x.CustomerName).ToList();
     this.CreditNoteListcmbCredit = this.CreditNoteList.GroupBy(x => x.InvoiceNoCashChequeNo).Select(g => g.First()).Where(y => !string.IsNullOrEmpty(y.InvoiceNoCashChequeNo) || !string.IsNullOrWhiteSpace(y.InvoiceNoCashChequeNo)).OrderBy(x => x.InvoiceNoCashChequeNo).ToList();
     this.CreditNoteListcmbCus    = this.CreditNoteList.GroupBy(x => x.CustomerName).Select(y => y.First()).Distinct().OrderBy(x => x.CustomerName).ToList();
     this.CreditNoteListcmbInv    = this.CreditNoteList.GroupBy(x => x.CreditNo).Select(y => y.First()).Distinct().OrderBy(x => x.SortCreditNoteNo).ToList();
     //if (this.ShowAllTrue == false)
     //    this.ShowSelectedCount = this.CreditNoteList.Count();
     //else
     //    this.ShowSelectedCount = 0;
     this.SelectedSearchEndDate   = null;
     this.SelectedSearchMonth     = null;
     this.SelectedSearchQuarter   = null;
     this.SelectedSearchYear      = null;
     this.SelectedSearchStartDate = null;
     this.SelectedSearchEndDate   = null;
     if (this.IncludingGSTTrue == true)
     {
         this.CreditNoteList = FullPQList.Where(x => x.ExcIncGST == true).OrderBy(x => x.CustomerName).ToList();
     }
     else
     {
         this.CreditNoteList = FullPQList.Where(x => x.ExcIncGST == false).OrderBy(x => x.CustomerName).ToList();
     }
     Search(null);
     Mouse.OverrideCursor = null;
 }