示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWarehouselookupresults(ref DataRow row, Warehouselookupresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("name", entity.name);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("icsd-rowid", entity.icsdRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Warehouselookupresults BuildWarehouselookupresultsFromRow(DataRow row)
        {
            Warehouselookupresults entity = new Warehouselookupresults();

            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.name      = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.phoneno   = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno");
            entity.city      = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state     = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.addr1     = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.addr2     = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.addr3     = row.IsNull("addr3") ? string.Empty : row.Field <string>("addr3");
            entity.zipcd     = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.icsdRowid = row.Field <byte[]>("icsd-rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }