Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsoclevelcds(ref DataRow row, Icsoclevelcds entity)
 {
     row.SetField("levelcd", entity.levelcd);
     row.SetField("levelcddesc", entity.levelcddesc);
     row.SetField("custnoenable", entity.custnoenable);
     row.SetField("custtypeenable", entity.custtypeenable);
     row.SetField("pricetypeenable", entity.pricetypeenable);
     row.SetField("shiptoenable", entity.shiptoenable);
     row.SetField("whseenable", entity.whseenable);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Icsoclevelcds BuildIcsoclevelcdsFromRow(DataRow row)
        {
            Icsoclevelcds entity = new Icsoclevelcds();

            entity.levelcd         = row.IsNull("levelcd") ? 0 : row.Field <int>("levelcd");
            entity.levelcddesc     = row.IsNull("levelcddesc") ? string.Empty : row.Field <string>("levelcddesc");
            entity.custnoenable    = row.Field <bool>("custnoenable");
            entity.custtypeenable  = row.Field <bool>("custtypeenable");
            entity.pricetypeenable = row.Field <bool>("pricetypeenable");
            entity.shiptoenable    = row.Field <bool>("shiptoenable");
            entity.whseenable      = row.Field <bool>("whseenable");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }