Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcwhseproductcopyflags(ref DataRow row, Icwhseproductcopyflags entity)
 {
     row.SetField("copycost", entity.copycost);
     row.SetField("copybin", entity.copybin);
     row.SetField("useicsl", entity.useicsl);
     row.SetField("arpwhse", entity.arpwhse);
     row.SetField("icslsecurity", entity.icslsecurity);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Icwhseproductcopyflags BuildIcwhseproductcopyflagsFromRow(DataRow row)
        {
            Icwhseproductcopyflags entity = new Icwhseproductcopyflags();

            entity.copycost     = row.Field <bool>("copycost");
            entity.copybin      = row.Field <bool>("copybin");
            entity.useicsl      = row.Field <bool>("useicsl");
            entity.arpwhse      = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse");
            entity.icslsecurity = row.IsNull("icslsecurity") ? 0 : row.Field <int>("icslsecurity");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }