コード例 #1
0
        public static Icepeloadresults BuildIcepeloadresultsFromRow(DataRow row)
        {
            Icepeloadresults entity = new Icepeloadresults();

            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.runno            = row.IsNull("runno") ? 0 : row.Field <int>("runno");
            entity.ticketno         = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno");
            entity.displayty        = row.IsNull("displayty") ? string.Empty : row.Field <string>("displayty");
            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc         = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.prodnotesfl      = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.binloc           = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.entfl            = row.Field <bool>("entfl");
            entity.unit             = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.uticketno        = row.IsNull("uticketno") ? 0 : row.Field <int>("uticketno");
            entity.uticketnoenabled = row.Field <bool>("uticketnoenabled");
            entity.serlotty         = row.IsNull("serlotty") ? string.Empty : row.Field <string>("serlotty");
            entity.rectype          = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.qtyexp           = row.IsNull("qtyexp") ? string.Empty : row.Field <string>("qtyexp");
            entity.qtycnt           = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt");
            entity.brandcode        = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod          = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.vendprod         = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.icsetrowid       = row.Field <byte[]>("icsetrowid").ToStringEncoded();
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
コード例 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepeloadresults(ref DataRow row, Icepeloadresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("runno", entity.runno);
     row.SetField("ticketno", entity.ticketno);
     row.SetField("displayty", entity.displayty);
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("binloc", entity.binloc);
     row.SetField("entfl", entity.entfl);
     row.SetField("unit", entity.unit);
     row.SetField("uticketno", entity.uticketno);
     row.SetField("uticketnoenabled", entity.uticketnoenabled);
     row.SetField("serlotty", entity.serlotty);
     row.SetField("rectype", entity.rectype);
     row.SetField("qtyexp", entity.qtyexp);
     row.SetField("qtycnt", entity.qtycnt);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("icsetrowid", entity.icsetrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }