Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsewloadttresults(ref DataRow row, Icsewloadttresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("whsename", entity.whsename);
     row.SetField("whse2", entity.whse2);
     row.SetField("whsename2", entity.whsename2);
     row.SetField("icsewrowid", entity.icsewrowid.ToByteArray());
     row.SetField("comment", entity.comment);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icsewloadttresults BuildIcsewloadttresultsFromRow(DataRow row)
        {
            Icsewloadttresults entity = new Icsewloadttresults();

            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.whsename   = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename");
            entity.whse2      = row.IsNull("whse2") ? string.Empty : row.Field <string>("whse2");
            entity.whsename2  = row.IsNull("whsename2") ? string.Empty : row.Field <string>("whsename2");
            entity.icsewrowid = row.Field <byte[]>("icsewrowid").ToStringEncoded();
            entity.comment    = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }