コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceaadetail(ref DataRow row, Iceaadetail entity)
 {
     row.SetField("transty", entity.transty);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("prod", entity.prod);
     row.SetField("qty", entity.qty);
     row.SetField("subfl", entity.subfl);
     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("retordernotesfl", entity.retordernotesfl);
     row.SetField("retorderrowid", entity.retorderrowid.ToByteArray());
     row.SetField("icspnotesfl", entity.icspnotesfl);
     row.SetField("icsprowid", entity.icsprowid.ToByteArray());
     row.SetField("iceaarowid", entity.iceaarowid.ToByteArray());
     row.SetField("coreprod", entity.coreprod);
     row.SetField("coredesc", entity.coredesc);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Iceaadetail BuildIceaadetailFromRow(DataRow row)
        {
            Iceaadetail entity = new Iceaadetail();

            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.retorderno      = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordersuf     = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.retlineno       = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.qty             = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.subfl           = row.Field <bool>("subfl");
            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.retordernotesfl = row.IsNull("retordernotesfl") ? string.Empty : row.Field <string>("retordernotesfl");
            entity.retorderrowid   = row.Field <byte[]>("retorderrowid").ToStringEncoded();
            entity.icspnotesfl     = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl");
            entity.icsprowid       = row.Field <byte[]>("icsprowid").ToStringEncoded();
            entity.iceaarowid      = row.Field <byte[]>("iceaarowid").ToStringEncoded();
            entity.coreprod        = row.IsNull("coreprod") ? string.Empty : row.Field <string>("coreprod");
            entity.coredesc        = row.IsNull("coredesc") ? string.Empty : row.Field <string>("coredesc");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }