public static List <PromoCodeData> NewSellerPromoCode(int sellerId)
        {
            var items = new List <PromoCodeData>();

            var tableFromDB = DB.NewSellerPromoCode(sellerId);

            foreach (var row in tableFromDB)
            {
                var item = new PromoCodeData(row);
                items.Add(item);
            }

            return(items);
        }
 public PromoCodeData(PromoCodeData pcd)
 {
     this.Id                 = pcd.Id;
     this.Active             = pcd.Active;
     this.SellerId           = pcd.SellerId;
     this.Code               = pcd.Code;
     this.Type               = pcd.Type;
     this.PackAllCodes       = pcd.PackAllCodes;
     this.CreateDate         = pcd.CreateDate;
     this.CreateDateAsString = pcd.CreateDateAsString;
     this.ExpiryDate         = pcd.ExpiryDate;
     this.ExpiryDateAsString = pcd.ExpiryDateAsString;
     this.UsedDate           = pcd.UsedDate;
     this.ClientName         = pcd.ClientName;
     this.Products           = pcd.Products;
 }