private void lblGuardar_Click(object sender, EventArgs e) { smsError.Dispose(); if (validarDatos()) { if (lblOperacion.Text == "Nuevo") { lstDocumentos = bllDoc.buscarDocumento(Convert.ToInt32(txtNumero.Text.Trim()), txtDocumento.Text); if (lstDocumentos.Count > 0) { txtNumero.Text = UtilSystem.fConsecutivo(Convert.ToInt32(txtNumero.Text) + 1); } bllTipo.updateConsecutivo(Convert.ToInt32(txtNumero.Text), txtDocumento.Text); } else { bllDoc.modificarCuentas(Convert.ToInt32(txtNumero.Text), txtDocumento.Text); bllDoc.eliminarDocumento(Convert.ToInt32(txtNumero.Text), txtDocumento.Text); } guardar(); guardarObservacion(); MessageBox.Show("Datos Guardados Correctamente.. ", "Control de Información ", MessageBoxButtons.OK, MessageBoxIcon.Information); lblOperacion.Text = "Consulta"; Deshabilitar(); } else { MessageBox.Show("Datos Incorrectos, Por favor Verifique...", "SAE Control", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void guardar() { int cont = 0; foreach (DataGridViewRow item in dgvDatos.Rows) { // Crear Objeto de tipo Documento if (!item.IsNewRow) { cont++; EDocumentos ObjDoc = new EDocumentos(); ObjDoc.item = cont; ObjDoc.documento = Convert.ToInt32(txtNumero.Text); ObjDoc.tipo = txtDocumento.Text.Trim(); ObjDoc.periodo = BLL.Inicializar.periodo; ObjDoc.dia = txtDia.Text; ObjDoc.centro = (string)item.Cells["dtCentro"].Value ?? "0"; ObjDoc.descripcion = UtilSystem.truncarCadena(item.Cells["dtDescripcion"].Value.ToString(), 50); ObjDoc.debito = UtilSystem.DIN(item.Cells["dtDebito"].Value.ToString() ?? "0"); ObjDoc.credito = UtilSystem.DIN(item.Cells["dtCredito"].Value.ToString() ?? "0"); ObjDoc.codigo = item.Cells["dtCuenta"].Value.ToString(); ObjDoc.baseD = UtilSystem.DIN(item.Cells["dtBase"].Value.ToString() ?? "0"); ObjDoc.diasv = Convert.ToInt16(item.Cells["dtDvmto"].Value); ObjDoc.fecha = UtilSystem.truncarCadena(item.Cells["dtFecha"].Value.ToString(), 10); ObjDoc.cheque = (string)item.Cells["dtCheque"].Value ?? ""; ObjDoc.nit = (string)item.Cells["dtNit"].Value ?? "0"; ObjDoc.modulo = "Contabilidad AF"; bllDoc.insertar(ObjDoc); } } }
protected void buscarTipoDocumento() { if (txtDocumento.Text == "") { if (lblOperacion.Text == "Nuevo" || lblOperacion.Text == "Editar") { txtDocumento_DoubleClick(txtDocumento, null); } } else { tipodoc = bllTipo.buscarTipo(txtDocumento.Text); if (tipodoc == null) { txtDesctipo.Text = ""; txtNumero.Text = ""; txtDocumento_DoubleClick(txtDocumento, null); } else { txtDesctipo.Text = tipodoc.descripcion; if (lblOperacion.Text == "Nuevo") { txtNumero.Text = UtilSystem.fConsecutivo(tipodoc.actual); } } } }
private void mostrarDocumento(string numero, string tipo) { dgvDatos.AutoGenerateColumns = false; if (string.IsNullOrEmpty(tipo) || string.IsNullOrEmpty(numero)) { return; } limpiar(); lstDocumentos = bllDoc.buscarDocumento(Convert.ToInt32(numero), tipo); if (lstDocumentos.Count > 0) { txtNumero.Text = UtilSystem.fConsecutivo(lstDocumentos[0].documento); txtDocumento.Text = lstDocumentos[0].tipo; txtNit.Text = lstDocumentos[0].nit; txtDia.Text = lstDocumentos[0].dia; txtVmto.Text = lstDocumentos[0].diasv.ToString(); lblModulo.Text = lstDocumentos[0].modulo; txtCentro.Text = lstDocumentos[0].centro; foreach (EDocumentos item in lstDocumentos) { dgvDatos.Rows.Add(item.descripcion, item.debito, item.credito, item.codigo, item.baseD, item.diasv, item.fecha, item.nit, item.centro, item.cheque); } txtObservaciones.Text = bllDoc.getObservacion(numero, tipo); sacarCuenta(); } else { MessageBox.Show("El documento no se encuentra en este Periodo ", "Control de Informacion", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public override void Execute(IDictionary <string, object> input) { var port = input.Get <int>(PORT); var openWindow = input.Get <bool>(OPEN_WINDOW); if (_localWebServer.IsStarted) { _console.WriteError("Local web server has been already started"); _localWebServer.Stop(); return; } var config = new LocalWebServerConfig { Port = port }; _localWebServer.Start(config); if (openWindow) { var url = $"http://localhost:{config.Port}"; UtilSystem.OpenUrl(url); } _console.WriteSuccess("Local web server started successfully"); }
private void sacarCuenta() { debito = dgvDatos.Rows.Cast <DataGridViewRow>().Sum(x => Convert.ToDouble(x.Cells["dtDebito"].Value)); credito = dgvDatos.Rows.Cast <DataGridViewRow>().Sum(x => Convert.ToDouble(x.Cells["dtCredito"].Value)); txtDebito.Text = UtilSystem.fMoneda(debito); txtCredito.Text = UtilSystem.fMoneda(credito); }
private void txtValVenta_Leave(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtValVenta.Text)) { txtValVenta.Text = "0"; } txtValVenta.Text = UtilSystem.fMoneda(Convert.ToDouble(txtValVenta.Text)); }
//private static string AppConfigPath() //{ // return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AppConfigFileName); //} /// <summary> /// 获取当前应用配置 /// </summary> /// <returns></returns> public Configuration getCurrentConfig(char AppType = EnumAppType.Web) { if (currentConfig == null) { currentConfig = UtilSystem.getCurrentConfig(AppType); } return(currentConfig); }
private void actualizarValores() { foreach (DataGridViewRow fila in dgvDatos.Rows) { bllAct.UpdateValores(UtilSystem.DIN(fila.Cells["dtLibros"].Value.ToString()), UtilSystem.DIN(fila.Cells["dtDepreciacion"].Value.ToString()), UtilSystem.DIN(fila.Cells["dtDepAcum"].Value.ToString()), fila.Cells["dtCodigo"].Value.ToString()); } }
private void txtVComprar_Leave(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtVComprar.Text)) { txtVComprar.Text = "0"; } txtVComprar.Text = UtilSystem.fMoneda(Convert.ToDouble(txtVComprar.Text)); txtvalComercial.Text = txtVComprar.Text; txtvalComercial_Leave(null, null); }
private void lblGenerar_Click(object sender, EventArgs e) { ECompany objC = bllComp.buscar(); DataTable dt = new DataTable(); string grupo = ""; string subgrupo = ""; string fInicio = ""; string fFinal = ""; if (rbtodosGrupo.Checked == true) { grupo = "Todos"; } else { grupo = cboGrupo.SelectedValue.ToString(); } if (rbtodosSubg.Checked == true) { subgrupo = "Todos"; } else { subgrupo = cboSubgrupo.SelectedValue.ToString(); } if (rbFecha.Checked == true) { fFinal = "Todos"; fInicio = "Todos"; } else { fInicio = UtilSystem.fFecha(dtpInicio.Value); fFinal = UtilSystem.fFecha(dtpFinal.Value); } dt = bllAct.informeGrupo(grupo, subgrupo, fInicio, fFinal); Informes.FrmVerInforme frm = new Informes.FrmVerInforme(); ReportDocument reporte = new ReportDocument(); string ruta = AppDomain.CurrentDomain.BaseDirectory + "Reportes\\RptInfGrupos.rpt"; reporte.Load(ruta); reporte.SetDataSource(dt); // Asignacion de Parametros reporte.SetParameterValue("comp", objC.descripcion); reporte.SetParameterValue("nit", objC.nit); reporte.SetParameterValue("periodo", "Periodo Actual: " + BLL.Inicializar.periodo); frm.CReporte.ReportSource = reporte; frm.CReporte.Refresh(); frm.ShowDialog(); }
private void txtValVenta_TextChanged(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(txtValVenta.Text)) { txtUtilidad.Text = UtilSystem.fMoneda(Convert.ToDouble(txtValVenta.Text) - Convert.ToDouble(txtValLibros.Text)); } else { txtUtilidad.Text = ""; } }
private void txtvalComercial_Leave(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtvalComercial.Text)) { txtvalComercial.Text = "0"; } txtvalHistorico.Text = UtilSystem.fMoneda(Convert.ToDouble(txtvalComercial.Text)); txtvalLibros.Text = UtilSystem.fMoneda(Convert.ToDouble(txtvalComercial.Text)); txtvalComercial.Text = UtilSystem.fMoneda(Convert.ToDouble(txtvalComercial.Text)); txtvalSalvamento.Text = UtilSystem.fMoneda(Convert.ToDouble(txtvalComercial.Text) * porSalvto); }
private void Consecutivo() { objTipodoc = bllTipo.buscarTipo(tipoDoc); if (objTipodoc == null) { numConsecutivo = "0"; } else { numConsecutivo = UtilSystem.fConsecutivo(objTipodoc.actual); } }
private void Consecutivo() { objTipodoc = bllTipo.buscarTipo(tipoDoc); if (objTipodoc == null) { txtNumero.Text = ""; } else { txtNumero.Text = UtilSystem.fConsecutivo(objTipodoc.actual); } }
private void FrmGrupos_Load(object sender, EventArgs e) { ocultarPanel2(); dgvGrupo.AutoGenerateColumns = false; dgvSubGrupo.AutoGenerateColumns = false; List <EtiposGenericos> lstTipos = UtilSystem.metodosDepreciacion(); cboMetodo.DisplayMember = "Descripcion"; cboMetodo.ValueMember = "sigla"; cboMetodo.DataSource = lstTipos; cargarGrupos(); }
private void guardarContratoMto() { EMantenimiento objMto = new EMantenimiento(); objMto.codActivo = txtCodigo.Text; objMto.fInicio = UtilSystem.fFecha(dtpInicioMto.Value); objMto.fVence = UtilSystem.fFecha(dtpVenceMto.Value); objMto.nContrato = txtContrato.Text; objMto.nVisitas = Convert.ToInt32(txtNVisitas.Text); objMto.proveedor = txtProveedorMto.Text; objMto.valor = UtilSystem.DIN("0"); bllMto.insertar(objMto); }
private void mostrarCtoMto(string codigo) { objMnto = bllMto.buscar(codigo); if (objMnto != null) { dtpInicioMto.Value = Convert.ToDateTime(objMnto.fInicio); dtpVenceMto.Value = Convert.ToDateTime(objMnto.fVence); txtContrato.Text = objMnto.nContrato; txtNVisitas.Text = objMnto.nVisitas.ToString(); txtProveedorMto.Text = objMnto.proveedor; txtValContrato.Text = UtilSystem.fMoneda(objMnto.valor); lblIDContMant.Text = objMnto.idMto.ToString(); } }
private void guardar() { dgvContable.Rows.Clear(); MovimientoContable("Caja", objParametros.ctaCaja, "VENTA DE ACTIVO " + txtCodigo.Text, "0"); MovimientoContable("Depreciacion", activo.ctaDepreciacion, "DEPRECIACION ACUMULADA", "0"); MovimientoContable("Articulo", activo.ctaActivo, "VALOR ADQUISICION", "0"); if (Convert.ToDouble(txtUtilidad.Text) > 0) { MovimientoContable("Ganancia", activo.ctaGanancia, "UTILIDAD POR VENTA", "0"); } else { MovimientoContable("Perdida", activo.ctaPerdida, "PERDIDA POR VENTA", "0"); } int valCons = bllDoc.verificar(Convert.ToInt32(txtNumero.Text.Trim()), tipoDoc); if (valCons > 0) { txtNumero.Text = UtilSystem.fConsecutivo(Convert.ToInt32(txtNumero.Text) + 1); } bllTipo.updateConsecutivo(Convert.ToInt32(txtNumero.Text), tipoDoc); int cont = 0; foreach (DataGridViewRow item in dgvContable.Rows) { // Crear Objeto de tipo Documento cont++; EDocumentos ObjDoc = new EDocumentos(); ObjDoc.item = cont; ObjDoc.documento = Convert.ToInt32(txtNumero.Text); ObjDoc.tipo = tipoDoc; ObjDoc.periodo = BLL.Inicializar.Mes; ObjDoc.dia = DateTime.Now.Day.ToString(); ObjDoc.centro = "0"; ObjDoc.descripcion = UtilSystem.truncarCadena(item.Cells["dtDescripcion"].Value.ToString(), 50); ObjDoc.debito = UtilSystem.DIN(item.Cells["dtDebito"].Value.ToString() ?? "0"); ObjDoc.credito = UtilSystem.DIN(item.Cells["dtCredito"].Value.ToString() ?? "0"); ObjDoc.codigo = item.Cells["dtCuenta"].Value.ToString(); ObjDoc.baseD = 0; ObjDoc.diasv = 0; ObjDoc.fecha = dtpFecha.Value.ToString("d"); ObjDoc.cheque = ""; ObjDoc.nit = (string)item.Cells["dtNit"].Value ?? "0"; ObjDoc.modulo = "Venta AF"; bllDoc.insertar(ObjDoc); } }
private void guardarPoliza() { EPolizas objPol = new EPolizas(); objPol.codActivo = txtCodigo.Text; objPol.deducible = UtilSystem.DIN(txtValDeducible.Text); objPol.empresa = txtEmpresa.Text; objPol.fechaInicio = UtilSystem.fFecha(dtpFInicioSeg.Value); objPol.fechaVence = UtilSystem.fFecha(dtpFVenceSeg.Value); objPol.responsable = txtAgente.Text; objPol.telefono = txtTelSeguro.Text; objPol.valor = UtilSystem.DIN(txtValAsegurado.Text); objPol.nPoliza = txtPoliza.Text; bllPoliza.insertar(objPol); }
private void mostrarPoliza(string codigo) { objPoliza = bllPoliza.buscar(codigo); if (objPoliza != null) { txtPoliza.Text = objPoliza.nPoliza; txtValDeducible.Text = UtilSystem.fMoneda(objPoliza.deducible); txtEmpresa.Text = objPoliza.empresa; dtpFInicioSeg.Value = Convert.ToDateTime(objPoliza.fechaInicio); dtpFVenceSeg.Value = Convert.ToDateTime(objPoliza.fechaVence); txtAgente.Text = objPoliza.responsable; txtTelSeguro.Text = objPoliza.telefono; txtValAsegurado.Text = UtilSystem.fMoneda(objPoliza.valor); lblIDPoliza.Text = objPoliza.idPoliza.ToString(); } }
private EActivos CrearActivo() { EActivos objAct = new EActivos(); objAct.codigo = txtCodigo.Text; objAct.nombre = txtNombre.Text; objAct.descripcion = txtDescripcion.Text; objAct.numSerie = txtNumSerie.Text; objAct.referencia = txtReferencia.Text; objAct.marca = txtMarca.Text; objAct.modelo = txtModelo.Text; objAct.grupo = cboGrupo.SelectedValue.ToString(); objAct.subGrupo = cboSubgrupo.SelectedValue.ToString(); objAct.vidaUtil = Convert.ToInt16(txtvidaUtil.Text); objAct.metodoDep = cboMetodo.SelectedValue.ToString(); objAct.propiedad = cboPropiedad.Text; objAct.fecha = UtilSystem.fFecha(dtpFechaCpra.Value); objAct.area = cboAreaResp.SelectedValue.ToString(); objAct.responsable = txtCodResp.Text; objAct.proveedor = txtcodProveedor.Text; objAct.centrocosto = txtcentro.Text; objAct.estado = cboEstado.Text; objAct.valComercial = UtilSystem.DIN(txtvalComercial.Text); objAct.valSalvamento = UtilSystem.DIN(txtvalSalvamento.Text); objAct.valHistorico = UtilSystem.DIN(txtvalHistorico.Text); objAct.valLibros = UtilSystem.DIN(txtvalLibros.Text); objAct.valMejoras = UtilSystem.DIN(txtvalMejoras.Text); objAct.depAjustada = UtilSystem.DIN(txtdepAjustada.Text); objAct.depAcumulada = UtilSystem.DIN(txtdepAcumulada.Text); objAct.ctaActivo = txtctaActivo.Text; objAct.ctaDepreciacion = txtctaDepreciacion.Text; objAct.ctaGastos = txtctaGastos.Text; objAct.ctaGanancia = txtctaGanancia.Text; objAct.ctaMantenimiento = txtctaMantenimiento.Text; objAct.ctaPerdida = txtctaPerdida.Text; objAct.fechaDep = UtilSystem.fFecha(dtpFechaCpra.Value.AddMonths(Convert.ToInt16(txtvidaUtil.Text))); objAct.mantenimiento = chkMantenimiento.Checked ? "SI" : "NO"; objAct.poliza = chkPoliza.Checked ? "SI" : "NO"; objAct.nFactura = txtNFactura.Text; return(objAct); }
private void valoresGrupo(string sigla) { objGrupo = bllGrupo.buscar(sigla); if (objGrupo != null) { txtvidaUtil.Text = objGrupo.vidaUtil.ToString(); cboMetodo.SelectedValue = objGrupo.metodoDep; txtctaActivo.Text = objGrupo.ctaActivo; txtctaDepreciacion.Text = objGrupo.ctaDepreciacion; txtctaGanancia.Text = objGrupo.ctaGanancia; txtctaGastos.Text = objGrupo.ctaGastos; txtctaMantenimiento.Text = objGrupo.ctaMantenimiento; txtctaPerdida.Text = objGrupo.ctaPerdida; porSalvto = Math.Round(Convert.ToDouble(objGrupo.valSalvamento) / 100, 2); // Obtener Numero Consecutivo deL Nuevo Codigo txtCodigo.Text = sigla + UtilSystem.fConsActivo(objGrupo.consecutivo + 1); } }
private void guardarMovimiento() { BLL.MovimientoBLL bllMov = new BLL.MovimientoBLL(); EMovimientos objMov = new EMovimientos(); objMov.cCosto = txtcentro.Text; objMov.codActivo = txtCodigo.Text; objMov.descripcion = "COMPRA DE ACTIVOS"; objMov.documento = tipoDoc + numConsecutivo; objMov.estado = "AP"; objMov.fecha = DateTime.Now; objMov.nit = "0"; objMov.periodo = BLL.Inicializar.periodo; objMov.tipoDoc = tipoDoc; objMov.tipoMov = "COMPRA"; objMov.valor = UtilSystem.DIN(txtvalComercial.Text); bllMov.insertar(objMov); }
private void guardarDepreciacion() { List <EDepreciacion> lstDep = new List <EDepreciacion>(); foreach (DataGridViewRow fila in dgvDatos.Rows) { EDepreciacion objDep = new EDepreciacion(); objDep.documento = tipoDoc + txtNumero.Text.ToString(); objDep.codigo = fila.Cells["dtCodigo"].Value.ToString(); objDep.periodo = fila.Cells["dtPeriodo"].Value.ToString(); objDep.valLibros = UtilSystem.DIN(fila.Cells["dtLibros"].Value.ToString() ?? "0"); objDep.depreciacion = UtilSystem.DIN(fila.Cells["dtDepreciacion"].Value.ToString() ?? "0"); objDep.depAcumulada = UtilSystem.DIN(fila.Cells["dtDepAcum"].Value.ToString() ?? "0"); lstDep.Add(objDep); } bllDep.insertar(lstDep); MessageBox.Show("Proceso de Depreciacion Finalizado Correctamente ", "Control de Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private bool validar() { bool correcto = true; if (!UtilSystem.validarCedula(txtNit.Text)) { correcto = false; smsError.SetError(txtNit, "Nit No Valido .. Verifique longitug, el rango es entre [7-12]"); } if (string.IsNullOrWhiteSpace(txtNombres.Text)) { correcto = false; smsError.SetError(txtNombres, "Ingrese el Nombre del Tercero"); } if (string.IsNullOrWhiteSpace(txtApellidos.Text)) { correcto = false; smsError.SetError(txtApellidos, "Ingrese los Apellidos del Tercero"); } if (string.IsNullOrWhiteSpace(txtCelular.Text) && string.IsNullOrWhiteSpace(txtTelefono.Text)) { correcto = false; smsError.SetError(txtCelular, "Por Favor Especifique un Numero Telefonico"); } if (string.IsNullOrWhiteSpace(cboTipo.Text)) { correcto = false; smsError.SetError(cboTipo, "Seleccione el Tipo de Tercero"); } if (string.IsNullOrWhiteSpace(cboPersona.Text)) { correcto = false; smsError.SetError(cboPersona, "Seleccione el Tipo de persona"); } return(correcto); }
public static LogConfigSetting[] GetSection() { Configuration config = UtilSystem.getCurrentConfig(); ConfigurationSectionGroup oSectionGroup = config.SectionGroups[defaultSectionName]; if ((oSectionGroup != null) && (oSectionGroup.Sections.Count > 0)) { LogConfigSetting[] logConfigSettings = new LogConfigSetting[oSectionGroup.Sections.Count]; LogConfigSetting logConfigSetting = null; for (int i = 0; i < oSectionGroup.Sections.Count; i++) { logConfigSetting = (LogConfigSetting)config.GetSection(defaultSectionName + "/" + oSectionGroup.Sections.Keys.Get(i)); try { List <IWriter> writers = new List <IWriter>(); TextWriter textWriter = new TextWriter(); textWriter.FileName = logConfigSetting.fileName; textWriter.LogPath = ConfigurationSectionHandler.LogPathInfo + logConfigSetting.logPath; writers.Add(textWriter); logConfigSetting.writers = writers; } catch { //出现异常,填充默认的日志 logConfigSetting.loggerName = ""; logConfigSetting.logLevel = LogLevel.All; List <IWriter> writers = new List <IWriter>(); TextWriter textWriter = new TextWriter(); textWriter.FileName = "xiben.log"; textWriter.LogPath = @"C:\xiben\Temp"; writers.Add(textWriter); logConfigSetting.writers = writers; } logConfigSettings[i] = logConfigSetting; } return(logConfigSettings); } return(null); }
private void guardarContable() { movimientoContable(); Consecutivo(); int valCons = bllDoc.verificar(Convert.ToInt32(numConsecutivo), tipoDoc); if (valCons > 0) { numConsecutivo = UtilSystem.fConsecutivo(Convert.ToInt32(numConsecutivo) + 1); } bllTipo.updateConsecutivo(Convert.ToInt32(numConsecutivo), tipoDoc); int cont = 0; string fecha = UtilSystem.truncarCadena(DateTime.Now.Date.ToShortDateString(), 10); foreach (DataGridViewRow item in dgvContable.Rows) { cont++; EDocumentos ObjDoc = new EDocumentos(); ObjDoc.item = cont; ObjDoc.documento = Convert.ToInt32(numConsecutivo); ObjDoc.tipo = tipoDoc; ObjDoc.periodo = BLL.Inicializar.periodo; ObjDoc.dia = DateTime.Now.Day.ToString(); ObjDoc.centro = string.IsNullOrEmpty(txtcentro.Text) ? "0" : txtcentro.Text; ObjDoc.descripcion = UtilSystem.truncarCadena(item.Cells["dtDescripcion"].Value.ToString(), 50); ObjDoc.debito = UtilSystem.DIN(item.Cells["dtDebito"].Value.ToString() ?? "0"); ObjDoc.credito = UtilSystem.DIN(item.Cells["dtCredito"].Value.ToString() ?? "0"); ObjDoc.codigo = item.Cells["dtCuenta"].Value.ToString(); ObjDoc.baseD = UtilSystem.DIN(item.Cells["dtBase"].Value.ToString() ?? "0"); ObjDoc.diasv = 0; ObjDoc.fecha = fecha; ObjDoc.cheque = ""; ObjDoc.nit = txtcodProveedor.Text; ObjDoc.modulo = "ACTIVOS"; bllDoc.insertar(ObjDoc); } guardarMovimiento(); }
protected void buscarActivo() { if (!string.IsNullOrWhiteSpace(txtCodigo.Text)) { activo = bllAct.buscar(txtCodigo.Text); if (activo != null) { txtDescripcion.Text = activo.descripcion.ToString(); txtValCompra.Text = UtilSystem.fMoneda(activo.valComercial); txtValLibros.Text = UtilSystem.fMoneda(activo.valLibros); txtDepreciacion.Text = UtilSystem.fMoneda(activo.depAcumulada); lblCtaActivo.Text = activo.ctaActivo; lblCtaDepreciacion.Text = activo.ctaDepreciacion; } else { MessageBox.Show("El Activo no Se Encuentra registrado Verifique.. !!", "Control de Informacion", MessageBoxButtons.OK, MessageBoxIcon.Warning); limpiar(); Aplicacion.Inventario.FrmSelActivos frm = new Inventario.FrmSelActivos(); frm.ShowDialog(); } } }
private void FrmActivos_Load(object sender, EventArgs e) { Deshabilitar(); verPanel1(); objParametros = bllPar.getParametros(); if (string.IsNullOrEmpty(objParametros.compras)) { lblNuevo.Enabled = false; MessageBox.Show("No se ha Selecciondo el Documento Contable para Compras.. Verifique", "Control de Información ActFI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { lblNuevo.Enabled = true; } CargarAreas(); cargarGrupos(); // Cargar Metodo de >Depreciacion List <EtiposGenericos> lstTipos = UtilSystem.metodosDepreciacion(); cboMetodo.DisplayMember = "Descripcion"; cboMetodo.ValueMember = "sigla"; cboMetodo.DataSource = lstTipos; }