Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKitsplitinitialize(ref DataRow row, Kitsplitinitialize entity)
 {
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("kitsplitamt", entity.kitsplitamt);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("price", entity.price);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Kitsplitinitialize BuildKitsplitinitializeFromRow(DataRow row)
        {
            Kitsplitinitialize entity = new Kitsplitinitialize();

            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.kitsplitamt = row.IsNull("kitsplitamt") ? decimal.Zero : row.Field <decimal>("kitsplitamt");
            entity.unitconv    = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.specnstype  = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.speccostty  = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.csunperstk  = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.price       = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }