Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcseriallookupresults(ref DataRow row, Icseriallookupresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("serialno", entity.serialno);
     row.SetField("currstatus", entity.currstatus);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("reservefl", entity.reservefl);
     row.SetField("orderdata", entity.orderdata);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("rowid-icses", entity.rowidIcses.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Icseriallookupresults BuildIcseriallookupresultsFromRow(DataRow row)
        {
            Icseriallookupresults entity = new Icseriallookupresults();

            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.serialno   = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.currstatus = row.IsNull("currstatus") ? string.Empty : row.Field <string>("currstatus");
            entity.notesfl    = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.reservefl  = row.Field <bool>("reservefl");
            entity.orderdata  = row.IsNull("orderdata") ? string.Empty : row.Field <string>("orderdata");
            entity.ordertype  = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.orderno    = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf   = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.user1      = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2      = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3      = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4      = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5      = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6      = row.Field <decimal?>("user6");
            entity.user7      = row.Field <decimal?>("user7");
            entity.user8      = row.Field <DateTime?>("user8");
            entity.user9      = row.Field <DateTime?>("user9");
            entity.rowidIcses = row.Field <byte[]>("rowid-icses").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }