public void Listar() { try { Ds = EDeposito.Listar(); TxtCod_deposito.Text = Ds.Tables[0].Rows[0]["cod_deposito"].ToString(); TxtCod_depositov.Text = Ds.Tables[0].Rows[0]["cod_deposito"].ToString(); TxtDesc_deposito.Text = Ds.Tables[0].Rows[0]["desc_deposito"].ToString(); TxtResp_deposito.Text = Ds.Tables[0].Rows[0]["resp_deposito"].ToString(); TxtUbicacion.Text = Ds.Tables[0].Rows[0]["ubicacion_deposito"].ToString(); TxtFecha_reg.Text = Ds.Tables[0].Rows[0]["fecha_reg"].ToString(); TxtDireccion_adm.Text = Ds.Tables[0].Rows[0]["direccion_adm"].ToString(); TxtScompras.Text = Ds.Tables[0].Rows[0]["scompras"].ToString(); TxtSventas.Text = Ds.Tables[0].Rows[0]["sventas"].ToString(); TxtActivo.Text = Ds.Tables[0].Rows[0]["activo"].ToString(); TxtCampo1.Text = Ds.Tables[0].Rows[0]["campo1"].ToString(); TxtCampo2.Text = Ds.Tables[0].Rows[0]["campo2"].ToString(); TxtCampo3.Text = Ds.Tables[0].Rows[0]["campo3"].ToString(); TxtCampo4.Text = Ds.Tables[0].Rows[0]["campo4"].ToString(); TxtCampo5.Text = Ds.Tables[0].Rows[0]["campo5"].ToString(); TxtCampo6.Text = Ds.Tables[0].Rows[0]["campo6"].ToString(); TxtEditar.Text = "Listar"; Registros(); } catch (Exception Ex) { TxtEditar.Text = "Nuevo"; Limpiar(); TxtCod_deposito.Focus(); string rpta = Ex.Message; MensajeOk("Tabla Vacia, esta en modo Ingreso"); Show(); } }
private void CArtCargar_Load(object sender, EventArgs e) { DataSet Dep = EDeposito.Listar(); TxtCod_deposito.Text = Dep.Tables[0].Rows[0]["cod_deposito"].ToString(); TxtDesc_deposito.Text = Dep.Tables[0].Rows[0]["Desc_deposito"].ToString(); TxtDesc_impuesto.Text = "Tasa General"; Top = 160; }