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

            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.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.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl     = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qty             = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.subfl           = row.Field <bool>("subfl");
            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 UpdateRowFromIcicallocationlist(ref DataRow row, Icicallocationlist 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("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retordernotesfl", entity.retordernotesfl);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("qty", entity.qty);
     row.SetField("subfl", entity.subfl);
     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);
 }