internal void filterBuyingCheque() { try { BuyingCheque bc = getBuyingChequeForFilter(); bc.LimitStart = buyingChequeRreport.Pagination.LimitStart; bc.LimitEnd = buyingChequeRreport.Pagination.LimitCount; List <BuyingCheque> list = paymentManagerImpl.getBuyingCheque(bc); buyingChequeRreport.DataTable.Rows.Clear(); foreach (BuyingCheque buyingCheque in list) { buyingChequeRreport.DataTable.Rows.Add(buyingCheque.Id, bankManagerImpl.getBankById(buyingCheque.BankId).Name, buyingCheque.ChequeNumber, buyingCheque.IssuedDate.ToString("yyyy-MM-dd"), buyingCheque.PayableDate.ToString("yyyy-MM-dd"), buyingCheque.Amount.ToString("#,##0.00"), CommonMethods.getStatusForCheque(buyingCheque.Status)); } } catch (Exception) { } }
internal void filter() { try { if (chequeManager.radioButton_buying_filter.IsChecked == true) { BuyingCheque bc = getBuyingChequeForFilter(); bc.LimitStart = chequeManager.Pagination.LimitStart; bc.LimitEnd = chequeManager.Pagination.LimitCount; List <BuyingCheque> list = paymentManagerImpl.getBuyingCheque(bc); chequeManager.DataTable.Rows.Clear(); foreach (BuyingCheque buyingCheque in list) { chequeManager.DataTable.Rows.Add( buyingCheque.Id, bankManagerImpl.getBankById(buyingCheque.BankId).Name, buyingCheque.ChequeNumber, buyingCheque.IssuedDate.ToString("yyyy-MM-dd"), buyingCheque.PayableDate.ToString("yyyy-MM-dd"), buyingCheque.Amount.ToString("#,##0.00"), buyingCheque.Notes, CommonMethods.getStatusForCheque(buyingCheque.Status) ); } } else { SellingCheque sc = getSellingChequeForFilter(); sc.LimitStart = chequeManager.Pagination.LimitStart; sc.LimitEnd = chequeManager.Pagination.LimitCount; List <SellingCheque> list = paymentManagerImpl.getSellingCheque(sc); chequeManager.DataTable.Rows.Clear(); foreach (SellingCheque sellingCheque in list) { chequeManager.DataTable.Rows.Add( sellingCheque.Id, bankManagerImpl.getBankById(sellingCheque.BankId).Name, sellingCheque.ChequeNumber, sellingCheque.IssuedDate.ToString("yyyy-MM-dd"), sellingCheque.PayableDate.ToString("yyyy-MM-dd"), sellingCheque.Amount.ToString("#,##0.00"), sellingCheque.Notes, CommonMethods.getStatusForCheque(sellingCheque.Status) ); } } } catch (Exception) { } }