Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeifsearchresults(ref DataRow row, Oeifsearchresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("fulfillmentstgcd", entity.fulfillmentstgcd);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("custno", entity.custno);
     row.SetField("custnonm", entity.custnonm);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonm", entity.shiptonm);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("fulfillmentbillcd", entity.fulfillmentbillcd);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totqtyship", entity.totqtyship);
     row.SetField("qtypercent", entity.qtypercent);
     row.SetField("totinvord", entity.totinvord);
     row.SetField("totinvship", entity.totinvship);
     row.SetField("invpercent", entity.invpercent);
     row.SetField("releasefl", entity.releasefl);
     row.SetField("consolorderno", entity.consolorderno);
     row.SetField("whse", entity.whse);
     row.SetField("oeehrowid", entity.oeehrowid.ToByteArray());
     row.SetField("errormsg", entity.errormsg);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Oeifsearchresults BuildOeifsearchresultsFromRow(DataRow row)
        {
            Oeifsearchresults entity = new Oeifsearchresults();

            entity.orderno           = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf          = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.fulfillmentstgcd  = row.IsNull("fulfillmentstgcd") ? string.Empty : row.Field <string>("fulfillmentstgcd");
            entity.stagecd           = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnonm          = row.IsNull("custnonm") ? string.Empty : row.Field <string>("custnonm");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonm          = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm");
            entity.reqshipdt         = row.Field <DateTime?>("reqshipdt");
            entity.promisedt         = row.Field <DateTime?>("promisedt");
            entity.fulfillmentbillcd = row.IsNull("fulfillmentbillcd") ? string.Empty : row.Field <string>("fulfillmentbillcd");
            entity.totqtyord         = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totqtyship        = row.IsNull("totqtyship") ? decimal.Zero : row.Field <decimal>("totqtyship");
            entity.qtypercent        = row.IsNull("qtypercent") ? decimal.Zero : row.Field <decimal>("qtypercent");
            entity.totinvord         = row.IsNull("totinvord") ? decimal.Zero : row.Field <decimal>("totinvord");
            entity.totinvship        = row.IsNull("totinvship") ? decimal.Zero : row.Field <decimal>("totinvship");
            entity.invpercent        = row.IsNull("invpercent") ? decimal.Zero : row.Field <decimal>("invpercent");
            entity.releasefl         = row.Field <bool>("releasefl");
            entity.consolorderno     = row.IsNull("consolorderno") ? 0 : row.Field <int>("consolorderno");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.oeehrowid = row.Field <byte[]>("oeehrowid").ToStringEncoded();
            entity.errormsg  = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }