Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromContactssearchcriteria(ref DataRow row, Contactssearchcriteria entity)
 {
     row.SetField("contactid", entity.contactid);
     row.SetField("subjectroletype", entity.subjectroletype);
     row.SetField("subjectprimarykey", entity.subjectprimarykey);
     row.SetField("subjectsecondarykey", entity.subjectsecondarykey);
     row.SetField("firstnm", entity.firstnm);
     row.SetField("lastnm", entity.lastnm);
     row.SetField("contacttype", entity.contacttype);
     row.SetField("priority", entity.priority);
     row.SetField("sort", entity.sort);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("extractnotesfl", entity.extractnotesfl);
     row.SetField("delim", entity.delim);
 }
Пример #2
0
        public static Contactssearchcriteria BuildContactssearchcriteriaFromRow(DataRow row)
        {
            Contactssearchcriteria entity = new Contactssearchcriteria();

            entity.contactid           = row.IsNull("contactid") ? decimal.Zero : row.Field <decimal>("contactid");
            entity.subjectroletype     = row.IsNull("subjectroletype") ? string.Empty : row.Field <string>("subjectroletype");
            entity.subjectprimarykey   = row.IsNull("subjectprimarykey") ? string.Empty : row.Field <string>("subjectprimarykey");
            entity.subjectsecondarykey = row.IsNull("subjectsecondarykey") ? string.Empty : row.Field <string>("subjectsecondarykey");
            entity.firstnm             = row.IsNull("firstnm") ? string.Empty : row.Field <string>("firstnm");
            entity.lastnm         = row.IsNull("lastnm") ? string.Empty : row.Field <string>("lastnm");
            entity.contacttype    = row.IsNull("contacttype") ? string.Empty : row.Field <string>("contacttype");
            entity.priority       = row.IsNull("priority") ? 0 : row.Field <int>("priority");
            entity.sort           = row.IsNull("sort") ? string.Empty : row.Field <string>("sort");
            entity.recordlimit    = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.extractnotesfl = row.Field <bool>("extractnotesfl");
            entity.delim          = row.IsNull("delim") ? string.Empty : row.Field <string>("delim");
            return(entity);
        }