コード例 #1
0
 public static dtoProductAlias ToDtoProductAlias(ProductAlia ProductAlias)
 {
     return(new dtoProductAlias()
     {
         Code = ProductAlias.Code, Alias = Converts.ToDtoAlias(ProductAlias.Alias), CodeAlias = Convert.ToInt32(ProductAlias.CodeAlias), CodeProduct = Convert.ToInt32(ProductAlias.CodeProduct)
     });
 }
コード例 #2
0
 public static ProductAlia ToProductAlias(dtoProductAlias dtoProductAlias)
 {
     return(new ProductAlia()
     {
         Code = dtoProductAlias.Code, Alias = Converts.ToAlias(dtoProductAlias.Alias), CodeAlias = dtoProductAlias.CodeAlias, CodeProduct = dtoProductAlias.CodeProduct
     });
 }
コード例 #3
0
 public static List <dtoShop> ToDtoShops(List <Shop> shops)
 {
     if (shops == null)
     {
         return(null);
     }
     return(shops.Select(x => Converts.ToDtoShop(x)).ToList());
 }
コード例 #4
0
        public static List <Getaway> ToGetaways(List <dtoGetaway> dtoGetaways)
        {
            if (dtoGetaways == null)
            {
                return(null);
            }
            List <Getaway> Getaways = new List <Getaway>();

            dtoGetaways.ForEach(x => Getaways.Add(Converts.ToGetaway(x)));
            return(Getaways);
        }
コード例 #5
0
        public static List <dtoGetaway> ToDtoGetawaysI(List <GetawayProcI_Result> Getaways)
        {
            if (Getaways == null)
            {
                return(null);
            }
            List <dtoGetaway> dtoGetaways = new List <dtoGetaway>();

            Getaways.ForEach(x => dtoGetaways.Add(Converts.ToDtoGetawayI(x)));
            return(dtoGetaways);
        }
コード例 #6
0
        public static List <Connection> ToConnections(List <dtoConnection> dtoConnection)
        {
            if (dtoConnection == null)
            {
                return(null);
            }
            List <Connection> Connection = new List <Connection>();

            dtoConnection.ForEach(x => Connection.Add(Converts.ToConnection(x)));
            return(Connection);
        }
コード例 #7
0
        public static List <ProductAlia> ToProductAliases(List <dtoProductAlias> dtoProductAlias)
        {
            if (dtoProductAlias == null)
            {
                return(null);
            }
            List <ProductAlia> ProductAlias = new List <ProductAlia>();

            dtoProductAlias.ForEach(x => ProductAlias.Add(Converts.ToProductAlias(x)));
            return(ProductAlias);
        }
コード例 #8
0
        public static List <Product> ToProducts(List <dtoProduct> dtoProducts)
        {
            if (dtoProducts == null)
            {
                return(null);
            }
            List <Product> products = new List <Product>();

            dtoProducts.ForEach(x => products.Add(Converts.ToProduct(x)));
            return(products);
        }
コード例 #9
0
        public static List <Alias> ToAliases(List <ExtraAlias> extraAliases)
        {
            if (extraAliases == null)
            {
                return(null);
            }
            List <Alias> Alias = new List <Alias>();

            extraAliases.ForEach(x => Alias.Add(Converts.ToAlias(x)));
            return(Alias);
        }
コード例 #10
0
        public static List <Wall> ToWalls(List <dtoWall> dtoWalls)
        {
            if (dtoWalls == null)
            {
                return(null);
            }
            List <Wall> Walls = new List <Wall>();

            dtoWalls.ForEach(x => Walls.Add(Converts.ToWall(x)));
            return(Walls);
        }
コード例 #11
0
        public static List <Stand> ToStands(List <dtoStand> dtoStands)
        {
            if (dtoStands == null)
            {
                return(null);
            }
            List <Stand> stands = new List <Stand>();

            dtoStands.ForEach(x => stands.Add(Converts.ToStand(x)));
            return(stands);
        }
コード例 #12
0
        public static List <Alias> ToAliases(List <dtoAlias> dtoAlias)
        {
            if (dtoAlias == null)
            {
                return(null);
            }
            List <Alias> Alias = new List <Alias>();

            dtoAlias.ForEach(x => Alias.Add(Converts.ToAlias(x)));
            return(Alias);
        }
コード例 #13
0
        public static List <ProductShelf> ToProductShelves(List <dtoProductShelf> dtoProductsShelf)
        {
            if (dtoProductsShelf == null)
            {
                return(null);
            }
            List <ProductShelf> products = new List <ProductShelf>();

            dtoProductsShelf.ForEach(x => products.Add(Converts.ToProductShelf(x)));
            return(products);
        }
コード例 #14
0
        public static List <dtoProductShelf> ToDtoProductShelves(List <ProductShelf> products)
        {
            if (products == null)
            {
                return(null);
            }
            List <dtoProductShelf> dtoproduct = new List <dtoProductShelf>();

            products.ForEach(x => dtoproduct.Add(Converts.ToDtoProductShelf(x)));
            return(dtoproduct);
        }
コード例 #15
0
        public static List <Shelf> ToShelves(List <dtoShelf> dtoShelf)
        {
            if (dtoShelf == null)
            {
                return(null);
            }
            List <Shelf> Shelves = new List <Shelf>();

            dtoShelf.ForEach(x => Shelves.Add(Converts.ToShelf(x)));
            return(Shelves);
        }
コード例 #16
0
        public static List <ProductShop> ToProductshops(List <dtoProductShop> dtoProductsShops)
        {
            if (dtoProductsShops == null)
            {
                return(null);
            }
            List <ProductShop> products = new List <ProductShop>();

            dtoProductsShops.ForEach(x => products.Add(Converts.ToProductShop(x)));
            return(products);
        }
コード例 #17
0
 public static dtoStand ToDtoStand(Stand stand)
 {
     return(new dtoStand()
     {
         Code = stand.Code, CodeShop = stand.CodeShop != null?Convert.ToInt32(stand.CodeShop) : 0, P2 = new Point()
         {
             X = Convert.ToInt32(stand.X2), Y = Convert.ToInt32(stand.Y2)
         }, P1 = new Point()
         {
             X = Convert.ToInt32(stand.X1), Y = Convert.ToInt32(stand.Y1)
         }, Shelves = stand.Shelves == null ? null : Converts.ToDtoShelves(stand.Shelves.ToList()), Alias = Converts.ToDtoAlias(stand.Alias), CodeAlias = stand.CodeAlias
     });
 }
コード例 #18
0
        public static dtoShop ToDtoShop(Shop shop)
        {// כל רשימה שממירים יש לבדוק האם אינה ריקה
         //משום שהרשימות של אוייקט הדאל צריכות המרה לטיפוס רשימה, ולא ניתן להמיר אובייקט ריק
            dtoShop dto = new dtoShop();

            dto.Code     = shop.Code;
            dto.NameShop = shop.NameShop;
            dto.Stands   = shop.Stands != null?Converts.ToDtoStands(shop.Stands.ToList()) : null;

            dto.Walls = shop.Walls != null?Converts.ToDtoWalls(shop.Walls.ToList()) : null;

            dto.Connections = shop.Connections != null?Converts.ToDtoConnections(shop.Connections.ToList()) : null;

            dto.Getaways = shop.Stands != null?Converts.ToDtoGetawaysI(dtoShop.GetawayProcI_Results(shop.Code)) : null;

            dto.CodeGetaway = Convert.ToInt32(shop.CodeGetaway);
            return(dto);
        }
コード例 #19
0
 public static dtoProductShop ToDtoProductShop(ProductShop productShop)
 {
     return(new dtoProductShop()
     {
         Code = Convert.ToInt32(productShop.Code), CodeProduct = Convert.ToInt32(productShop.CodeProduct), CodeShop = Convert.ToInt32(productShop.CodeShop), Product = Converts.ToDtoProduct(productShop.Product)
     });
 }
コード例 #20
0
 public static dtoWall ToDtoWall(Wall Wall)
 {
     return(new dtoWall()
     {
         Code = Wall.Code, CodeShop = Convert.ToInt32(Wall.CodeShop), P1 = new Point(Convert.ToInt32(Wall.X1), Convert.ToInt32(Wall.Y1)), P2 = new Point(Convert.ToInt32(Wall.X2), Convert.ToInt32(Wall.Y2)), Alias = Converts.ToDtoAlias(Wall.Alias), CodeAlias = Wall.CodeAlias
     });
 }
コード例 #21
0
 public static dtoProduct ToDtoProduct(Product product)
 {
     if (product == null)
     {
         return(null);
     }
     try
     {
         return(new dtoProduct()
         {
             Barcode = product.Barcode, Code = product.Code, Company = product.Company, Size = product.Size, Alias = Converts.ToDtoAlias(product.Alias), CodeAlias = Convert.ToInt32(product.CodeAlias), ProductAlias = product.ProductAlias == null?null:Converts.ToDtoProductAliases(product.ProductAlias.ToList()), Src = product.Src
         });
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #22
0
 public static Wall ToWall(dtoWall dtoWall)
 {
     return(new Wall()
     {
         Code = dtoWall.Code, CodeShop = dtoWall.CodeShop, X1 = dtoWall.P1.X, X2 = dtoWall.P2.X, Y1 = dtoWall.P1.Y, Y2 = dtoWall.P2.Y, Alias = Converts.ToAlias(dtoWall.Alias), Shop = null, CodeAlias = dtoWall.CodeAlias
     });
 }
コード例 #23
0
 public static Shelf ToShelf(dtoShelf dtoShelf)
 {
     return(new Shelf()
     {
         Code = dtoShelf.Code, Num = dtoShelf.Num, CodeStand = dtoShelf.CodeStand, ProductShelves = dtoShelf.ProductShelves == null?null: ToProductShelves(dtoShelf.ProductShelves.ToList()), Alias = Converts.ToAlias(dtoShelf.Alias), Stand = null, CodeAlias = dtoShelf.CodeAlias
     });
 }
コード例 #24
0
 public static Stand ToStand(dtoStand dtoStand)
 {
     return(new Stand()
     {
         Code = dtoStand.Code, CodeShop = dtoStand.CodeShop, X2 = dtoStand.P2.X, X1 = dtoStand.P1.X, Y2 = dtoStand.P2.Y, Y1 = dtoStand.P1.Y, Alias = Converts.ToAlias(dtoStand.Alias), Shelves = Converts.ToShelves(dtoStand.Shelves), Shop = null, CodeAlias = dtoStand.CodeAlias
     });
 }
コード例 #25
0
 public static Product ToProduct(dtoProduct dtoProduct)
 {
     if (dtoProduct == null)
     {
         return(null);
     }
     return(new Product()
     {
         Barcode = dtoProduct.Barcode, Company = dtoProduct.Company, CodeAlias = dtoProduct.CodeAlias, Size = dtoProduct.Size, Code = dtoProduct.Code, Alias = Converts.ToAlias(dtoProduct.Alias), ProductAlias = Converts.ToProductAliases(dtoProduct.ProductAlias), Src = dtoProduct.Src
     });
 }
コード例 #26
0
 public static dtoProductShelf ToDtoProductShelf(ProductShelf productshelf)
 {
     return(new dtoProductShelf()
     {
         Code = productshelf.Code, CodeProduct = productshelf.CodeProduct != null?Convert.ToInt32(productshelf.CodeProduct) : 0, CodeShelf = productshelf.CodeShelf != null?Convert.ToInt32(productshelf.CodeShelf) : 0, Product = Converts.ToDtoProduct(productshelf.Product)
     });
 }
コード例 #27
0
 public static dtoShelf ToDtoShelf(Shelf shelf)
 {
     return(new dtoShelf()
     {
         Code = shelf.Code, CodeStand = Convert.ToInt32(shelf.CodeStand), ProductShelves = shelf.ProductShelves == null ? null : ToDtoProductShelves(shelf.ProductShelves.ToList()), Alias = Converts.ToDtoAlias(shelf.Alias), Num = shelf.Num, CodeAlias = Convert.ToInt32(shelf.CodeAlias)
     });
 }
コード例 #28
0
 public static Shop ToShop(dtoShop dtoShop, string password)
 {
     return(new Shop()
     {
         Code = dtoShop.Code, NameShop = dtoShop.NameShop, Password = password, Connections = Converts.ToConnections(dtoShop.Connections), Getaways = Converts.ToGetaways(dtoShop.Getaways), Walls = Converts.ToWalls(dtoShop.Walls), Stands = Converts.ToStands(dtoShop.Stands), CodeGetaway = dtoShop.CodeGetaway
     });
 }
コード例 #29
0
 public static ProductShelf ToProductShelf(dtoProductShelf dtoProductShelf)
 {
     return(new ProductShelf()
     {
         Code = dtoProductShelf.Code, CodeProduct = dtoProductShelf.CodeProduct, CodeShelf = dtoProductShelf.CodeShelf, Product = Converts.ToProduct(dtoProductShelf.Product), Shelf = null
     });
 }