Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinenonstockhdr(ref DataRow row, Oelinenonstockhdr entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("lineno", entity.lineno);
     row.SetField("nextlineno", entity.nextlineno);
     row.SetField("ourproc", entity.ourproc);
     row.SetField("whse", entity.whse);
     row.SetField("transtype", entity.transtype);
     row.SetField("maintmode", entity.maintmode);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("stordty", entity.stordty);
     row.SetField("bofl", entity.bofl);
     row.SetField("slsrepout", entity.slsrepout);
     row.SetField("altprodgrp", entity.altprodgrp);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Oelinenonstockhdr BuildOelinenonstockhdrFromRow(DataRow row)
        {
            Oelinenonstockhdr entity = new Oelinenonstockhdr();

            entity.orderno    = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf   = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.lineno     = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.nextlineno = row.IsNull("nextlineno") ? 0 : row.Field <int>("nextlineno");
            entity.ourproc    = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.transtype  = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.maintmode  = row.IsNull("maintmode") ? string.Empty : row.Field <string>("maintmode");
            entity.orderdisp  = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.stordty    = row.Field <bool>("stordty");
            entity.bofl       = row.Field <bool>("bofl");
            entity.slsrepout  = row.IsNull("slsrepout") ? string.Empty : row.Field <string>("slsrepout");
            entity.altprodgrp = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }