public static void CopyFrom(this IInventry_27 to, IInventry_27 from)
 {
     to.Brand        = from.Brand;
     to.Cat          = from.Cat;
     to.Country      = from.Country;
     to.Description  = from.Description;
     to.Description2 = from.Description2;
     to.Duty_1       = from.Duty_1;
     to.Ecommerce    = from.Ecommerce;
     to.Foreign_1    = from.Foreign_1;
     to.Freight_1    = from.Freight_1;
     to.InvUnique    = from.InvUnique;
     to.Item         = from.Item;
     to.KitType      = from.KitType;
     to.Location     = from.Location;
     to.MarkDeleted  = from.MarkDeleted;
     to.PackSize     = from.PackSize;
     to.Part         = from.Part;
     to.PriceQty     = from.PriceQty;
     to.Serial       = from.Serial;
     to.Size_1       = from.Size_1;
     to.Size_2       = from.Size_2;
     to.Size_3       = from.Size_3;
     to.Supplier     = from.Supplier;
     to.SuppPart     = from.SuppPart;
     to.Tax          = from.Tax;
     to.Units        = from.Units;
     to.Weight       = from.Weight;
     to.WholeExtra_1 = from.WholeExtra_1;
     to.Wholesale_1  = from.Wholesale_1;
 }
        public static bool LoadFromReader_Ext(this IInventry_27 inventry_27, OdbcDataReader reader)
        {
            inventry_27 = inventry_27 ?? new Inventry_27();

            bool loadSucceeded = false;

            inventry_27.InvUnique    = (Int32)FromReader(reader, "InvUnique");
            inventry_27.Cat          = (string)FromReader(reader, "Cat");
            inventry_27.Part         = (string)FromReader(reader, "Part");
            inventry_27.Size_1       = (string)FromReader(reader, "Size_1");
            inventry_27.Size_2       = (string)FromReader(reader, "Size_2");
            inventry_27.Size_3       = (string)FromReader(reader, "Size_3");
            inventry_27.Supplier     = (Single)FromReader(reader, "Supplier");
            inventry_27.Description  = (string)FromReader(reader, "Description");
            inventry_27.Wholesale_1  = (double)FromReader(reader, "Wholesale_1");
            inventry_27.WholeExtra_1 = (double)FromReader(reader, "WholeExtra_1");
            inventry_27.Freight_1    = (double)FromReader(reader, "Freight_1");
            inventry_27.Duty_1       = (double)FromReader(reader, "Duty_1");
            inventry_27.Foreign_1    = (double)FromReader(reader, "Foreign_1");
            inventry_27.Country      = (string)FromReader(reader, "Country");
            inventry_27.Tax          = (Int16)FromReader(reader, "Tax");
            inventry_27.SuppPart     = (string)FromReader(reader, "SuppPart");
            inventry_27.PriceQty     = (Single)FromReader(reader, "PriceQty");
            inventry_27.MarkDeleted  = (string)FromReader(reader, "MarkDeleted");
            inventry_27.Brand        = (Single)FromReader(reader, "Brand");
            inventry_27.PackSize     = (string)FromReader(reader, "PackSize");
            inventry_27.Units        = (string)FromReader(reader, "Units");
            inventry_27.Weight       = (Single)FromReader(reader, "Weight");
            inventry_27.KitType      = (Byte)FromReader(reader, "KitType");
            inventry_27.Serial       = (string)FromReader(reader, "Serial");
            inventry_27.Ecommerce    = (string)FromReader(reader, "ECommerce");

            loadSucceeded = true;
            return(loadSucceeded);
        }
Пример #3
0
        public Inventry_27_Clean(IInventry_27 component)
        {
            _Inventry_27 = component ?? new Inventry_27();

            _Inventry_27.Part = _Inventry_27.Part ?? string.Empty;
            ((IInventry_27)this).CopyFrom(component);
        }
Пример #4
0
        public static InventoryBasePriceInfo PopulateBasePriceSchedInfo_NoPrice // single part
        (
            this IEnumerable <IInvPrice> InvPrices_TodaysPrices
            , IInventry_27 InventoryItem
            , short Schedule_0
            , short Schedule_List
            , short Schedule_Cash
        )
        {
            List <IInventry_27> invItems = new List <IInventry_27>();

            invItems.Add(InventoryItem);

            IEnumerable <InventoryBasePriceInfo> BasePricesForSingleInventoryItem;

            BasePricesForSingleInventoryItem = CalculateBasePriceSchedules
                                               (
                InvPrices_TodaysPrices: InvPrices_TodaysPrices
                , Inventry_27s: invItems
                , Schedule_0: Schedule_0
                , Schedule_List: Schedule_List
                , Schedule_Cash: Schedule_Cash
                                               );

            return(BasePricesForSingleInventoryItem.First()); // first or default?
        }
        public static string Part_Fixed(this IInventry_27 inv)
        {
            string _part = inv.Part ?? string.Empty;

            return(_part.TrimEnd());
        }
 public static bool LoadFromReader(IInventry_27 inventry_27, OdbcDataReader reader)
 {
     return(inventry_27.LoadFromReader_Ext(reader));
 }
 public static int InventoryUnique(IInventry_27 record)
 {
     return(record.InvUnique);
 }
 public static string PartNumber(IInventry_27 record)
 {
     return(record.Part);
 }