Ejemplo n.º 1
0
        private void FillFormDataHojas(PickingList pl)
        {
            int row   = grid_items.Rows.Count;
            int index = 0;

            //llenar el grid de renglones desde la sincronizacion.
            foreach (ClassRecepcion item in pl.Lista_hojas)
            {
                AgregarRenglon();
                grid_items.Rows[row].Cells["product_id"].Value = pl.Lista_hojas.ElementAt(index).Part_Number;
                grid_items.Rows[row].Cells["cant"].Value       = pl.Lista_hojas.ElementAt(index).cant_despacho;
                grid_items.Rows[row].Cells["unidad"].Value     = "hojas";
                grid_items.Rows[row].Cells["ancho"].Value      = pl.Lista_hojas.ElementAt(index).Width;
                grid_items.Rows[row].Cells["largo"].Value      = pl.Lista_hojas.ElementAt(index).Lenght;
                grid_items.Rows[row].Cells["msi"].Value        = 0;
                grid_items.Rows[row].Cells["pie_lin"].Value    = 0;
                grid_items.Rows[row].Cells["ratio"].Value      = 0;
                grid_items.Rows[row].Cells["kilo_rollo"].Value = 0;
                grid_items.Rows[row].Cells["kilo_total"].Value = 0;
                grid_items.Rows[row].Cells["action"].Value     = 1;
                row   += 1;
                index += 1;
            }
            //llenar el grid de ID con los datos de las hojas.
            foreach (ClassRecepcion item in pl.Lista_hojas)
            {
                Roll_Details hoja = new Roll_Details
                {
                    Product_id    = item.Part_Number,
                    Product_name  = item.ProductName,
                    Roll_id       = item.Palet_number,
                    Roll_number   = "0",
                    Code_Person   = "0",
                    Unique_code   = "0",
                    Tipo_pro      = 1,
                    Cant_despacho = Convert.ToInt32(item.cant_despacho),
                    Cantidad      = item.Palet_paginas,
                    Tipo_mov      = item.Tipo
                };
                listarc.Add(hoja);
            }
            grid_UniqueCode.DataSource = listarc.ToList();
        }
Ejemplo n.º 2
0
        private void Bot_sincro_Click(object sender, EventArgs e)
        {
            using (PickingList pl = new PickingList())
            {
                pl.ShowDialog();
                int fila = 0;
                if (pl.List_products.Count() == 0)
                {
                    return;
                }
                //llenar el grid de renglones desde la sincronizacion.
                foreach (Producto item in pl.List_products)
                {
                    AgregarRenglon();
                    grid_items.Rows[fila].Cells["product_id"].Value = pl.List_products.ElementAt(fila).Product_id;
                    grid_items.Rows[fila].Cells["cant"].Value       = pl.List_products.ElementAt(fila).Product_quantity;
                    grid_items.Rows[fila].Cells["unidad"].Value     = "rollo cortado.";
                    grid_items.Rows[fila].Cells["ancho"].Value      = pl.List_products.ElementAt(fila).width;
                    grid_items.Rows[fila].Cells["largo"].Value      = pl.List_products.ElementAt(fila).lenght;
                    grid_items.Rows[fila].Cells["msi"].Value        = pl.List_products.ElementAt(fila).msi;
                    grid_items.Rows[fila].Cells["pie_lin"].Value    = Convert.ToDouble(pl.List_products.ElementAt(fila).msi) *
                                                                      Convert.ToDouble(pl.List_products.ElementAt(fila).Product_quantity);
                    grid_items.Rows[fila].Cells["ratio"].Value = despachomanager
                                                                 .GetRatioProduct(pl.List_products.ElementAt(fila).Product_id);
                    grid_items.Rows[fila].Cells["kilo_rollo"].Value =
                        Convert.ToDouble(grid_items.Rows[fila].Cells["msi"].Value) /
                        Convert.ToDouble(grid_items.Rows[fila].Cells["ratio"].Value);

                    grid_items.Rows[fila].Cells["kilo_total"].Value =
                        Convert.ToDouble(grid_items.Rows[fila].Cells["kilo_rollo"].Value) *
                        Convert.ToDouble(grid_items.Rows[fila].Cells["cant"].Value);

                    fila += 1;
                }
                //llenar el grid de unique_code.
                grid_UniqueCode.DataSource = pl.Lista_rollos.ToList();



                listarc = pl.Lista_rollos.ToList();
            }
        }
Ejemplo n.º 3
0
        private void FillFormDatagraphics(PickingList pl)
        {
            int row   = grid_items.Rows.Count;
            int index = 0;

            foreach (ClassRecepcion item in pl.Lista_graphics)
            {
                AgregarRenglon();
                grid_items.Rows[row].Cells["product_id"].Value = pl.Lista_graphics.ElementAt(index).Part_Number;
                grid_items.Rows[row].Cells["cant"].Value       = 1;
                grid_items.Rows[row].Cells["unidad"].Value     = "graphics";
                grid_items.Rows[row].Cells["ancho"].Value      = pl.Lista_graphics.ElementAt(index).Width;
                grid_items.Rows[row].Cells["largo"].Value      = pl.Lista_graphics.ElementAt(index).Lenght;
                grid_items.Rows[row].Cells["msi"].Value        = 0;
                grid_items.Rows[row].Cells["pie_lin"].Value    = 0;
                grid_items.Rows[row].Cells["ratio"].Value      = 0;
                grid_items.Rows[row].Cells["kilo_rollo"].Value = 0;
                grid_items.Rows[row].Cells["kilo_total"].Value = 0;
                grid_items.Rows[row].Cells["action"].Value     = 2;
                row   += 1;
                index += 1;
            }
            //llenar el grid de ID con los datos de las hojas.
            foreach (ClassRecepcion item in pl.Lista_graphics)
            {
                Roll_Details graphic = new Roll_Details
                {
                    Product_id    = item.Part_Number,
                    Product_name  = item.ProductName,
                    Roll_id       = item.Roll_ID,
                    Roll_number   = "0",
                    Code_Person   = "0",
                    Unique_code   = "0",
                    Tipo_pro      = 2,
                    Cant_despacho = 1,
                    Cantidad      = 1,
                    Tipo_mov      = item.Tipo
                };
                listarc.Add(graphic);
            }
            grid_UniqueCode.DataSource = listarc.ToList();
        }
Ejemplo n.º 4
0
        private void FillFormDataCortados(PickingList pl)
        {
            int row   = grid_items.Rows.Count;
            int index = 0;

            //llenar el grid de renglones desde la sincronizacion.
            foreach (Producto item in pl.List_products)
            {
                AgregarRenglon();
                grid_items.Rows[row].Cells["product_id"].Value = pl.List_products.ElementAt(index).Product_id;
                grid_items.Rows[row].Cells["cant"].Value       = pl.List_products.ElementAt(index).Product_quantity;
                grid_items.Rows[row].Cells["unidad"].Value     = "rollo cortado.";
                grid_items.Rows[row].Cells["ancho"].Value      = pl.List_products.ElementAt(index).Width;
                grid_items.Rows[row].Cells["largo"].Value      = pl.List_products.ElementAt(index).Lenght;
                grid_items.Rows[row].Cells["msi"].Value        = pl.List_products.ElementAt(index).Msi;
                grid_items.Rows[row].Cells["pie_lin"].Value    = Convert.ToDouble(pl.List_products.ElementAt(index).Msi) *
                                                                 Convert.ToDouble(pl.List_products.ElementAt(index).Product_quantity);
                grid_items.Rows[row].Cells["ratio"].Value = despachomanager
                                                            .GetRatioProduct(pl.List_products.ElementAt(index).Product_id);
                grid_items.Rows[row].Cells["kilo_rollo"].Value =
                    Convert.ToDouble(grid_items.Rows[row].Cells["msi"].Value) /
                    Convert.ToDouble(grid_items.Rows[row].Cells["ratio"].Value);

                grid_items.Rows[row].Cells["kilo_total"].Value =
                    Convert.ToDouble(grid_items.Rows[row].Cells["kilo_rollo"].Value) *
                    Convert.ToDouble(grid_items.Rows[row].Cells["cant"].Value);
                grid_items.Rows[row].Cells["action"].Value = 0;

                row   += 1;
                index += 1;
            }
            //llenar el grid de unique_code.
            foreach (Roll_Details item in pl.Lista_rollos)
            {
                listarc.Add(item);
            }
            grid_UniqueCode.DataSource = listarc.ToList();
        }
Ejemplo n.º 5
0
        private void LoadPicking()
        {
            DeleteRowBlank();
            using (PickingList pl = new PickingList())
            {
                pl.ShowDialog();
                switch (pl.Action)
                {
                case 0:
                    //pick de rolls
                    if (pl.List_products == null || pl.List_products.Count() == 0)
                    {
                        return;
                    }
                    FillFormDataCortados(pl);
                    break;

                case 1:
                    //pick de hojas
                    if (pl.Lista_hojas == null || pl.Lista_hojas.Count() == 0)
                    {
                        return;
                    }
                    FillFormDataHojas(pl);
                    break;

                case 2:
                    //pick de graphics
                    if (pl.Lista_graphics == null || pl.Lista_graphics.Count() == 0)
                    {
                        return;
                    }
                    FillFormDatagraphics(pl);
                    break;
                }
            }
        }