Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOesfaddchg(ref DataRow row, Oesfaddchg entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("updatetype", entity.updatetype);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("billingcd", entity.billingcd);
     row.SetField("autosubmitcd", entity.autosubmitcd);
     row.SetField("oesfcexistfl", entity.oesfcexistfl);
     row.SetField("setlistrules", entity.setlistrules);
     row.SetField("clearlistrules", entity.clearlistrules);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("mainwhse", entity.mainwhse);
     row.SetField("whselistty", entity.whselistty);
     row.SetField("whselistpointer", entity.whselistpointer);
     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);
 }
Esempio n. 2
0
        public static Oesfaddchg BuildOesfaddchgFromRow(DataRow row)
        {
            Oesfaddchg entity = new Oesfaddchg();

            entity.recordtype      = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.updatetype      = row.IsNull("updatetype") ? string.Empty : row.Field <string>("updatetype");
            entity.srcrowpointer   = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.billingcd       = row.IsNull("billingcd") ? string.Empty : row.Field <string>("billingcd");
            entity.autosubmitcd    = row.IsNull("autosubmitcd") ? string.Empty : row.Field <string>("autosubmitcd");
            entity.oesfcexistfl    = row.Field <bool>("oesfcexistfl");
            entity.setlistrules    = row.Field <bool>("setlistrules");
            entity.clearlistrules  = row.Field <bool>("clearlistrules");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.mainwhse        = row.IsNull("mainwhse") ? string.Empty : row.Field <string>("mainwhse");
            entity.whselistty      = row.IsNull("whselistty") ? string.Empty : row.Field <string>("whselistty");
            entity.whselistpointer = row.IsNull("whselistpointer") ? string.Empty : row.Field <string>("whselistpointer");
            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);
        }