protected bool ValidateAllocation() { SortedBindingList <InputInvoiceInfo> invoices = Datos_Lineas.DataSource as SortedBindingList <InputInvoiceInfo>; IEnumerable <ITransactionPayment> lines = invoices.Cast <ITransactionPayment>(); _action_result = PaymentCommon.ValidateAllocation(_entity, _deallocated, lines); return(_action_result == System.Windows.Forms.DialogResult.OK); }