Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsecoppositecreate(ref DataRow row, Icsecoppositecreate entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("altprod", entity.altprod);
     row.SetField("rectype", entity.rectype);
     row.SetField("createsubstitute", entity.createsubstitute);
     row.SetField("createsupersede", entity.createsupersede);
     row.SetField("createbarcode", entity.createbarcode);
     row.SetField("createinterchange", entity.createinterchange);
     row.SetField("createcustomerproduct", entity.createcustomerproduct);
     row.SetField("createoption", entity.createoption);
     row.SetField("createupgrade", entity.createupgrade);
     row.SetField("createicsldefault", entity.createicsldefault);
     row.SetField("sellfirsttype", entity.sellfirsttype);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icsecoppositecreate BuildIcsecoppositecreateFromRow(DataRow row)
        {
            Icsecoppositecreate entity = new Icsecoppositecreate();

            entity.prod                  = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.altprod               = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.rectype               = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.createsubstitute      = row.Field <bool>("createsubstitute");
            entity.createsupersede       = row.Field <bool>("createsupersede");
            entity.createbarcode         = row.Field <bool>("createbarcode");
            entity.createinterchange     = row.Field <bool>("createinterchange");
            entity.createcustomerproduct = row.Field <bool>("createcustomerproduct");
            entity.createoption          = row.Field <bool>("createoption");
            entity.createupgrade         = row.Field <bool>("createupgrade");
            entity.createicsldefault     = row.Field <bool>("createicsldefault");
            entity.sellfirsttype         = row.IsNull("sellfirsttype") ? string.Empty : row.Field <string>("sellfirsttype");
            entity.userfield             = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }