Esempio n. 1
0
        public ActionResult FillCombobox()
        {
            var FD = new MaterialShippingControlEntities().Shipping_Records.Select(client => new
            {
                RecordFedexTracking = client.RecordFedexTracking.ToString()
            }).Distinct();

            return(Json(FD, JsonRequestBehavior.AllowGet));
        }
 public CatalogShipmentTypeService(MaterialShippingControlEntities entities)
 {
     this.entities = entities;
 }
 public Shipping_Catalog_ProductsService(MaterialShippingControlEntities entities)
 {
     this.entities = entities;
 }
 public VIEWDATAService(MaterialShippingControlEntities entities)
 {
     this.entities = entities;
 }
Esempio n. 5
0
 public ClientesService(MaterialShippingControlEntities BAE)
 {
     this.BAE = BAE;
 }
 public EnsamblesRealizadosService(MaterialShippingControlEntities Entities)
 {
     this.Entities = Entities;
 }
 public EnsamblesService(MaterialShippingControlEntities Systems)
 {
     this.Systems = Systems;
 }
        private static void DrawData(FixedContentEditor editor, double maxWidth, decimal ParametroFedex)
        {
            EnsamblesRealizadosService      _ServiceER = new EnsamblesRealizadosService();
            MaterialShippingControlEntities BD         = new MaterialShippingControlEntities();
            double WriteWhere = 160;   //Define el actual tope del editor

            Block block = new Block(); //Declara un nuevo bloque

            //SaltoLinea

            editor.Position.Translate(MargenIzquierdo, WriteWhere);//Mueve ele editor

            using (block.SaveTextProperties())
            {
                block.TextProperties.Font = FontsRepository.CourierBold;
                block.InsertText(new FontFamily("Calibri"), "FEDEX TRACKING: ");
            }
            block.InsertText(new FontFamily("Calibri"), ParametroFedex.ToString());
            editor.DrawBlock(block);

            //SaltoLinea
            WriteWhere += AnchoDeLinea * 2;                         //Salto de linea al editor
            editor.Position.Translate(MargenIzquierdo, WriteWhere); //Mueve ele editor

            block = new Block();                                    //Declara un nuevo bloque
            using (block.SaveTextProperties()){
                block.InsertText(new FontFamily("Calibri"), "REFERENCE: ");
            }
            block.InsertText(new FontFamily("Calibri"), _ServiceER.ReadE(ParametroFedex));
            editor.DrawBlock(block);

            //SaltoLinea
            block       = new Block();                              //Declara un nuevo bloque
            WriteWhere += AnchoDeLinea * 3;                         //Salto de linea al editor
            editor.Position.Translate(MargenIzquierdo, WriteWhere); //Mueve ele editor
            block.InsertText("FINISH PRODUCT: SHIPMENTS TO THE UNITED STATES PACKING LIST");
            block.TextProperties.Font     = FontsRepository.Helvetica;
            block.TextProperties.FontSize = 11;
            editor.DrawBlock(block);

            WriteWhere += AnchoDeLinea * 2;                                            //Salto de linea al editor
            editor.Position.Translate(50, WriteWhere);                                 //Mueve ele editor

            RgbColor headerColor         = new RgbColor(196, 196, 196);                //Color de Header
            RgbColor bordersColor        = new RgbColor(255, 255, 255);                //Color de los bordes
            RgbColor alternatingRowColor = new RgbColor(224, 224, 224);                //Color de rows
            Border   border = new Border(1, Editing.BorderStyle.Single, bordersColor); //Estilo de borde

            Table table = new Table
            {
                Borders    = new TableBorders(border),                                                  //A la propiedad borders de la tabla se le agrega el estilo de borde creado
                LayoutType = TableLayoutType.FixedWidth                                                 //Tipo de dise;o
            };                                                                                          //Nuevo objeto tabla

            table.DefaultCellProperties.Borders = new TableCellBorders(border, border, border, border); //Bordes de la tabla se les da las propiedades del objeto borde
            table.DefaultCellProperties.Padding = new System.Windows.Thickness(2);                      //Padding de tabla

            TableRow NewFila = table.Rows.AddTableRow();                                                //Nuevo objeto TableRow se anade a la tabla

            /////////////////////////////////////////////////////////////////////Contenido de la tabla///////////////////////////////////////////

            TableCell ObjetoCelda = NewFila.Cells.AddTableCell();//Objeto TableCell se anade a la tabla como fila

            ObjetoCelda.PreferredWidth = 100;
            ObjetoCelda.Background     = headerColor;          //A partir de ahora se declaran celdas que se agregaran al row
            Block ObjetoBlock = ObjetoCelda.Blocks.AddBlock(); //Declara un objeto de clase Block

            ObjetoBlock.TextProperties.FontSize = 11;
            ObjetoBlock.HorizontalAlignment     = HorizontalAlignment.Center; //Le da la alineacion
            ObjetoBlock.VerticalAlignment       = VerticalAlignment.Center;
            ObjetoBlock.InsertText("PACKAGING INFORMATION");                  //Agrega el texto de la primera columna

            ////----------SegundaColumna
            TableCell ObjetoCelda2 = NewFila.Cells.AddTableCell(); //Objeto TableCell se anade a la tabla como fila

            ObjetoCelda2.Background     = headerColor;             //Toma el color de fondo
            ObjetoCelda2.PreferredWidth = 250;
            Block ObjetoBlock2 = ObjetoCelda2.Blocks.AddBlock();   //Declara un objeto de clase Block

            ObjetoBlock2.TextProperties.FontSize = 11;
            ObjetoBlock2.HorizontalAlignment     = HorizontalAlignment.Center; //Le da la alineacion
            ObjetoBlock2.VerticalAlignment       = VerticalAlignment.Center;
            ObjetoBlock2.InsertText("PART NUMBER");                            //Le agrega el texto en el formato dado

            ////----------TerceraColumna
            TableCell ObjetoCelda3 = NewFila.Cells.AddTableCell(); //Objeto TableCell se anade a la tabla como fila

            ObjetoCelda3.Background     = headerColor;             //Toma el color de fondo
            ObjetoCelda3.PreferredWidth = 100;
            Block ObjetoBlock3 = ObjetoCelda3.Blocks.AddBlock();   //Declara un objeto de clase Block

            ObjetoBlock3.TextProperties.FontSize = 11;
            ObjetoBlock3.VerticalAlignment       = VerticalAlignment.Center;
            ObjetoBlock3.HorizontalAlignment     = HorizontalAlignment.Center; //Le da la alineacion
            ObjetoBlock3.InsertText("QUANTITY SHIPPED");                       //Le agrega el texto en el formato dado

            int i = 0;

            foreach (var sel in _ServiceER.ReadD(ParametroFedex))
            {
                i++;
                TableRow FilaContent = table.Rows.AddTableRow();                           //Nuevo objeto TableRow se anade a la tabla
                RgbColor rowColor    = i % 2 == 0 ? alternatingRowColor : RgbColors.White; // Alterna el color de la tabla obteniendo el residuo de la variable del ciclo

                //1erCampo
                TableCell ObjetoContenido = FilaContent.Cells.AddTableCell(); //Objeto TableCell se anade a la tabla como fila
                ObjetoContenido.Background = rowColor;                        //Toma el color de fondo
                Block amountBlock = ObjetoContenido.Blocks.AddBlock();
                amountBlock.TextProperties.FontSize = 8;
                amountBlock.HorizontalAlignment     = HorizontalAlignment.Center;
                amountBlock.InsertText(sel.RecordPieceBoxNo.ToString());

                //SegundoCampo
                TableCell ObjetoContenido2 = FilaContent.Cells.AddTableCell(); //Objeto TableCell se anade a la tabla como fila
                ObjetoContenido2.Background = rowColor;                        //Toma el color de fondo
                Block amountBlock2 = ObjetoContenido2.Blocks.AddBlock();
                amountBlock2.TextProperties.FontSize = 8;
                amountBlock2.HorizontalAlignment     = HorizontalAlignment.Center;
                amountBlock2.InsertText(sel.ProductName);

                //3er Campo
                TableCell ObjetoContenido3 = FilaContent.Cells.AddTableCell(); //Objeto TableCell se anade a la tabla como fila
                ObjetoContenido3.Background = rowColor;                        //Toma el color de fondo
                Block amountBlock3 = ObjetoContenido3.Blocks.AddBlock();
                amountBlock3.TextProperties.FontSize = 8;
                amountBlock3.HorizontalAlignment     = HorizontalAlignment.Center;
                amountBlock3.InsertText(sel.RecordCantidad.ToString());
            }
            ////////////////////////////////////////////////////////////////////Contenido de la tabla///////////////////////////////////////////
            editor.DrawTable(table);
        }
Esempio n. 9
0
 public AreasService(MaterialShippingControlEntities entities)
 {
     this.entities = entities;
 }