Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcspcresults(ref DataRow row, Icspcresults entity)
 {
     row.SetField("setuptype", entity.setuptype);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptogrp", entity.shiptogrp);
     row.SetField("whse", entity.whse);
     row.SetField("startdt", entity.startdt);
     row.SetField("expiredt", entity.expiredt);
     row.SetField("activefl", entity.activefl);
     row.SetField("refer", entity.refer);
     row.SetField("contractno", entity.contractno);
     row.SetField("fillpriority", entity.fillpriority);
     row.SetField("createdt", entity.createdt);
     row.SetField("cono", entity.cono);
     row.SetField("recordtype", entity.recordtype);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("icspc-rowpointer", entity.icspcRowpointer);
     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("userfield", entity.userfield);
 }
Exemple #2
0
        public static Icspcresults BuildIcspcresultsFromRow(DataRow row)
        {
            Icspcresults entity = new Icspcresults();

            entity.setuptype       = row.IsNull("setuptype") ? string.Empty : row.Field <string>("setuptype");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptogrp       = row.IsNull("shiptogrp") ? string.Empty : row.Field <string>("shiptogrp");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.startdt         = row.Field <DateTime?>("startdt");
            entity.expiredt        = row.Field <DateTime?>("expiredt");
            entity.activefl        = row.Field <bool>("activefl");
            entity.refer           = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.contractno      = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.fillpriority    = row.IsNull("fillpriority") ? 0 : row.Field <int>("fillpriority");
            entity.createdt        = row.Field <DateTime?>("createdt");
            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.recordtype      = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.srcrowpointer   = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.icspcRowpointer = row.IsNull("icspc-rowpointer") ? string.Empty : row.Field <string>("icspc-rowpointer");
            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.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }