コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCmprospectlookupresults(ref DataRow row, Cmprospectlookupresults entity)
 {
     row.SetField("prosno", entity.prosno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("name", entity.name);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("rowid-cmsp", entity.rowidCmsp.ToByteArray());
 }
コード例 #2
0
        public static Cmprospectlookupresults BuildCmprospectlookupresultsFromRow(DataRow row)
        {
            Cmprospectlookupresults entity = new Cmprospectlookupresults();

            entity.prosno    = row.IsNull("prosno") ? decimal.Zero : row.Field <decimal>("prosno");
            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.city      = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state     = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd     = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.rowidCmsp = row.Field <byte[]>("rowid-cmsp").ToStringEncoded();
            return(entity);
        }