private void btnBuscar_Click(object sender, EventArgs e) { int sum; sum = 33; Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(sum); frmBusqueda.ShowDialog(); txtBusqueda.Text = frmBusqueda.dato; DiasF.DiasF(txtBusqueda.Text, dtDatos); }
private void cmbEstacion_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { idFuncion = 13; Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(idFuncion); frmBusqueda.ShowDialog(); cmbEstacion.Items.Add(frmBusqueda.dato); cmbEstacion.SelectedIndex = 0; } }
private void tbEstilo_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(42); frmBusqueda.ShowDialog(); if (frmBusqueda.articulosPT != null) { tbEstilo.Text = frmBusqueda.articulosPT.Estilo; tbLinea.Text = frmBusqueda.articulosPT.Linea; tbDescripcion.Text = frmBusqueda.articulosPT.Descr; tbCategoria.Text = frmBusqueda.articulosPT.Categoria; tbMarca.Text = frmBusqueda.articulosPT.Marca; } } }
private void txtBusqueda_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { int sum; sum = 27; Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(sum); frmBusqueda.ShowDialog(); txtBusqueda.Text = frmBusqueda.dato; if (DiasF.ExisteDiasFeriadossP(frmBusqueda.dato)) { Dialogs.Show("El proveedor ya se encuentra registrado", DialogsType.Error); //txtBusqueda.Text = string.Empty; //DiasF.DiasF(txtBusqueda.Text, dtDatos); } DiasF.DiasF(txtBusqueda.Text, dtDatos); } }
private void dtDatos_CellClick(object sender, DataGridViewCellEventArgs e) { int Ncolumna = 0; Ncolumna = e.ColumnIndex; if (Ncolumna == 0 && imagen < 1) { int sum; sum = Ncolumna + 31; Busqueda frmBusqueda = new Busqueda(sum); frmBusqueda.ShowDialog(); if (!string.IsNullOrEmpty(frmBusqueda.dato)) { string tempDescrip = Bom.BuscarThread(frmBusqueda.dato); dtDatos.CurrentRow.Cells[0].Value = tempDescrip; dtDatos.CurrentRow.Cells[2].Value = tempDescrip; } } if (Ncolumna == 1 && imagen < 1) { if (dtDatos.Rows.Count > 0) { int sum; sum = Ncolumna + 40; Input frm = new Input(sum, ""); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; if (!string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[1].Value.ToString()) && dtDatos.CurrentRow.Cells[3].Value != null) { dtDatos.CurrentRow.Cells[4].Value = float.Parse((dtDatos.CurrentRow.Cells[1].Value.ToString())) + float.Parse((dtDatos.CurrentRow.Cells[3].Value.ToString())); } } else { int sum; sum = Ncolumna + 40; Input frm = new Input(sum, "0"); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; if (!string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[1].Value.ToString()) && !string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[3].Value.ToString())) { dtDatos.CurrentRow.Cells[4].Value = float.Parse(dtDatos.CurrentRow.Cells[1].Value.ToString()) + float.Parse(dtDatos.CurrentRow.Cells[1].Value.ToString()); } } } if (Ncolumna == 3 && imagen < 1) { if (dtDatos.Rows.Count > 0) { int sum; sum = Ncolumna + 40; Input frm = new Input(sum, ""); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; if (!string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[3].Value.ToString()) && dtDatos.CurrentRow.Cells[1].Value != null) { dtDatos.CurrentRow.Cells[4].Value = float.Parse((dtDatos.CurrentRow.Cells[1].Value.ToString())) + float.Parse((dtDatos.CurrentRow.Cells[3].Value.ToString())); } } else { int sum; sum = Ncolumna + 40; Input frm = new Input(sum, "0"); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; if (!string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[1].Value.ToString()) && !string.IsNullOrEmpty(dtDatos.CurrentRow.Cells[3].Value.ToString())) { dtDatos.CurrentRow.Cells[4].Value = float.Parse(dtDatos.CurrentRow.Cells[1].Value.ToString()) + float.Parse(dtDatos.CurrentRow.Cells[1].Value.ToString()); } } } if (Ncolumna == 5 && imagen < 1) { if (dtDatos.Rows.Count > 0) { int sum; sum = Ncolumna + 20; Input frm = new Input(sum, ""); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; } else { int sum; sum = Ncolumna + 20; Input frm = new Input(sum, ""); frm.ShowDialog(); dtDatos.CurrentCell.Value = frm.dato; } } }
private void tbCliente_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { cotizacion1.cliente = false; Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(41); frmBusqueda.ShowDialog(); if (frmBusqueda.dato != "") { //CLIENTE CONTROL USER cotizacion1.cliente = true; cotizacion2.cliente = true; cotizacion3.cliente = true; cotizacion4.cliente = true; cotizacion5.cliente = true; Segundas segundas = new Segundas(); tbCliente.Text = frmBusqueda.dato; tbTienda.Text = frmBusqueda.dato1; nacionalidad = frmBusqueda.dato2; segundas = cotizacion.GetSegundas(tbCliente.Text); //NACIONALIDAD CONTROL USER cotizacion1.nacionalidad = nacionalidad.Trim(); cotizacion2.nacionalidad = nacionalidad.Trim(); cotizacion3.nacionalidad = nacionalidad.Trim(); cotizacion4.nacionalidad = nacionalidad.Trim(); cotizacion5.nacionalidad = nacionalidad.Trim(); if (segundas != null) { tbTela.Text = segundas.Tela; tbConf.Text = segundas.Conf; tbLav.Text = segundas.Lavado; tbPres.Text = segundas.proc; tbAvios.Text = segundas.avios; tbFalt.Text = segundas.faltantes; tbTotal.Text = segundas.total; //PORCENTAJE cotizacion1.porcentaje_tela = Convert.ToDecimal(segundas.Tela.Replace("%", "")) / 100; cotizacion2.porcentaje_tela = Convert.ToDecimal(segundas.Tela.Replace("%", "")) / 100; cotizacion3.porcentaje_tela = Convert.ToDecimal(segundas.Tela.Replace("%", "")) / 100; cotizacion4.porcentaje_tela = Convert.ToDecimal(segundas.Tela.Replace("%", "")) / 100; cotizacion5.porcentaje_tela = Convert.ToDecimal(segundas.Tela.Replace("%", "")) / 100; cotizacion6.faltantes = Convert.ToDecimal(segundas.faltantes.Replace("%", "")) / 100; } else { Dialogs.Show("Cliente no existente en el catálogo", DialogsType.Warning); tbTela.Text = "0"; tbConf.Text = "0"; tbLav.Text = "0"; tbPres.Text = "0"; tbAvios.Text = "0"; tbFalt.Text = "0"; tbTotal.Text = "0"; cotizacion1.porcentaje_tela = 0; cotizacion2.porcentaje_tela = 0; cotizacion3.porcentaje_tela = 0; cotizacion4.porcentaje_tela = 0; cotizacion5.porcentaje_tela = 0; } } else { tbCliente.Text = ""; tbTienda.Text = ""; tbTela.Text = ""; tbConf.Text = ""; tbLav.Text = ""; tbPres.Text = ""; tbAvios.Text = ""; tbFalt.Text = ""; tbTotal.Text = ""; //CLIENTE CONTROL USER cotizacion1.cliente = false; cotizacion2.cliente = false; cotizacion3.cliente = false; cotizacion4.cliente = false; cotizacion5.cliente = false; } } }