Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsprtaddchg(ref DataRow row, Icsprtaddchg entity)
 {
     row.SetField("updatetype", entity.updatetype);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("territorycd", entity.territorycd);
     row.SetField("seqno", entity.seqno);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("countrycd", entity.countrycd);
     row.SetField("custtype", entity.custtype);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("salesterr", entity.salesterr);
     row.SetField("certcode", entity.certcode);
     row.SetField("createdt", entity.createdt);
     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 Icsprtaddchg BuildIcsprtaddchgFromRow(DataRow row)
        {
            Icsprtaddchg entity = new Icsprtaddchg();

            entity.updatetype    = row.IsNull("updatetype") ? string.Empty : row.Field <string>("updatetype");
            entity.srcrowpointer = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.territorycd   = row.IsNull("territorycd") ? string.Empty : row.Field <string>("territorycd");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            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.countrycd     = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd");
            entity.custtype      = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.pricetype     = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.salesterr     = row.IsNull("salesterr") ? string.Empty : row.Field <string>("salesterr");
            entity.certcode      = row.IsNull("certcode") ? string.Empty : row.Field <string>("certcode");
            entity.createdt      = row.Field <DateTime?>("createdt");
            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);
        }