Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcicvendorlist(ref DataRow row, Icicvendorlist entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("origprod", entity.origprod);
     row.SetField("origprodnotesfl", entity.origprodnotesfl);
     row.SetField("coreprod", entity.coreprod);
     row.SetField("coreprodnotesfl", entity.coreprodnotesfl);
     row.SetField("qtyimply", entity.qtyimply);
     row.SetField("onhandqty", entity.onhandqty);
     row.SetField("qtywarr", entity.qtywarr);
     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);
 }
Ejemplo n.º 2
0
        public static Icicvendorlist BuildIcicvendorlistFromRow(DataRow row)
        {
            Icicvendorlist entity = new Icicvendorlist();

            entity.vendno          = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl     = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.origprod        = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod");
            entity.origprodnotesfl = row.IsNull("origprodnotesfl") ? string.Empty : row.Field <string>("origprodnotesfl");
            entity.coreprod        = row.IsNull("coreprod") ? string.Empty : row.Field <string>("coreprod");
            entity.coreprodnotesfl = row.IsNull("coreprodnotesfl") ? string.Empty : row.Field <string>("coreprodnotesfl");
            entity.qtyimply        = row.IsNull("qtyimply") ? decimal.Zero : row.Field <decimal>("qtyimply");
            entity.onhandqty       = row.IsNull("onhandqty") ? decimal.Zero : row.Field <decimal>("onhandqty");
            entity.qtywarr         = row.IsNull("qtywarr") ? decimal.Zero : row.Field <decimal>("qtywarr");
            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);
        }