private void Btn_Nuevo_Click(object sender, EventArgs e) { Frm_EditCategoria edt = new Frm_EditCategoria(); edt.Flag = "A"; edt.ShowDialog(); ExtraerMov(); }
private void Btn_Modificar_Click(object sender, EventArgs e) { if (vsp_categorias.ActiveSheet.RowCount > 0) { int fila = vsp_categorias.ActiveSheet.ActiveRowIndex; Frm_EditCategoria edt = new Frm_EditCategoria(); edt.Flag = "M"; edt.CodMarca = vsp_categorias.ActiveSheet.Cells[fila, 0].Tag.ToString().Trim(); edt.Marca = vsp_categorias.ActiveSheet.Cells[fila, 0].Text.ToString().Trim(); edt.Codigo = vsp_categorias.ActiveSheet.Cells[fila, 1].Text.ToString().Trim(); edt.Categoria = vsp_categorias.ActiveSheet.Cells[fila, 2].Text.ToString().Trim(); edt.ColorHex = vsp_categorias.ActiveSheet.Cells[fila, 3].Text.ToString().Trim(); edt.Url_Img = vsp_categorias.ActiveSheet.Cells[fila, 4].Text.ToString().Trim(); edt.Referencia = vsp_categorias.ActiveSheet.Cells[fila, 5].Text.ToString().Trim(); edt.color = md.Html_a_Color(vsp_categorias.ActiveSheet.Cells[fila, 3].Tag.ToString()); edt.ShowDialog(); ExtraerMov(); } }