Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsebcomptopbanner(ref DataRow row, Icsebcomptopbanner entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("bundleid", entity.bundleid);
     row.SetField("actualqty", entity.actualqty);
     row.SetField("units", entity.units);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icsebcomptopbanner BuildIcsebcomptopbannerFromRow(DataRow row)
        {
            Icsebcomptopbanner entity = new Icsebcomptopbanner();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.bundleid  = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.actualqty = row.IsNull("actualqty") ? decimal.Zero : row.Field <decimal>("actualqty");
            entity.units     = row.IsNull("units") ? string.Empty : row.Field <string>("units");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }