Esempio n. 1
0
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     TxtEditar.Text = "Nuevo";
     Limpiar();
     TxtCod_precio.Focus();
     Botones();
 }
Esempio n. 2
0
        public void Listar()
        {
            try
            {
                Ds = EPrecio.Listar();

                TxtCod_precio.Text  = Ds.Tables[0].Rows[0]["cod_precio"].ToString();
                TxtCod_preciov.Text = Ds.Tables[0].Rows[0]["cod_precio"].ToString();
                TxtDesc_precio.Text = Ds.Tables[0].Rows[0]["desc_precio"].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_precio.Focus();
                string rpta = Ex.Message;
                MensajeOk("Tabla Vacia, esta en modo Ingreso");
                Show();
            }
        }
Esempio n. 3
0
 private void GenerarCod()
 {
     try
     {
         int rpta = Convert.ToInt32(EPrecio.GenerarCod(TxtCod_precio.Text));
         TxtCod_precio.Text = Pref + rpta.ToString(TxtCadena.Text);
     }
     catch (Exception Ex)
     {
         MensajeError(" Solo se puede Generar Codigos Numericos " + Ex.StackTrace);
         TxtCod_precio.Focus();
     }
 }