Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamumanprodlistsingle(ref DataRow row, Icamumanprodlistsingle entity)
 {
     row.SetField("fromwhse", entity.fromwhse);
     row.SetField("fromwhsename", entity.fromwhsename);
     row.SetField("towhse", entity.towhse);
     row.SetField("towhsename", entity.towhsename);
     row.SetField("fromprod", entity.fromprod);
     row.SetField("fromdescription", entity.fromdescription);
     row.SetField("fromprodnotesfl", entity.fromprodnotesfl);
     row.SetField("toprod", entity.toprod);
     row.SetField("todescription", entity.todescription);
     row.SetField("toprodnotesfl", entity.toprodnotesfl);
     row.SetField("fmacquiredt", entity.fmacquiredt);
     row.SetField("toacquiredt", entity.toacquiredt);
     row.SetField("vendorno", entity.vendorno);
     row.SetField("vendorname", entity.vendorname);
     row.SetField("vendornotesfl", entity.vendornotesfl);
     row.SetField("prodline", entity.prodline);
     row.SetField("productlinedesc", entity.productlinedesc);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("category", entity.category);
     row.SetField("prodcatdesc", entity.prodcatdesc);
     row.SetField("slgroup", entity.slgroup);
     row.SetField("stndpack", entity.stndpack);
     row.SetField("stndunitdesc", entity.stndunitdesc);
     row.SetField("frozendate", entity.frozendate);
     row.SetField("rebatetype", entity.rebatetype);
     row.SetField("rebatetydesc", entity.rebatetydesc);
     row.SetField("rebsubtype", entity.rebsubtype);
     row.SetField("rebsubtydesc", entity.rebsubtydesc);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("paramdata", entity.paramdata);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icamumanprodlistsingle BuildIcamumanprodlistsingleFromRow(DataRow row)
        {
            Icamumanprodlistsingle entity = new Icamumanprodlistsingle();

            entity.fromwhse        = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse");
            entity.fromwhsename    = row.IsNull("fromwhsename") ? string.Empty : row.Field <string>("fromwhsename");
            entity.towhse          = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse");
            entity.towhsename      = row.IsNull("towhsename") ? string.Empty : row.Field <string>("towhsename");
            entity.fromprod        = row.IsNull("fromprod") ? string.Empty : row.Field <string>("fromprod");
            entity.fromdescription = row.IsNull("fromdescription") ? string.Empty : row.Field <string>("fromdescription");
            entity.fromprodnotesfl = row.IsNull("fromprodnotesfl") ? string.Empty : row.Field <string>("fromprodnotesfl");
            entity.toprod          = row.IsNull("toprod") ? string.Empty : row.Field <string>("toprod");
            entity.todescription   = row.IsNull("todescription") ? string.Empty : row.Field <string>("todescription");
            entity.toprodnotesfl   = row.IsNull("toprodnotesfl") ? string.Empty : row.Field <string>("toprodnotesfl");
            entity.fmacquiredt     = row.Field <DateTime?>("fmacquiredt");
            entity.toacquiredt     = row.Field <DateTime?>("toacquiredt");
            entity.vendorno        = row.IsNull("vendorno") ? decimal.Zero : row.Field <decimal>("vendorno");
            entity.vendorname      = row.IsNull("vendorname") ? string.Empty : row.Field <string>("vendorname");
            entity.vendornotesfl   = row.IsNull("vendornotesfl") ? string.Empty : row.Field <string>("vendornotesfl");
            entity.prodline        = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.productlinedesc = row.IsNull("productlinedesc") ? string.Empty : row.Field <string>("productlinedesc");
            entity.pricetype       = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricetypedesc   = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.category        = row.IsNull("category") ? string.Empty : row.Field <string>("category");
            entity.prodcatdesc     = row.IsNull("prodcatdesc") ? string.Empty : row.Field <string>("prodcatdesc");
            entity.slgroup         = row.IsNull("slgroup") ? string.Empty : row.Field <string>("slgroup");
            entity.stndpack        = row.IsNull("stndpack") ? string.Empty : row.Field <string>("stndpack");
            entity.stndunitdesc    = row.IsNull("stndunitdesc") ? string.Empty : row.Field <string>("stndunitdesc");
            entity.frozendate      = row.IsNull("frozendate") ? string.Empty : row.Field <string>("frozendate");
            entity.rebatetype      = row.IsNull("rebatetype") ? string.Empty : row.Field <string>("rebatetype");
            entity.rebatetydesc    = row.IsNull("rebatetydesc") ? string.Empty : row.Field <string>("rebatetydesc");
            entity.rebsubtype      = row.IsNull("rebsubtype") ? string.Empty : row.Field <string>("rebsubtype");
            entity.rebsubtydesc    = row.IsNull("rebsubtydesc") ? string.Empty : row.Field <string>("rebsubtydesc");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.paramdata       = row.IsNull("paramdata") ? string.Empty : row.Field <string>("paramdata");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }