Beispiel #1
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            Indigo idg = new Indigo();

            idg.OT            = txtOT.Text;
            idg.NombreOT      = lblNombreOT.Text;
            idg.Tiraje        = Convert.ToInt32(txtTiraje.Text.Replace(".", string.Empty));
            idg.Pliego        = txtPliego.Text;
            idg.Maquina       = ddlMaquina.SelectedItem.ToString();
            idg.ClickInicio   = Convert.ToInt32(txtInicio.Text.Replace(".", string.Empty));
            idg.ClickFinal    = Convert.ToInt32(txtTermino.Text.Replace(".", string.Empty));
            idg.CantidadClick = idg.ClickFinal - idg.ClickInicio;
            idg.Papel         = txtPapel.Text;
            idg.Buenos        = Convert.ToInt32(txtPliego_Impresos.Text.Replace(".", string.Empty));
            idg.Malos         = Convert.ToInt32(txtPliego_Malos.Text.Replace(".", string.Empty));
            idg.Color         = ddlColor1.SelectedItem.ToString() + "/" + ddlColor2.SelectedItem.ToString();
            idg.Formato       = txtAncho.Text + " x " + txtLargo.Text;
            idg.Observacion   = txtObservacion.Text;
            idg.Usuario       = Session["Usuario"].ToString();
            Indigo_Controller controlHP = new Indigo_Controller();

            if (controlHP.InsertIndigo(idg))
            {
                string popupScript4 = "<script language='JavaScript'>window.opener.location='HPIndigo.aspx?id=13&cat=3';window.close();</script>";
                Page.RegisterStartupScript("PopupScript", popupScript4);
            }
            else
            {
                string popupScript4 = "<script language='JavaScript'>alert('Error al ingreso');</script>";
                Page.RegisterStartupScript("PopupScript", popupScript4);
            }
        }
        public void CargarDatos()
        {
            Indigo_Controller controlHP = new Indigo_Controller();

            RadGridOT.DataSource = controlHP.ListIndigo();
            RadGridOT.DataBind();
        }
Beispiel #3
0
        protected void txtOT_TextChanged(object sender, EventArgs e)
        {
            OrdenController   controlOT = new OrdenController();
            Indigo_Controller controlHP = new Indigo_Controller();
            Orden             ot        = controlOT.BuscarPorOT(txtOT.Text);
            string            Dato      = ot.NombreOT;

            if (Dato != null)
            {
                lblNombreOT.Text = Dato;
                txtInicio.Text   = controlHP.MaxClick().ToString("N0").Replace(",", ".");
                txtTiraje.Focus();
            }
        }