예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeheadercrrmpopup(ref DataRow row, Oeheadercrrmpopup entity)
 {
     row.SetField("transtype", entity.transtype);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("invno", entity.invno);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("custpo", entity.custpo);
     row.SetField("reason", entity.reason);
     row.SetField("autoapplycreditfl", entity.autoapplycreditfl);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Oeheadercrrmpopup BuildOeheadercrrmpopupFromRow(DataRow row)
        {
            Oeheadercrrmpopup entity = new Oeheadercrrmpopup();

            entity.transtype         = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.invno             = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invsuf            = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.custpo            = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.reason            = row.IsNull("reason") ? string.Empty : row.Field <string>("reason");
            entity.autoapplycreditfl = row.Field <bool>("autoapplycreditfl");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }