private void btn_bucarPLantilla_Click(object sender, EventArgs e) { try { ct_cbtecble_Plantilla_Info InfoPlan = new ct_cbtecble_Plantilla_Info(); if (txt_no_plantillacomprobante.Text == "0" || txt_no_plantillacomprobante.Text == "") { frmCon_cbtecble_Plantilla_Consulta frm = new frmCon_cbtecble_Plantilla_Consulta(); frm.LlamaOtraPantalla = true; frm.ShowDialog(); InfoCbteCble = frm.Get_Info_CbteCble(); } else { ct_cbtecble_Plantilla_Bus Pla_B = new ct_cbtecble_Plantilla_Bus(); InfoCbteCble = Pla_B.Get_Info_Plantilla_CbteCble(param.IdEmpresa, Convert.ToInt32(this.cmb_tipocomprobante.EditValue), Convert.ToDecimal(txt_no_plantillacomprobante.Text)); } if (InfoCbteCble != null) { if (InfoCbteCble.cb_Fecha != new DateTime(1, 1, 1)) { List <ct_Cbtecble_det_Info> lm = new List <ct_Cbtecble_det_Info>(); lm = InfoCbteCble._cbteCble_det_lista_info; this.cmb_tipocomprobante.EditValue = InfoCbteCble.IdTipoCbte; dtFecha.Value = InfoCbteCble.cb_Fecha; txt_concepto.Text = InfoCbteCble.cb_Observacion; UC_Diario.setDetalle(lm); } else { MessageBox.Show("Usted ha seleccionado mas de una plantilla, por favor intente de nuevo.", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); LImpiarDatos(); } } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }