private void btnCliente_Click(object sender, EventArgs e) { FrmCliente frmCliente = new FrmCliente(); frmCliente.ShowDialog(); frmCliente.Dispose(); }
private void btnCliente_Click(object sender, EventArgs e) { if (BmsSoftware.ConfigSistema1.Default.FlagClienteResumida.Trim() != "S") { using (FrmCliente frm = new FrmCliente()) { int CodSelec = Convert.ToInt32(cbCliente.SelectedValue); frm.CodClienteSelec = CodSelec; frm.ShowDialog(); GetDropCliente(); cbCliente.SelectedValue = CodSelec; } } else { using (FrmCliente2 frm = new FrmCliente2()) { int CodSelec = Convert.ToInt32(cbCliente.SelectedValue); frm.CodClienteSelec = CodSelec; frm.ShowDialog(); GetDropCliente(); cbCliente.SelectedValue = CodSelec; } } }
private void DataGriewSearch_KeyDown(object sender, KeyEventArgs e) { if (LIS_MUNICIPIOSColl.Count > 0) { if (e.KeyCode == Keys.Enter) { //Obter a linha da célula selecionada DataGridViewRow linhaAtual = DataGriewSearch.CurrentRow; //Exibir o índice da linha atual int indice = linhaAtual.Index; Result = Convert.ToInt32(LIS_MUNICIPIOSColl[indice].COD_MUN_IBGE); this.Close(); } else if ((Control.ModifierKeys == Keys.Control) && (e.KeyCode == Keys.D)) { using (FrmCliente FrmCliente = new FrmCliente()) { int linha = DataGriewSearch.CurrentRow.Index; //PEGA LINHA SELECIONADA FrmCliente.CodClienteSelec = Convert.ToInt32(LIS_MUNICIPIOSColl[linha].COD_MUN_IBGE); FrmCliente.ShowDialog(); } } } }
Boolean AGREGAR_MODIFICAR = true; //CUANDO ES TRUE SE VA A INSERTAR UNA NUEVA ORDER Y FALSO ACTUALIZAR public void BuscarCliente(string buscar) { if (TxtDocumento.Text.Trim() == "") { MessageBox.Show("Completar los campos para continuar", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataTable tabla = new DataTable(); string SQL = ""; if (buscar != "") { SQL = "SELECT Cli_Documento, Cli_TipoDocumento, Cli_Nombre, Cli_Apellido, " + " Cli_Sexo, Cli_Tipo, Cli_CodEstado, Cli_Direccion, Cli_Email, Cli_Celular, " + " Cli_TelFijo, Cli_Contacto, Cli_TelContacto " + "FROM Cliente " + "WHERE Cli_Documento = '" + TxtDocumento.Text.Trim() + "'"; } tabla = ObjServer.LlenarTabla(SQL); if (tabla.Rows.Count > 0) { if (tabla.Rows[0]["Cli_CodEstado"].ToString() == "A") { string nombre = tabla.Rows[0]["Cli_Nombre"].ToString(); string apellido = tabla.Rows[0]["Cli_Apellido"].ToString(); string celular = tabla.Rows[0]["Cli_Celular"].ToString(); string telefono = tabla.Rows[0]["Cli_TelFijo"].ToString(); string direccion = tabla.Rows[0]["Cli_Direccion"].ToString(); string email = tabla.Rows[0]["Cli_Email"].ToString(); LblNombreRazonSocial.Text = $"{nombre} {apellido}"; LblCelular.Text = celular; LblTelefono.Text = telefono; LblDireccion.Text = direccion; LblEmail.Text = email; CboServicio.Focus(); } else { MessageBox.Show("El cliente esta inactivo", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (MessageBox.Show("El cliente no se ha encontrado. \n ¿Desea crearlo?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { TxtDocumento.Focus(); TxtDocumento.SelectAll(); FrmCliente f = new FrmCliente(); f.ShowDialog(); } TxtDocumento.Focus(); TxtDocumento.SelectAll(); LblNombre.Text = ""; //LblNombre.BackColor = Color.WhiteSmoke; } }
private void BtnCliente_Click(object sender, EventArgs e) { FrmCliente FrmCrearCli = new FrmCliente(); FrmCrearCli.ShowDialog(); LLenarCombos(); }
private void button3_Click(object sender, EventArgs e) { using (FrmCliente frm = new FrmCliente()) { frm.CodClienteSelec = _IDCLIENTE; frm.ShowDialog(); } }
private void btnCadFornecedor_Click(object sender, EventArgs e) { using (FrmCliente frm = new FrmCliente()) { frm.ShowDialog(); int CodSelec = Convert.ToInt32(cbCliente.SelectedValue); GetDropCliente(); cbCliente.SelectedValue = CodSelec; } }
private void btnAdicionar_Click(object sender, EventArgs e) { FrmCliente frmCliente = new FrmCliente(); frmCliente.ShowDialog(); Cliente cliente = frmCliente.cliente; ConnectionFactory.adicionarCliente(cliente); atualizarGrid(); }
private void BtnCargarCliente_Click(object sender, EventArgs e) { using (FrmCliente FormCliente = new FrmCliente(FrmCliente.EMostrarOcultarColumnas.MostrarEnviar)) { FormCliente.AsignarFormCrearDelivery(this); FormCliente.ShowDialog(); if (FormCliente.DialogResult == DialogResult.OK) { CargarDatosCliente(); // Se actualizo la variable ID_Cliente para cargar el nuevo cliente } } }
private void btnEditar_Click(object sender, EventArgs e) { Int32 idCliente = Convert.ToInt32(dgvCliente.CurrentRow.Cells[0].Value); FrmCliente frmCliente = new FrmCliente(); frmCliente.id = idCliente; frmCliente.ShowDialog(); Cliente cliente = frmCliente.cliente; ConnectionFactory.atualizarCliente(cliente); atualizarGrid(); }
private void btnAdicionarCliente_Click(object sender, EventArgs e) { bool found = false; foreach (Form form in Application.OpenForms) { if (form is FrmCliente) { form.Focus(); found = true; } } if (!found) { FrmCliente frmCliente = new FrmCliente(); frmCliente.ShowDialog(); CarregarGrid(); } }
private void DGDadosServicos_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int rowindex = e.RowIndex; if (LIS_PRODUTOSPEDIDOColl.Count > 0 && rowindex > -1) { int ColumnSelecionada = e.ColumnIndex; int CodSelect = -1; if (ColumnSelecionada == 3) //Cliente { CodSelect = Convert.ToInt32(LIS_PRODUTOSPEDIDOColl[rowindex].IDCLIENTE); using (FrmCliente frm = new FrmCliente()) { frm.CodClienteSelec = CodSelect; frm.ShowDialog(); } } } }
public void AgregarCliente() { try { if (string.IsNullOrEmpty(txtSeleccionarCLiente.Text)) { FrmCliente FrmC = new FrmCliente(); FrmC.ShowDialog(); if (FrmC.DialogResult == DialogResult.OK) { //txtSeleccionarCLiente.Text = FrmC.dgvCliente.Rows[FrmC.dgvCliente.CurrentRow.Cells].Cells[1].Value.ToString(); txtSeleccionarCLiente.Text = FrmC.dgvCliente.CurrentRow.Cells[1].Value.ToString(); CodigoCliente = Int32.Parse(FrmC.dgvCliente.CurrentRow.Cells[0].Value.ToString()); conexion.Desconectar(); } } else { MySqlCommand cmd = new MySqlCommand(" SELECT * FROM cliente where IDCliente = @IDCliente", conexion.GetCon()); cmd.Parameters.AddWithValue("IDCliente", txtSeleccionarCLiente.Text); conexion.Conectar(); MySqlDataReader registro = cmd.ExecuteReader(); if (registro.Read()) { txtSeleccionarCLiente.Text = registro["NombreCompleto"].ToString(); txtclienteTemporal.Focus(); } conexion.Desconectar(); } } catch (Exception ex) { MessageBox.Show("Ha ocurrido un problema a la hora de cargar los datos, comuniquese con soporte"); } }
private void clienteToolStripMenuItem_Click(object sender, EventArgs e) { FrmCliente _frmCliente = new FrmCliente(); _frmCliente.ShowDialog(); }
private void panel4_Click(object sender, EventArgs e) { FrmCliente frmCliente = new FrmCliente(); frmCliente.ShowDialog(); }
private void BtnNuevoCliente_Click(object sender, EventArgs e) { FrmCliente ObjFrmCliente = new FrmCliente(); ObjFrmCliente.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { FrmCliente cliente = new FrmCliente(); cliente.ShowDialog(); }
private void btnCadFornecedor_Click(object sender, EventArgs e) { FrmCliente FrmCliente = new FrmCliente(); FrmCliente.ShowDialog(); }