public override DataSet Clone() { tsa_ComprobantesRelacionOrigenDestinoDataset cln = ((tsa_ComprobantesRelacionOrigenDestinoDataset)(base.Clone())); cln.InitVars(); return(cln); }
private Hashtable BuscarEnComprobantesOrigen(string tiposdecomprobante, Hashtable comprobantesOrigen) { Hashtable hash = new Hashtable(); Hashtable hashOtros = new Hashtable(); string[] tipos = tiposdecomprobante.Split(','); foreach (string idcomprobantedestino in comprobantesOrigen.Keys) { mz.erp.commontypes.data.tsa_ComprobantesRelacionOrigenDestinoDataset data = mz.erp.businessrules.tsa_ComprobantesRelacionOrigenDestino.GetList(null, idcomprobantedestino, long.MinValue, long.MinValue); if (data.tsa_ComprobantesRelacionOrigenDestino.Rows.Count > 0) { mz.erp.commontypes.data.tsa_ComprobantesRelacionOrigenDestinoDataset.tsa_ComprobantesRelacionOrigenDestinoRow row = (mz.erp.commontypes.data.tsa_ComprobantesRelacionOrigenDestinoDataset.tsa_ComprobantesRelacionOrigenDestinoRow)data.tsa_ComprobantesRelacionOrigenDestino.Rows[0]; if (!row.IsIdComprobanteOrigenNull()) { string tipoOrigen = GetTipoDeComprobante(row.IdComprobanteOrigen); bool contain = false; for (int i = 0; i < tipos.Length; i++) { if (tipos[i].CompareTo(tipoOrigen) == 0) { if (!hash.ContainsKey(row.IdComprobanteOrigen)) { hash.Add(row.IdComprobanteOrigen, row.IdComprobanteOrigen); } } else { if (!hashOtros.ContainsKey(row.IdComprobanteOrigen)) { hashOtros.Add(row.IdComprobanteOrigen, row.IdComprobanteOrigen); } } } } } } if (hash.Count == 0) { if (hashOtros.Count > 0) { hash = this.BuscarEnComprobantesOrigen(tiposdecomprobante, hashOtros); if (hash.Count == 0) { hash = this.BuscarEnComprobantesDestino(tiposdecomprobante, hashOtros); } } } return(hash); }