Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeifsearchcriteria(ref DataRow row, Oeifsearchcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("tiedordno", entity.tiedordno);
     row.SetField("tiedordsuf", entity.tiedordsuf);
     row.SetField("releasefl", entity.releasefl);
     row.SetField("stgcd", entity.stgcd);
     row.SetField("billcd", entity.billcd);
     row.SetField("updatetype", entity.updatetype);
     row.SetField("updatevalue", entity.updatevalue);
     row.SetField("repricefl", entity.repricefl);
     row.SetField("nspricefl", entity.nspricefl);
     row.SetField("resetaddonfl", entity.resetaddonfl);
     row.SetField("recalccostfl", entity.recalccostfl);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Oeifsearchcriteria BuildOeifsearchcriteriaFromRow(DataRow row)
        {
            Oeifsearchcriteria entity = new Oeifsearchcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.tiedordno        = row.IsNull("tiedordno") ? 0 : row.Field <int>("tiedordno");
            entity.tiedordsuf       = row.IsNull("tiedordsuf") ? 0 : row.Field <int>("tiedordsuf");
            entity.releasefl        = row.Field <bool>("releasefl");
            entity.stgcd            = row.IsNull("stgcd") ? string.Empty : row.Field <string>("stgcd");
            entity.billcd           = row.IsNull("billcd") ? string.Empty : row.Field <string>("billcd");
            entity.updatetype       = row.IsNull("updatetype") ? string.Empty : row.Field <string>("updatetype");
            entity.updatevalue      = row.IsNull("updatevalue") ? string.Empty : row.Field <string>("updatevalue");
            entity.repricefl        = row.Field <bool>("repricefl");
            entity.nspricefl        = row.Field <bool>("nspricefl");
            entity.resetaddonfl     = row.Field <bool>("resetaddonfl");
            entity.recalccostfl     = row.Field <bool>("recalccostfl");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }