Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOesignature(ref DataRow row, Oesignature entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("keytype", entity.keytype);
     row.SetField("keyvalue1", entity.keyvalue1);
     row.SetField("keyvalue2", entity.keyvalue2);
     row.SetField("chunk", entity.chunk);
     row.SetField("descrip", entity.descrip);
     row.SetField("image64", entity.image64);
     row.SetField("currproc", entity.currproc);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Oesignature BuildOesignatureFromRow(DataRow row)
        {
            Oesignature entity = new Oesignature();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.keytype   = row.IsNull("keytype") ? string.Empty : row.Field <string>("keytype");
            entity.keyvalue1 = row.IsNull("keyvalue1") ? string.Empty : row.Field <string>("keyvalue1");
            entity.keyvalue2 = row.IsNull("keyvalue2") ? string.Empty : row.Field <string>("keyvalue2");
            entity.chunk     = row.IsNull("chunk") ? 0 : row.Field <int>("chunk");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.image64   = row.IsNull("image64") ? string.Empty : row.Field <string>("image64");
            entity.currproc  = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }