Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeorderlookupcriteria(ref DataRow row, Oeorderlookupcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("transtype", entity.transtype);
     row.SetField("stage", entity.stage);
     row.SetField("openonly", entity.openonly);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("customfield", entity.customfield);
 }
Beispiel #2
0
        public static Oeorderlookupcriteria BuildOeorderlookupcriteriaFromRow(DataRow row)
        {
            Oeorderlookupcriteria entity = new Oeorderlookupcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.transtype        = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stage            = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.openonly         = row.Field <bool>("openonly");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.customfield      = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield");
            return(entity);
        }