Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceamresults(ref DataRow row, Iceamresults entity)
 {
     row.SetField("transty", entity.transty);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("coreprod", entity.coreprod);
     row.SetField("custno", entity.custno);
     row.SetField("implyprod", entity.implyprod);
     row.SetField("origprod", entity.origprod);
     row.SetField("qty", entity.qty);
     row.SetField("qtyalloc", entity.qtyalloc);
     row.SetField("qtybank", entity.qtybank);
     row.SetField("qtywarr", entity.qtywarr);
     row.SetField("statusfl", entity.statusfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("manadjfl", entity.manadjfl);
     row.SetField("manoper", entity.manoper);
     row.SetField("mandt", entity.mandt);
     row.SetField("mantm", entity.mantm);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("orderrowid", entity.orderrowid.ToByteArray());
     row.SetField("arscnotesfl", entity.arscnotesfl);
     row.SetField("arscrowid", entity.arscrowid.ToByteArray());
     row.SetField("apsvnotesfl", entity.apsvnotesfl);
     row.SetField("apsvrowid", entity.apsvrowid.ToByteArray());
     row.SetField("icspnotesfl", entity.icspnotesfl);
     row.SetField("icsprowid", entity.icsprowid.ToByteArray());
     row.SetField("iceam-recid", entity.iceamRecid);
     row.SetField("returncd", entity.returncd);
     row.SetField("iceamrowid", entity.iceamrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Iceamresults BuildIceamresultsFromRow(DataRow row)
        {
            Iceamresults entity = new Iceamresults();

            entity.transty      = row.IsNull("transty") ? string.Empty : row.Field <string>("transty");
            entity.orderno      = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf     = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno       = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno        = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.coreprod     = row.IsNull("coreprod") ? string.Empty : row.Field <string>("coreprod");
            entity.custno       = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.implyprod    = row.IsNull("implyprod") ? string.Empty : row.Field <string>("implyprod");
            entity.origprod     = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod");
            entity.qty          = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.qtyalloc     = row.IsNull("qtyalloc") ? decimal.Zero : row.Field <decimal>("qtyalloc");
            entity.qtybank      = row.IsNull("qtybank") ? decimal.Zero : row.Field <decimal>("qtybank");
            entity.qtywarr      = row.IsNull("qtywarr") ? decimal.Zero : row.Field <decimal>("qtywarr");
            entity.statusfl     = row.Field <bool>("statusfl");
            entity.vendno       = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.manadjfl     = row.Field <bool>("manadjfl");
            entity.manoper      = row.IsNull("manoper") ? string.Empty : row.Field <string>("manoper");
            entity.mandt        = row.Field <DateTime?>("mandt");
            entity.mantm        = row.IsNull("mantm") ? string.Empty : row.Field <string>("mantm");
            entity.ordernotesfl = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.orderrowid   = row.Field <byte[]>("orderrowid").ToStringEncoded();
            entity.arscnotesfl  = row.IsNull("arscnotesfl") ? string.Empty : row.Field <string>("arscnotesfl");
            entity.arscrowid    = row.Field <byte[]>("arscrowid").ToStringEncoded();
            entity.apsvnotesfl  = row.IsNull("apsvnotesfl") ? string.Empty : row.Field <string>("apsvnotesfl");
            entity.apsvrowid    = row.Field <byte[]>("apsvrowid").ToStringEncoded();
            entity.icspnotesfl  = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl");
            entity.icsprowid    = row.Field <byte[]>("icsprowid").ToStringEncoded();
            entity.iceamRecid   = row.IsNull("iceam-recid") ? 0 : row.Field <long>("iceam-recid");
            entity.returncd     = row.IsNull("returncd") ? string.Empty : row.Field <string>("returncd");
            entity.iceamrowid   = row.Field <byte[]>("iceamrowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }