Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsoesetupcriteria(ref DataRow row, Icsoesetupcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("state", entity.state);
     row.SetField("addonno", entity.addonno);
     row.SetField("prod", entity.prod);
     row.SetField("startdt", entity.startdt);
     row.SetField("enddt", entity.enddt);
     row.SetField("icsoerowid", entity.icsoerowid.ToByteArray());
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("arsrcrowpointer", entity.arsrcrowpointer);
     row.SetField("arscrowpointer", entity.arscrowpointer);
     row.SetField("arssrowpointer", entity.arssrowpointer);
     row.SetField("icsrcrowpointer", entity.icsrcrowpointer);
     row.SetField("icsprowpointer", entity.icsprowpointer);
     row.SetField("icscrowpointer", entity.icscrowpointer);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icsoesetupcriteria BuildIcsoesetupcriteriaFromRow(DataRow row)
        {
            Icsoesetupcriteria entity = new Icsoesetupcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.state            = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.addonno          = row.IsNull("addonno") ? 0 : row.Field <int>("addonno");
            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.startdt          = row.Field <DateTime?>("startdt");
            entity.enddt            = row.Field <DateTime?>("enddt");
            entity.icsoerowid       = row.Field <byte[]>("icsoerowid").ToStringEncoded();
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.arsrcrowpointer  = row.IsNull("arsrcrowpointer") ? string.Empty : row.Field <string>("arsrcrowpointer");
            entity.arscrowpointer   = row.IsNull("arscrowpointer") ? string.Empty : row.Field <string>("arscrowpointer");
            entity.arssrowpointer   = row.IsNull("arssrowpointer") ? string.Empty : row.Field <string>("arssrowpointer");
            entity.icsrcrowpointer  = row.IsNull("icsrcrowpointer") ? string.Empty : row.Field <string>("icsrcrowpointer");
            entity.icsprowpointer   = row.IsNull("icsprowpointer") ? string.Empty : row.Field <string>("icsprowpointer");
            entity.icscrowpointer   = row.IsNull("icscrowpointer") ? string.Empty : row.Field <string>("icscrowpointer");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }