protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Controller_Cortadora cc = new Controller_Cortadora();
                string        ot        = Request.QueryString["ot"];
                string        compo     = Request.QueryString["comp"];
                string        codigo    = Request.QueryString["Codigo"];
                BodegaPliegos d         = cc.BuscaTotalCant(ot, compo, codigo);
                lblOT.Text         = d.OT;
                lblNombreOT.Text   = d.NombreOT;
                lblComponente.Text = d.Componente;
                lblPapel.Text      = d.Papel;
                lblCodigo.Text     = d.CodigoProducto;
                lblMarca.Text      = "";
                lblGramaje.Text    = d.Gramaje;
                lblAncho.Text      = d.Ancho;
                lblLargo.Text      = d.Largo;
                lblCantidad.Text   = d.StockFL;

                int sol = Convert.ToInt32(d.StockFL.Replace(".", ""));
                int ca  = cc.CantidadPallet(d.OT, d.Componente, d.CodigoProducto, 0);
                lblTotalSolicitado.Text = d.StockFL;
                lblTotalCreado.Text     = ca.ToString().Replace(",", ".");
                int resul = sol - ca;
                lblTotalFaltante.Text = resul.ToString().Replace(",", ".");
                this.BindDummyRow();
            }
        }
Ejemplo n.º 2
0
 public static string[] CargaSolicitud(string IDCorte, string OT, string Componente, string SKU)
 {
     try
     {
         Controller_Cortadora cc = new Controller_Cortadora();
         BodegaPliegos        d  = cc.BuscaTotalCant(IDCorte, Componente, SKU);
         int sol   = Convert.ToInt32(d.StockFL.Replace(".", ""));
         int ca    = cc.CantidadPallet(d.OT, d.Componente, d.CodigoProducto, 0);
         int resul = sol - ca;
         return(new[] { d.OT, d.NombreOT.ToUpper(), d.Componente, d.Papel.ToUpper(), d.CodigoProducto, d.Gramaje, d.Ancho, d.Largo, d.StockFL, ca.ToString().Replace(",", "."), resul.ToString().Replace(",", "."), d.SKUSalida, d.FAncho, d.FLargo });
     }
     catch
     {
         return(new[] { "" });
     }
 }