internal virtual StringBuilder GetAutoPropertyFilterString() { var res = new StringBuilder(); if (string.IsNullOrEmpty(InvoiceNoFilter) == false) { res.Append(" && " + string.Format("InvoiceNo.Contains(\"{0}\")", InvoiceNoFilter)); } if (Convert.ToDateTime(StartDateFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndDateFilter).Date != DateTime.MinValue) { res.Append(" && ("); } if (Convert.ToDateTime(StartDateFilter).Date != DateTime.MinValue) { if (StartDateFilter.HasValue) { res.Append( (Convert.ToDateTime(EndDateFilter).Date != DateTime.MinValue?"":" && ") + string.Format("Date >= \"{0}\"", Convert.ToDateTime(StartDateFilter).Date.ToString("MM/dd/yyyy"))); } } if (Convert.ToDateTime(EndDateFilter).Date != DateTime.MinValue) { if (EndDateFilter.HasValue) { res.Append(" && " + string.Format("Date <= \"{0}\"", Convert.ToDateTime(EndDateFilter).Date.AddHours(23).ToString("MM/dd/yyyy HH:mm:ss"))); } } if (Convert.ToDateTime(StartDateFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndDateFilter).Date != DateTime.MinValue) { res.Append(" )"); } if (Convert.ToDateTime(_dateFilter).Date != DateTime.MinValue) { if (DateFilter.HasValue) { res.Append(" && " + string.Format("Date == \"{0}\"", Convert.ToDateTime(DateFilter).Date.ToString("MM/dd/yyyy"))); } } if (TAX_AMTFilter.HasValue) { res.Append(" && " + string.Format("TAX_AMT == {0}", TAX_AMTFilter.ToString())); } if (string.IsNullOrEmpty(CustomerNameFilter) == false) { res.Append(" && " + string.Format("CustomerName.Contains(\"{0}\")", CustomerNameFilter)); } if (LineNumberFilter.HasValue) { res.Append(" && " + string.Format("LineNumber == {0}", LineNumberFilter.ToString())); } if (DownloadedFilter.HasValue) { res.Append(" && " + string.Format("Downloaded == {0}", DownloadedFilter)); } return(res.ToString().StartsWith(" &&") || res.Length == 0 ? res: res.Insert(0, " && ")); }
internal virtual StringBuilder GetAutoPropertyFilterString() { var res = new StringBuilder(); if (ReceivedQtyFilter.HasValue) { res.Append(" && " + string.Format("ReceivedQty == {0}", ReceivedQtyFilter.ToString())); } if (string.IsNullOrEmpty(ItemNumberFilter) == false) { res.Append(" && " + string.Format("ItemNumber.Contains(\"{0}\")", ItemNumberFilter)); } if (string.IsNullOrEmpty(ItemDescriptionFilter) == false) { res.Append(" && " + string.Format("ItemDescription.Contains(\"{0}\")", ItemDescriptionFilter)); } if (CostFilter.HasValue) { res.Append(" && " + string.Format("Cost == {0}", CostFilter.ToString())); } if (InvoiceQtyFilter.HasValue) { res.Append(" && " + string.Format("InvoiceQty == {0}", InvoiceQtyFilter.ToString())); } if (string.IsNullOrEmpty(InvoiceNoFilter) == false) { res.Append(" && " + string.Format("InvoiceNo.Contains(\"{0}\")", InvoiceNoFilter)); } if (Convert.ToDateTime(StartInvoiceDateFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndInvoiceDateFilter).Date != DateTime.MinValue) { res.Append(" && ("); } if (Convert.ToDateTime(StartInvoiceDateFilter).Date != DateTime.MinValue) { if (StartInvoiceDateFilter.HasValue) { res.Append( (Convert.ToDateTime(EndInvoiceDateFilter).Date != DateTime.MinValue?"":" && ") + string.Format("InvoiceDate >= \"{0}\"", Convert.ToDateTime(StartInvoiceDateFilter).Date.ToString("MM/dd/yyyy"))); } } if (Convert.ToDateTime(EndInvoiceDateFilter).Date != DateTime.MinValue) { if (EndInvoiceDateFilter.HasValue) { res.Append(" && " + string.Format("InvoiceDate <= \"{0}\"", Convert.ToDateTime(EndInvoiceDateFilter).Date.AddHours(23).ToString("MM/dd/yyyy HH:mm:ss"))); } } if (Convert.ToDateTime(StartInvoiceDateFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndInvoiceDateFilter).Date != DateTime.MinValue) { res.Append(" )"); } if (Convert.ToDateTime(_invoiceDateFilter).Date != DateTime.MinValue) { if (InvoiceDateFilter.HasValue) { res.Append(" && " + string.Format("InvoiceDate == \"{0}\"", Convert.ToDateTime(InvoiceDateFilter).Date.ToString("MM/dd/yyyy"))); } } if (string.IsNullOrEmpty(CNumberFilter) == false) { res.Append(" && " + string.Format("CNumber.Contains(\"{0}\")", CNumberFilter)); } if (string.IsNullOrEmpty(RegistrationDateFilter) == false) { res.Append(" && " + string.Format("RegistrationDate.Contains(\"{0}\")", RegistrationDateFilter)); } if (DurationFilter.HasValue) { res.Append(" && " + string.Format("Duration == {0}", DurationFilter.ToString())); } if (InvoiceMonthFilter.HasValue) { res.Append(" && " + string.Format("InvoiceMonth == {0}", InvoiceMonthFilter.ToString())); } if (AsycudaMonthFilter.HasValue) { res.Append(" && " + string.Format("AsycudaMonth == {0}", AsycudaMonthFilter.ToString())); } if (AllocatedValueFilter.HasValue) { res.Append(" && " + string.Format("AllocatedValue == {0}", AllocatedValueFilter.ToString())); } if (ReceivedValueFilter.HasValue) { res.Append(" && " + string.Format("ReceivedValue == {0}", ReceivedValueFilter.ToString())); } if (InvoiceValueFilter.HasValue) { res.Append(" && " + string.Format("InvoiceValue == {0}", InvoiceValueFilter.ToString())); } if (LineNumberFilter.HasValue) { res.Append(" && " + string.Format("LineNumber == {0}", LineNumberFilter.ToString())); } if (PiQuantityFilter.HasValue) { res.Append(" && " + string.Format("PiQuantity == {0}", PiQuantityFilter.ToString())); } if (string.IsNullOrEmpty(OverShortDetailStatusFilter) == false) { res.Append(" && " + string.Format("OverShortDetailStatus.Contains(\"{0}\")", OverShortDetailStatusFilter)); } if (QtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("QtyAllocated == {0}", QtyAllocatedFilter.ToString())); } if (string.IsNullOrEmpty(AllocationStatusFilter) == false) { res.Append(" && " + string.Format("AllocationStatus.Contains(\"{0}\")", AllocationStatusFilter)); } return(res.ToString().StartsWith(" &&") || res.Length == 0 ? res: res.Insert(0, " && ")); }
internal virtual StringBuilder GetAutoPropertyFilterString() { var res = new StringBuilder(); if (string.IsNullOrEmpty(Amount_deducted_from_licenceFilter) == false) { res.Append(" && " + string.Format("Amount_deducted_from_licence.Contains(\"{0}\")", Amount_deducted_from_licenceFilter)); } if (string.IsNullOrEmpty(Licence_numberFilter) == false) { res.Append(" && " + string.Format("Licence_number.Contains(\"{0}\")", Licence_numberFilter)); } if (string.IsNullOrEmpty(Free_text_1Filter) == false) { res.Append(" && " + string.Format("Free_text_1.Contains(\"{0}\")", Free_text_1Filter)); } if (string.IsNullOrEmpty(Free_text_2Filter) == false) { res.Append(" && " + string.Format("Free_text_2.Contains(\"{0}\")", Free_text_2Filter)); } if (LineNumberFilter.HasValue) { res.Append(" && " + string.Format("LineNumber == {0}", LineNumberFilter.ToString())); } if (IsAssessedFilter.HasValue) { res.Append(" && " + string.Format("IsAssessed == {0}", IsAssessedFilter)); } if (DPQtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("DPQtyAllocated == {0}", DPQtyAllocatedFilter.ToString())); } if (DFQtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("DFQtyAllocated == {0}", DFQtyAllocatedFilter.ToString())); } if (Convert.ToDateTime(StartEntryTimeStampFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndEntryTimeStampFilter).Date != DateTime.MinValue) { res.Append(" && ("); } if (Convert.ToDateTime(StartEntryTimeStampFilter).Date != DateTime.MinValue) { if (StartEntryTimeStampFilter.HasValue) { res.Append( (Convert.ToDateTime(EndEntryTimeStampFilter).Date != DateTime.MinValue?"":" && ") + string.Format("EntryTimeStamp >= \"{0}\"", Convert.ToDateTime(StartEntryTimeStampFilter).Date.ToString("MM/dd/yyyy"))); } } if (Convert.ToDateTime(EndEntryTimeStampFilter).Date != DateTime.MinValue) { if (EndEntryTimeStampFilter.HasValue) { res.Append(" && " + string.Format("EntryTimeStamp <= \"{0}\"", Convert.ToDateTime(EndEntryTimeStampFilter).Date.AddHours(23).ToString("MM/dd/yyyy HH:mm:ss"))); } } if (Convert.ToDateTime(StartEntryTimeStampFilter).Date != DateTime.MinValue && Convert.ToDateTime(EndEntryTimeStampFilter).Date != DateTime.MinValue) { res.Append(" )"); } if (Convert.ToDateTime(_entryTimeStampFilter).Date != DateTime.MinValue) { if (EntryTimeStampFilter.HasValue) { res.Append(" && " + string.Format("EntryTimeStamp == \"{0}\"", Convert.ToDateTime(EntryTimeStampFilter).Date.ToString("MM/dd/yyyy"))); } } if (AttributeOnlyAllocationFilter.HasValue) { res.Append(" && " + string.Format("AttributeOnlyAllocation == {0}", AttributeOnlyAllocationFilter)); } if (DoNotAllocateFilter.HasValue) { res.Append(" && " + string.Format("DoNotAllocate == {0}", DoNotAllocateFilter)); } if (DoNotEXFilter.HasValue) { res.Append(" && " + string.Format("DoNotEX == {0}", DoNotEXFilter)); } if (Item_priceFilter.HasValue) { res.Append(" && " + string.Format("Item_price == {0}", Item_priceFilter.ToString())); } if (string.IsNullOrEmpty(ItemNumberFilter) == false) { res.Append(" && " + string.Format("ItemNumber.Contains(\"{0}\")", ItemNumberFilter)); } if (string.IsNullOrEmpty(TariffCodeFilter) == false) { res.Append(" && " + string.Format("TariffCode.Contains(\"{0}\")", TariffCodeFilter)); } if (DutyLiabilityFilter.HasValue) { res.Append(" && " + string.Format("DutyLiability == {0}", DutyLiabilityFilter.ToString())); } if (Total_CIF_itmFilter.HasValue) { res.Append(" && " + string.Format("Total_CIF_itm == {0}", Total_CIF_itmFilter.ToString())); } if (FreightFilter.HasValue) { res.Append(" && " + string.Format("Freight == {0}", FreightFilter.ToString())); } if (Statistical_valueFilter.HasValue) { res.Append(" && " + string.Format("Statistical_value == {0}", Statistical_valueFilter.ToString())); } if (PiQuantityFilter.HasValue) { res.Append(" && " + string.Format("PiQuantity == {0}", PiQuantityFilter.ToString())); } if (string.IsNullOrEmpty(Description_of_goodsFilter) == false) { res.Append(" && " + string.Format("Description_of_goods.Contains(\"{0}\")", Description_of_goodsFilter)); } if (string.IsNullOrEmpty(Commercial_DescriptionFilter) == false) { res.Append(" && " + string.Format("Commercial_Description.Contains(\"{0}\")", Commercial_DescriptionFilter)); } if (string.IsNullOrEmpty(Suppplementary_unit_codeFilter) == false) { res.Append(" && " + string.Format("Suppplementary_unit_code.Contains(\"{0}\")", Suppplementary_unit_codeFilter)); } if (ItemQuantityFilter.HasValue) { res.Append(" && " + string.Format("ItemQuantity == {0}", ItemQuantityFilter.ToString())); } if (string.IsNullOrEmpty(NumberFilter) == false) { res.Append(" && " + string.Format("Number.Contains(\"{0}\")", NumberFilter)); } if (string.IsNullOrEmpty(DocumentTypeFilter) == false) { res.Append(" && " + string.Format("DocumentType.Contains(\"{0}\")", DocumentTypeFilter)); } return(res.ToString().StartsWith(" &&") || res.Length == 0 ? res: res.Insert(0, " && ")); }
internal virtual StringBuilder GetAutoPropertyFilterString() { var res = new StringBuilder(); if (LineNumberFilter.HasValue) { res.Append(" && " + string.Format("LineNumber == {0}", LineNumberFilter.ToString())); } if (IsAssessedFilter.HasValue) { res.Append(" && " + string.Format("IsAssessed == {0}", IsAssessedFilter)); } if (DoNotAllocateFilter.HasValue) { res.Append(" && " + string.Format("DoNotAllocate == {0}", DoNotAllocateFilter)); } if (DoNotEXFilter.HasValue) { res.Append(" && " + string.Format("DoNotEX == {0}", DoNotEXFilter)); } if (AttributeOnlyAllocationFilter.HasValue) { res.Append(" && " + string.Format("AttributeOnlyAllocation == {0}", AttributeOnlyAllocationFilter)); } if (string.IsNullOrEmpty(Description_of_goodsFilter) == false) { res.Append(" && " + string.Format("Description_of_goods.Contains(\"{0}\")", Description_of_goodsFilter)); } if (string.IsNullOrEmpty(Commercial_DescriptionFilter) == false) { res.Append(" && " + string.Format("Commercial_Description.Contains(\"{0}\")", Commercial_DescriptionFilter)); } if (Gross_weight_itmFilter.HasValue) { res.Append(" && " + string.Format("Gross_weight_itm == {0}", Gross_weight_itmFilter.ToString())); } if (Net_weight_itmFilter.HasValue) { res.Append(" && " + string.Format("Net_weight_itm == {0}", Net_weight_itmFilter.ToString())); } if (Item_priceFilter.HasValue) { res.Append(" && " + string.Format("Item_price == {0}", Item_priceFilter.ToString())); } if (ItemQuantityFilter.HasValue) { res.Append(" && " + string.Format("ItemQuantity == {0}", ItemQuantityFilter.ToString())); } if (string.IsNullOrEmpty(Suppplementary_unit_codeFilter) == false) { res.Append(" && " + string.Format("Suppplementary_unit_code.Contains(\"{0}\")", Suppplementary_unit_codeFilter)); } if (string.IsNullOrEmpty(ItemNumberFilter) == false) { res.Append(" && " + string.Format("ItemNumber.Contains(\"{0}\")", ItemNumberFilter)); } if (string.IsNullOrEmpty(TariffCodeFilter) == false) { res.Append(" && " + string.Format("TariffCode.Contains(\"{0}\")", TariffCodeFilter)); } if (TariffCodeLicenseRequiredFilter.HasValue) { res.Append(" && " + string.Format("TariffCodeLicenseRequired == {0}", TariffCodeLicenseRequiredFilter)); } if (TariffCategoryLicenseRequiredFilter.HasValue) { res.Append(" && " + string.Format("TariffCategoryLicenseRequired == {0}", TariffCategoryLicenseRequiredFilter)); } if (string.IsNullOrEmpty(TariffCodeDescriptionFilter) == false) { res.Append(" && " + string.Format("TariffCodeDescription.Contains(\"{0}\")", TariffCodeDescriptionFilter)); } if (DutyLiabilityFilter.HasValue) { res.Append(" && " + string.Format("DutyLiability == {0}", DutyLiabilityFilter.ToString())); } if (Total_CIF_itmFilter.HasValue) { res.Append(" && " + string.Format("Total_CIF_itm == {0}", Total_CIF_itmFilter.ToString())); } if (FreightFilter.HasValue) { res.Append(" && " + string.Format("Freight == {0}", FreightFilter.ToString())); } if (Statistical_valueFilter.HasValue) { res.Append(" && " + string.Format("Statistical_value == {0}", Statistical_valueFilter.ToString())); } if (DPQtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("DPQtyAllocated == {0}", DPQtyAllocatedFilter.ToString())); } if (DFQtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("DFQtyAllocated == {0}", DFQtyAllocatedFilter.ToString())); } if (PiQuantityFilter.HasValue) { res.Append(" && " + string.Format("PiQuantity == {0}", PiQuantityFilter.ToString())); } if (ImportCompleteFilter.HasValue) { res.Append(" && " + string.Format("ImportComplete == {0}", ImportCompleteFilter)); } return(res.ToString().StartsWith(" &&") || res.Length == 0 ? res: res.Insert(0, " && ")); }
internal virtual StringBuilder GetAutoPropertyFilterString() { var res = new StringBuilder(); if (string.IsNullOrEmpty(EntryDataIdFilter) == false) { res.Append(" && " + string.Format("EntryDataId.Contains(\"{0}\")", EntryDataIdFilter)); } if (LineNumberFilter.HasValue) { res.Append(" && " + string.Format("LineNumber == {0}", LineNumberFilter.ToString())); } if (string.IsNullOrEmpty(ItemNumberFilter) == false) { res.Append(" && " + string.Format("ItemNumber.Contains(\"{0}\")", ItemNumberFilter)); } if (QuantityFilter.HasValue) { res.Append(" && " + string.Format("Quantity == {0}", QuantityFilter.ToString())); } if (string.IsNullOrEmpty(UnitsFilter) == false) { res.Append(" && " + string.Format("Units.Contains(\"{0}\")", UnitsFilter)); } if (string.IsNullOrEmpty(ItemDescriptionFilter) == false) { res.Append(" && " + string.Format("ItemDescription.Contains(\"{0}\")", ItemDescriptionFilter)); } if (CostFilter.HasValue) { res.Append(" && " + string.Format("Cost == {0}", CostFilter.ToString())); } if (QtyAllocatedFilter.HasValue) { res.Append(" && " + string.Format("QtyAllocated == {0}", QtyAllocatedFilter.ToString())); } if (UnitWeightFilter.HasValue) { res.Append(" && " + string.Format("UnitWeight == {0}", UnitWeightFilter.ToString())); } if (DoNotAllocateFilter.HasValue) { res.Append(" && " + string.Format("DoNotAllocate == {0}", DoNotAllocateFilter)); } if (string.IsNullOrEmpty(TariffCodeFilter) == false) { res.Append(" && " + string.Format("TariffCode.Contains(\"{0}\")", TariffCodeFilter)); } if (string.IsNullOrEmpty(CNumberFilter) == false) { res.Append(" && " + string.Format("CNumber.Contains(\"{0}\")", CNumberFilter)); } if (CLineNumberFilter.HasValue) { res.Append(" && " + string.Format("CLineNumber == {0}", CLineNumberFilter.ToString())); } if (DownloadedFilter.HasValue) { res.Append(" && " + string.Format("Downloaded == {0}", DownloadedFilter)); } if (string.IsNullOrEmpty(DutyFreePaidFilter) == false) { res.Append(" && " + string.Format("DutyFreePaid.Contains(\"{0}\")", DutyFreePaidFilter)); } if (TotalFilter.HasValue) { res.Append(" && " + string.Format("Total == {0}", TotalFilter.ToString())); } return(res.ToString().StartsWith(" &&") || res.Length == 0 ? res: res.Insert(0, " && ")); }