Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepequickcntentry(ref DataRow row, Icepequickcntentry entity)
 {
     row.SetField("binloc", entity.binloc);
     row.SetField("cntoper", entity.cntoper);
     row.SetField("createfl", entity.createfl);
     row.SetField("entfl", entity.entfl);
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("qtycnt", entity.qtycnt);
     row.SetField("qtyexp", entity.qtyexp);
     row.SetField("rectype", entity.rectype);
     row.SetField("runno", entity.runno);
     row.SetField("ticketno", entity.ticketno);
     row.SetField("unit", entity.unit);
     row.SetField("uticketno", entity.uticketno);
     row.SetField("whse", entity.whse);
     row.SetField("wmfl", entity.wmfl);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icepequickcntentry BuildIcepequickcntentryFromRow(DataRow row)
        {
            Icepequickcntentry entity = new Icepequickcntentry();

            entity.binloc    = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.cntoper   = row.IsNull("cntoper") ? string.Empty : row.Field <string>("cntoper");
            entity.createfl  = row.Field <bool>("createfl");
            entity.entfl     = row.Field <bool>("entfl");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.qtycnt    = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt");
            entity.qtyexp    = row.IsNull("qtyexp") ? decimal.Zero : row.Field <decimal>("qtyexp");
            entity.rectype   = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.runno     = row.IsNull("runno") ? 0 : row.Field <int>("runno");
            entity.ticketno  = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.uticketno = row.IsNull("uticketno") ? 0 : row.Field <int>("uticketno");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.wmfl      = row.Field <bool>("wmfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }