private void dataEmpresas_CellContentClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0) { empAdapter.HabilitarUsuario(Convert.ToDecimal(Convert.ToDecimal(dataEmpresas.Rows[e.RowIndex].Cells[0].Value))); MessageBox.Show("Usuario desbloqueado"); } infoEmpresas = empAdapter.ObtenerEmpresasBloqueadas(); actualizarTabla(); }
private void button2_Click(object sender, EventArgs e) { textRazSoc.ResetText(); textNom.ResetText(); textCUIT.ResetText(); textRepMax.ResetText(); textRepMin.ResetText(); infoEmpresas = empAdapter.ObtenerEmpresasBloqueadas(); dataEmpresas.Rows.Clear(); foreach (DataRow row in infoEmpresas.Rows) { dataEmpresas.Rows.Add(row.Field <Decimal>("id_usuario"), row.Field <String>("razon_social"), row.Field <String>("descripcion_larga"), row.Field <String>("cuit"), row.Field <String>("nombre_contacto"), row.Field <Decimal>("reputacion")); } }
public Pantalla_Modificacion_Datos_Empresa(decimal idUser) { InitializeComponent(); this.rubrosTableAdapter.Fill(this.gD1C2016DataSet.rubros); GD1C2016DataSet.empresasDataTable empData = empAdapter.ObtenerEmpresa(idUser); this.id = idUser.ToString(); textRacSoc.Text = empData.Rows[0].Field <String>("razon_social"); comboRubro.Text = empData.Rows[0].Field <String>("descripcion_larga"); textCUIT.Text = empData.Rows[0].Field <String>("cuit"); textNomCon.Text = empData.Rows[0].Field <String>("nombre_contacto"); GD1C2016DataSet.usuariosDataTable usersData = userAdapter.BuscarUsuario(Convert.ToDecimal(id)); textMail.Text = usersData.Rows[0].Field <String>("mail"); textTel.Text = usersData.Rows[0].Field <String>("telefono"); GD1C2016DataSet.direccionesDataTable direccionData = dirAdapter.BuscarDireccion(Convert.ToDecimal(id)); textDom.Text = direccionData.Rows[0].Field <String>("calle"); textNumDom.Text = direccionData.Rows[0].Field <Decimal>("numero").ToString(); textPiso.Text = direccionData.Rows[0].Field <Decimal>("piso").ToString(); textDepto.Text = direccionData.Rows[0].Field <String>("departamento"); textLocal.Text = direccionData.Rows[0].Field <String>("localidad"); textCodPos.Text = direccionData.Rows[0].Field <String>("cod_postal"); textCiudad.Text = direccionData.Rows[0].Field <String>("ciudad"); }
private void button3_Click(object sender, EventArgs e) { if (textRazSoc.Text == "" && textNom.Text == "" && textCUIT.Text == "" && textRepMax.Text == "" && textRepMin.Text == "") { MessageBox.Show("Complete algún campo de búsqueda"); } infoEmpresas = empAdapter.ObtenerEmpresasBloqueadas(); List <DataRow> filasAEliminar = new List <DataRow>(); String razSoc = textRazSoc.Text; String CUIT = textCUIT.Text; String nombre_con = textNom.Text; String repMin = textRepMin.Text; String rubro = textRubro.Text; decimal repMinConv; if (String.IsNullOrWhiteSpace(repMin)) { repMinConv = 0; } else { repMinConv = Convert.ToDecimal(repMin); } String repMax = textRepMax.Text; decimal repMaxConv; if (String.IsNullOrWhiteSpace(repMax)) { repMaxConv = 0; } else { repMaxConv = Convert.ToDecimal(repMax); } infoEmpresas = empAdapter.BuscarEmpresaBloq(razSoc, CUIT, nombre_con, rubro, repMinConv, repMaxConv); actualizarTabla(); return; }
private void Pantalla_Busqueda_Empresa_A_Habilitar_Load(object sender, EventArgs e) { configurarTabla(); infoEmpresas = empAdapter.ObtenerEmpresasBloqueadas(); actualizarTabla(); }