示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArcustomerlookupresults(ref DataRow row, Arcustomerlookupresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("name", entity.name);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("state", entity.state);
     row.SetField("city", entity.city);
     row.SetField("statustype", entity.statustype);
     row.SetField("lookupnm", entity.lookupnm);
     row.SetField("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("comment", entity.comment);
     row.SetField("groupid", entity.groupid);
     row.SetField("createdby", entity.createdby);
     row.SetField("createddt", entity.createddt);
     row.SetField("createdproc", entity.createdproc);
     row.SetField("createdtm", entity.createdtm);
     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-arsc", entity.rowidArsc.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Arcustomerlookupresults BuildArcustomerlookupresultsFromRow(DataRow row)
        {
            Arcustomerlookupresults entity = new Arcustomerlookupresults();

            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.phoneno     = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno");
            entity.zipcd       = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.state       = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.city        = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.statustype  = row.Field <bool>("statustype");
            entity.lookupnm    = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm");
            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.comment     = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.groupid     = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.createdby   = row.IsNull("createdby") ? string.Empty : row.Field <string>("createdby");
            entity.createddt   = row.Field <DateTime?>("createddt");
            entity.createdproc = row.IsNull("createdproc") ? string.Empty : row.Field <string>("createdproc");
            entity.createdtm   = row.IsNull("createdtm") ? string.Empty : row.Field <string>("createdtm");
            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.rowidArsc   = row.Field <byte[]>("rowid-arsc").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }