Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKpewselected(ref DataRow row, Kpewselected entity)
 {
     row.SetField("singlerowfl", entity.singlerowfl);
     row.SetField("glwhse", entity.glwhse);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("kpetrowid", entity.kpetrowid.ToByteArray());
     row.SetField("wono", entity.wono);
     row.SetField("wosuf", entity.wosuf);
     row.SetField("unit", entity.unit);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Kpewselected BuildKpewselectedFromRow(DataRow row)
        {
            Kpewselected entity = new Kpewselected();

            entity.singlerowfl = row.IsNull("singlerowfl") ? string.Empty : row.Field <string>("singlerowfl");
            entity.glwhse      = row.IsNull("glwhse") ? string.Empty : row.Field <string>("glwhse");
            entity.jrnlno      = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.kpetrowid   = row.Field <byte[]>("kpetrowid").ToStringEncoded();
            entity.wono        = row.IsNull("wono") ? 0 : row.Field <int>("wono");
            entity.wosuf       = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.statuscd    = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }