//private void CargarCliente() { // List<BEClienteProveedor> vListaCliente = new List<BEClienteProveedor>(); // BEClienteProveedor oTemp = new BEClienteProveedor(); // oTemp.IdZona = 0; // vListaCliente = new BLClienteProveedor().Listar(oTemp); // //vListaCliente.Insert(0, new BEClienteProveedor(0, "CE : Cliente Eventual")); // vListaCliente.Insert(0, new BEClienteProveedor(0, "--------Todos--------")); // cbCliente.DataSource = vListaCliente; // cbCliente.DisplayMember = "Nombre"; // cbCliente.ValueMember = "IdCliente"; //} private void ResetearFormulario() { if (cbProducto.DataSource != null) { DGP_Util.LiberarComboBox(cbProducto); } DGP_Util.EnabledComboBox(cbProducto, false); //DGP_Util.EnableControl(nudPrecioAmortizacion, false); //DGP_Util.EnableControl(btnAplicarMonto, false); // DGP_Util.EnableControl(btnGrabar, false); // DGP_Util.EnableControl(btnCancelar, false); DGP_Util.LiberarGridView(dgrvAmortizacion); LimpiarFormulario(); }
private void InicializarFormulario() { DGP_Util.LiberarComboBox(cbCliente); DGP_Util.EnabledComboBox(cbCliente, true); DGP_Util.LiberarComboBox(cbProducto); DGP_Util.EnabledComboBox(cbProducto, false); //DGP_Util.EnableControl(nudPrecioAmortizacion, false); //DGP_Util.EnableControl(btnAplicarMonto, false); DGP_Util.EnableControl(btnGrabar, false); DGP_Util.EnableControl(btnCancelar, false); LimpiarFormulario(); CargarCliente(); // Definir al Usuario CargarUsuarios(); dtpFechaPago.Value = DateTime.Now.Date; cbUsuario.SelectedValue = VariablesSession.BEUsuarioSession.IdPersonal; }
private void cmbClientes_Leave(object sender, EventArgs e) { try { int intIdCliente = 0; if (this.cmbClientes.SelectedIndex >= 0) { BEClienteProveedor oBEClienteProveedor = (BEClienteProveedor)this.cmbClientes.SelectedItem; int.TryParse(cmbClientes.SelectedValue.ToString(), out intIdCliente); CargarProductoCliente(intIdCliente); DGP_Util.EnabledComboBox(cbProducto, true); CargarAmortizaciones(Convert.ToInt32(cmbClientes.SelectedValue), 0); DGP_Util.EnableControl(nudMontoDocumento, true); CargarAmortizacionesSinAplicar(intIdCliente); //if (cmbClientes.SelectedIndex > 0) //{ // int.TryParse(cmbClientes.SelectedValue.ToString(), out intIdCliente); // CargarProductoCliente(intIdCliente); // DGP_Util.EnabledComboBox(cbProducto, true); // CargarAmortizaciones(Convert.ToInt32(cmbClientes.SelectedValue), 0); // DGP_Util.EnableControl(nudMontoDocumento, true); // CargarAmortizacionesSinAplicar(intIdCliente); //} //else //{ // ResetearFormulario(); //} //MostrarMensaje(oBEClienteProveedor.IdCliente.ToString() + oBEClienteProveedor.Nombre, MessageBoxIcon.Information); } else { ResetearFormulario(); } } catch (Exception ex) { this.MostrarMensaje("" + ex.Message, MessageBoxIcon.Error); } }
private void cbCliente_SelectedIndexChanged(object sender, EventArgs e) { try { int intIdCliente = 0; if (cbCliente.SelectedIndex > 0) { int.TryParse(cbCliente.SelectedValue.ToString(), out intIdCliente); CargarProductoCliente(intIdCliente); DGP_Util.EnabledComboBox(cbProducto, true); CargarAmortizaciones(Convert.ToInt32(cbCliente.SelectedValue), 0); DGP_Util.EnableControl(nudPrecioAmortizacion, true); } else { ResetearFormulario(); } } catch (Exception ex) { MostrarMensaje(ex.Message, MessageBoxIcon.Error); } }