protected void Page_Load(object sender, EventArgs e) { string codigo = Request.QueryString["cod"]; lblOT.Text = Request.QueryString["ot"]; lblNombreOT.Text = Request.QueryString["nomot"].ToUpper(); lblCantidadAsignada.Text = Request.QueryString["solFL"]; lblCantidadSolicitada.Text = Request.QueryString["solKG"]; lblFormatoCorte.Text = Request.QueryString["formato"]; lblFechaCreacion.Text = Request.QueryString["fecha"]; lblCliente.Text = Request.QueryString["cliente"]; lblComponente.Text = Request.QueryString["comp"]; #region cargaCodigoBarra LabelKit.BarcodeGenerator code = new LabelKit.BarcodeGenerator(); System.Drawing.Graphics g = Graphics.FromImage(new Bitmap(1, 1)); System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(1, 1, PixelFormat.Format32bppArgb); g = Graphics.FromImage(bmp); code.DrawCode128(g, codigo.Trim(), 0, 0).Save(Server.MapPath("./barcodes/bc.png"), ImageFormat.Png); imgCodigo.ImageUrl = "./barcodes/bc.png"; lblCodigo.Text = codigo; #endregion BodegaPliegos bd = bp.CargaPapelSolicitado(codigo, 4); lblCodigoItem.Text = bd.CodigoProducto; lblPapel.Text = bd.Papel.ToUpper(); lblMarca.Text = bd.Marca.ToUpper(); lblCertificacion.Text = bd.Certificacion; lblGramaje.Text = bd.Gramaje; lblAncho.Text = bd.Ancho; lblLargo.Text = bd.Largo; lblAntiguedad.Text = bd.Antiguedad; //RadGrid1.DataSource = bp.CargaPapelSolicitud(codigo, 0); //RadGrid1.DataBind(); RadGrid2.DataSource = bp.CargaPapelSolicitudDetalle(codigo, 1); RadGrid2.DataBind(); int totalAsignado = bp.totalAsignado(lblOT.Text, lblComponente.Text, 0); lblAsignadoFL.Text = totalAsignado.ToString("N0").Replace(",", "."); lblSolicitadoFL.Text = Convert.ToInt32(Request.QueryString["solFL"]).ToString("N0").Replace(",", "."); lblSaldoFL.Text = (Convert.ToInt32(Request.QueryString["solFL"]) - totalAsignado).ToString("N0").Replace(",", "."); int FCA = Convert.ToInt32(bp.CargaFormatoCorte(codigo, "", 1)); //formato corte ancho int FCL = Convert.ToInt32(bp.CargaFormatoCorte(codigo, "", 2)); //formato corte Largo int Factor = Convert.ToInt32(bp.CargaFormatoCorte(codigo, "", 3)); //formato Factor lblFCAncho.Text = FCA.ToString(); lblFCLargo.Text = FCL.ToString(); lblFactor.Text = Factor.ToString(); }
protected void Page_Load(object sender, EventArgs e) { string codigo = Request.QueryString["cod"]; lblOT.Text = Request.QueryString["ot"]; lblNombreOT.Text = Request.QueryString["nomot"].ToLower(); lblCantidadAsignada.Text = Request.QueryString["solFL"]; lblCantidadSolicitada.Text = Request.QueryString["solKG"]; lblFormatoCorte.Text = Request.QueryString["formato"]; lblFechaCreacion.Text = Request.QueryString["fecha"]; lblCliente.Text = Request.QueryString["cliente"]; lblComponente.Text = Request.QueryString["comp"]; #region cargaCodigoBarra LabelKit.BarcodeGenerator code = new LabelKit.BarcodeGenerator(); System.Drawing.Graphics g = Graphics.FromImage(new Bitmap(1, 1)); System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(1, 1, PixelFormat.Format32bppArgb); g = Graphics.FromImage(bmp); code.DrawCode128(g, codigo.Trim(), 0, 0).Save(Server.MapPath("./barcodes/bc.png"), ImageFormat.Png); imgCodigo.ImageUrl = "./barcodes/bc.png"; lblCodigo.Text = codigo; #endregion RadGrid1.DataSource = bp.CargaPapelSolicitud(codigo, 2); RadGrid1.DataBind(); RadGrid2.DataSource = bp.CargaPapelSolicitudDetalle(codigo, 3); RadGrid2.DataBind(); int totalAsignado = bp.totalAsignado(lblOT.Text, lblComponente.Text, 0); lblAsignadoFL.Text = totalAsignado.ToString("N0").Replace(",", "."); lblSolicitadoFL.Text = Convert.ToInt32(Request.QueryString["solFL"]).ToString("N0").Replace(",", "."); lblSaldoFL.Text = (Convert.ToInt32(Request.QueryString["solFL"]) - totalAsignado).ToString("N0").Replace(",", "."); int FCA = 0; int FCL = 0; for (int i = 0; i < RadGrid1.Items.Count; i++) { FCA = Convert.ToInt32(RadGrid1.Items[i]["FCAncho"].Text); FCL = Convert.ToInt32(RadGrid1.Items[i]["FCLargo"].Text); } lblFCAncho.Text = FCA.ToString(); lblFCLargo.Text = FCL.ToString(); }
protected void Page_Load(object sender, EventArgs e) { txtAncho.Attributes.Add("onkeypress", "return solonumeros(event);"); txtLargo.Attributes.Add("onkeypress", "return solonumeros(event);"); try { if (Request.QueryString["p"] == "1") { } else { bool x = bp.ElimanarAsignacion(0, Request.QueryString["usuario"], 3); } } catch { } if (!IsPostBack) { lblTitulo.Text = "Atender Solicitud PreID "; lblPreID.Text = bp.PREID("", "", "", 0, "", "", 0, 0, 0, "", 0, "", "", 3, 0).ToString(); string Papel = ""; DateTime f = DateTime.Now; BodegaPliegos d = bp.BuscaOTComponente(Request.QueryString["ot"], Request.QueryString["comp"], "", "", f, f, 0, 4); lblOT.Text = d.OT; lblNombreOT.Text = d.NombreOT.ToUpper(); lblComponente.Text = d.Componente; lblFormatoPapel.Text = d.FormatoPapel; lblFechaCreacion.Text = d.FechaCreacion; lblCliente.Text = d.Cliente; lblCodigoProducto.Text = d.CodigoProducto; lblPapel.Text = d.Papel.ToUpper(); lblGramaje.Text = d.Gramaje; lblAncho.Text = d.Ancho; lblLargo.Text = d.Largo; txtAncho.Text = d.Ancho; txtLargo.Text = d.Largo; if (d.Papel.Contains("PEFC")) { lblCertificacion.Text = "SI"; lblTipoCertificacion.Text = "PEFC"; } else { lblCertificacion.Text = "NO"; lblTipoCertificacion.Text = "-"; } #region papel if (d.Papel.Contains("Bond Blanco")) { Papel = "bond blanco"; } else if (d.Papel.Contains("Bond Crema")) { Papel = "bond crema"; } else if (d.Papel.Contains("Bond Ahuesado")) { Papel = "bond ahuesado"; } else if (d.Papel.Contains("Cartulina")) { Papel = "cartulina"; } else if (d.Papel.Contains("Couche Brillante")) { Papel = "couche brillante"; } else if (d.Papel.Contains("Couche Op")) { Papel = "couche op"; } else if (d.Papel.Contains("diario hibrite")) { Papel = "diario hibrite"; } else if (d.Papel.Contains("diario periodico")) { Papel = "diario periodico"; } else if (d.Papel.Contains("diario salmon")) { Papel = "diario salmon"; } else if (d.Papel.Contains("Diario")) { Papel = "diario"; } else if (d.Papel.Contains("lwc brillante")) { Papel = "lwc brillante"; } else if (d.Papel.Contains("lwc opaco")) { Papel = "lwc opaco"; } #endregion RadGrid1.DataSource = bp.StockBodegaPliegos(lblOT.Text, lblComponente.Text, lblLargo.Text, Papel, Convert.ToInt32(lblGramaje.Text), Convert.ToInt32(lblAncho.Text), Convert.ToInt32(Request.QueryString["solFL"]), Convert.ToInt32(Request.QueryString["solKG"]), lblPreID.Text, Request.QueryString["usuario"], 2); RadGrid1.DataBind(); RadGrid2.DataSource = bp.ListadoPapelAsignado(lblOT.Text, lblComponente.Text, "", "", 0, 0, 0, "", 0, "", "", lblPreID.Text, 0, 1, 0); RadGrid2.DataBind(); int totalAsignado = bp.totalAsignado(lblOT.Text, lblComponente.Text, 0); //for (int i = 0; i < RadGrid2.Items.Count; i++) //{ // totalAsignado = totalAsignado + Convert.ToInt32(RadGrid2.Items[i]["stockFL"].Text); //} lblAsignadoFL.Text = totalAsignado.ToString("N0").Replace(",", "."); lblSolicitadoFL.Text = Convert.ToInt32(Request.QueryString["solFL"]).ToString("N0").Replace(",", "."); lblSolicitadoKG.Text = Convert.ToInt32(Request.QueryString["solKG"]).ToString("N0").Replace(",", "."); lblSaldoFL.Text = (Convert.ToInt32(Request.QueryString["solFL"]) - totalAsignado).ToString("N0").Replace(",", "."); } }