Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceanmaintupdateoperation(ref DataRow row, Iceanmaintupdateoperation entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("operation", entity.operation);
     row.SetField("typecd", entity.typecd);
     row.SetField("whse", entity.whse);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("total", entity.total);
     row.SetField("binloc", entity.binloc);
     row.SetField("closefl", entity.closefl);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("invprod", entity.invprod);
     row.SetField("invprodcat", entity.invprodcat);
     row.SetField("invdescrip1", entity.invdescrip1);
     row.SetField("invdescrip2", entity.invdescrip2);
     row.SetField("invextdescrip", entity.invextdescrip);
     row.SetField("invstatus", entity.invstatus);
     row.SetField("invvendno", entity.invvendno);
     row.SetField("invprodline", entity.invprodline);
     row.SetField("invacquiredt", entity.invacquiredt);
     row.SetField("invncnr", entity.invncnr);
     row.SetField("inveccnclasscd", entity.inveccnclasscd);
     row.SetField("invupdatecost", entity.invupdatecost);
     row.SetField("invupdatenewlastcost", entity.invupdatenewlastcost);
     row.SetField("invupdatebinloc", entity.invupdatebinloc);
     row.SetField("invcountryoforigin", entity.invcountryoforigin);
     row.SetField("invtariffcd", entity.invtariffcd);
     row.SetField("invaltprodgrp", entity.invaltprodgrp);
     row.SetField("restrictovrfl", entity.restrictovrfl);
     row.SetField("restricterrmess", entity.restricterrmess);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Iceanmaintupdateoperation BuildIceanmaintupdateoperationFromRow(DataRow row)
        {
            Iceanmaintupdateoperation entity = new Iceanmaintupdateoperation();

            entity.jrnlno               = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.operation            = row.IsNull("operation") ? string.Empty : row.Field <string>("operation");
            entity.typecd               = row.IsNull("typecd") ? string.Empty : row.Field <string>("typecd");
            entity.whse                 = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qty                  = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit                 = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.total                = row.IsNull("total") ? decimal.Zero : row.Field <decimal>("total");
            entity.binloc               = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.closefl              = row.Field <bool>("closefl");
            entity.vendno               = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodline             = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.invprod              = row.IsNull("invprod") ? string.Empty : row.Field <string>("invprod");
            entity.invprodcat           = row.IsNull("invprodcat") ? string.Empty : row.Field <string>("invprodcat");
            entity.invdescrip1          = row.IsNull("invdescrip1") ? string.Empty : row.Field <string>("invdescrip1");
            entity.invdescrip2          = row.IsNull("invdescrip2") ? string.Empty : row.Field <string>("invdescrip2");
            entity.invextdescrip        = row.IsNull("invextdescrip") ? string.Empty : row.Field <string>("invextdescrip");
            entity.invstatus            = row.IsNull("invstatus") ? string.Empty : row.Field <string>("invstatus");
            entity.invvendno            = row.IsNull("invvendno") ? decimal.Zero : row.Field <decimal>("invvendno");
            entity.invprodline          = row.IsNull("invprodline") ? string.Empty : row.Field <string>("invprodline");
            entity.invacquiredt         = row.Field <DateTime?>("invacquiredt");
            entity.invncnr              = row.IsNull("invncnr") ? string.Empty : row.Field <string>("invncnr");
            entity.inveccnclasscd       = row.IsNull("inveccnclasscd") ? string.Empty : row.Field <string>("inveccnclasscd");
            entity.invupdatecost        = row.Field <bool>("invupdatecost");
            entity.invupdatenewlastcost = row.IsNull("invupdatenewlastcost") ? decimal.Zero : row.Field <decimal>("invupdatenewlastcost");
            entity.invupdatebinloc      = row.Field <bool>("invupdatebinloc");
            entity.invcountryoforigin   = row.IsNull("invcountryoforigin") ? string.Empty : row.Field <string>("invcountryoforigin");
            entity.invtariffcd          = row.IsNull("invtariffcd") ? string.Empty : row.Field <string>("invtariffcd");
            entity.invaltprodgrp        = row.IsNull("invaltprodgrp") ? string.Empty : row.Field <string>("invaltprodgrp");
            entity.restrictovrfl        = row.Field <bool>("restrictovrfl");
            entity.restricterrmess      = row.IsNull("restricterrmess") ? string.Empty : row.Field <string>("restricterrmess");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }