protected override void SaveAction() { InputInvoiceList list = (InputInvoiceList)Cache.Instance.Get(typeof(InputInvoiceList)); if (list != null) { InputInvoiceInfo item = list.GetItemByNFactura(_entity.NFactura, _entity.Fecha.Year, _entity.OidAcreedor, _entity.ETipoAcreedor); if (item != null && item.Oid != _entity.Oid) { if (ProgressInfoMng.ShowQuestion(String.Format(Library.Store.Resources.Messages.FACTURA_RECIBIDA_DUPLICADA, _entity.Acreedor)) == DialogResult.No) { _action_result = DialogResult.Ignore; return; } } } Library.Store.QueryConditions conditions = new Library.Store.QueryConditions { FacturaRecibida = _entity.GetInfo(false), TipoAcreedor = new ETipoAcreedor[1] { _entity.ETipoAcreedor }, Estado = moleQule.Base.EEstado.NoAnulado }; conditions.FacturaRecibida.Oid = 0; InputInvoiceInfo prev_invoice = InputInvoiceInfo.Exists(conditions, false); if (prev_invoice.Oid != 0 && prev_invoice.Oid != _entity.Oid && prev_invoice.Total == _entity.Total) { if (DialogResult.No == ProgressInfoMng.ShowQuestion("Existe una factura de este proveedor con la misma fecha, número e importe. ¿Desea continuar?")) { _action_result = DialogResult.Cancel; return; } } if (_expediente != null) { _entity.SetExpediente(_expediente); } _action_result = SaveObject() ? DialogResult.OK : DialogResult.Ignore; }