Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAokitproduction(ref DataRow row, Aokitproduction entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("kpbostage", entity.kpbostage);
     row.SetField("kpprevvertol", entity.kpprevvertol);
     row.SetField("kpprevvertolty", entity.kpprevvertolty);
     row.SetField("kpprtfmt", entity.kpprtfmt);
     row.SetField("sasc-rowid", entity.sascRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Aokitproduction BuildAokitproductionFromRow(DataRow row)
        {
            Aokitproduction entity = new Aokitproduction();

            entity.cono           = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.kpbostage      = row.IsNull("kpbostage") ? 0 : row.Field <int>("kpbostage");
            entity.kpprevvertol   = row.IsNull("kpprevvertol") ? decimal.Zero : row.Field <decimal>("kpprevvertol");
            entity.kpprevvertolty = row.IsNull("kpprevvertolty") ? string.Empty : row.Field <string>("kpprevvertolty");
            entity.kpprtfmt       = row.IsNull("kpprtfmt") ? 0 : row.Field <int>("kpprtfmt");
            entity.sascRowid      = row.Field <byte[]>("sasc-rowid").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }