Пример #1
0
        public static Icictransactionlist BuildIcictransactionlistFromRow(DataRow row)
        {
            Icictransactionlist entity = new Icictransactionlist();

            entity.transty          = row.IsNull("transty") ? string.Empty : row.Field <string>("transty");
            entity.dspltransty      = row.IsNull("dspltransty") ? string.Empty : row.Field <string>("dspltransty");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernotesfl     = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.lineno           = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno            = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.implylineno      = row.IsNull("implylineno") ? 0 : row.Field <int>("implylineno");
            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl      = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.implyprod        = row.IsNull("implyprod") ? string.Empty : row.Field <string>("implyprod");
            entity.implyprodnotesfl = row.IsNull("implyprodnotesfl") ? string.Empty : row.Field <string>("implyprodnotesfl");
            entity.qty             = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.qtyalloc        = row.IsNull("qtyalloc") ? decimal.Zero : row.Field <decimal>("qtyalloc");
            entity.qtywarr         = row.IsNull("qtywarr") ? decimal.Zero : row.Field <decimal>("qtywarr");
            entity.expiredt        = row.Field <DateTime?>("expiredt");
            entity.intclaimno      = row.IsNull("intclaimno") ? 0 : row.Field <int>("intclaimno");
            entity.claimpdfl       = row.Field <bool>("claimpdfl");
            entity.claimpddt       = row.Field <DateTime?>("claimpddt");
            entity.repairordno     = row.IsNull("repairordno") ? 0 : row.Field <int>("repairordno");
            entity.repairordsuf    = row.IsNull("repairordsuf") ? 0 : row.Field <int>("repairordsuf");
            entity.repairnotesfl   = row.IsNull("repairnotesfl") ? string.Empty : row.Field <string>("repairnotesfl");
            entity.repairlineno    = row.IsNull("repairlineno") ? 0 : row.Field <int>("repairlineno");
            entity.retorderno      = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordersuf     = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.retordernotesfl = row.IsNull("retordernotesfl") ? string.Empty : row.Field <string>("retordernotesfl");
            entity.retlineno       = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.snreturn        = row.IsNull("snreturn") ? string.Empty : row.Field <string>("snreturn");
            entity.snsold          = row.IsNull("snsold") ? string.Empty : row.Field <string>("snsold");
            entity.subfl           = row.Field <bool>("subfl");
            entity.vendno          = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl     = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.warrchfl        = row.Field <bool>("warrchfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.compseqno       = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.manadjfl        = row.Field <bool>("manadjfl");
            entity.mandt           = row.Field <DateTime?>("mandt");
            entity.manoper         = row.IsNull("manoper") ? string.Empty : row.Field <string>("manoper");
            entity.mantm           = row.IsNull("mantm") ? string.Empty : row.Field <string>("mantm");
            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 UpdateRowFromIcictransactionlist(ref DataRow row, Icictransactionlist entity)
 {
     row.SetField("transty", entity.transty);
     row.SetField("dspltransty", entity.dspltransty);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("implylineno", entity.implylineno);
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("implyprod", entity.implyprod);
     row.SetField("implyprodnotesfl", entity.implyprodnotesfl);
     row.SetField("qty", entity.qty);
     row.SetField("qtyalloc", entity.qtyalloc);
     row.SetField("qtywarr", entity.qtywarr);
     row.SetField("expiredt", entity.expiredt);
     row.SetField("intclaimno", entity.intclaimno);
     row.SetField("claimpdfl", entity.claimpdfl);
     row.SetField("claimpddt", entity.claimpddt);
     row.SetField("repairordno", entity.repairordno);
     row.SetField("repairordsuf", entity.repairordsuf);
     row.SetField("repairnotesfl", entity.repairnotesfl);
     row.SetField("repairlineno", entity.repairlineno);
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retordernotesfl", entity.retordernotesfl);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("snreturn", entity.snreturn);
     row.SetField("snsold", entity.snsold);
     row.SetField("subfl", entity.subfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("warrchfl", entity.warrchfl);
     row.SetField("whse", entity.whse);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("manadjfl", entity.manadjfl);
     row.SetField("mandt", entity.mandt);
     row.SetField("manoper", entity.manoper);
     row.SetField("mantm", entity.mantm);
     row.SetField("userfield", entity.userfield);
 }