Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaesdefaults(ref DataRow row, Vaesdefaults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("dfltlbrprod", entity.dfltlbrprod);
     row.SetField("dfltlbrcharge", entity.dfltlbrcharge);
     row.SetField("vaesRowID", entity.vaesRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Vaesdefaults BuildVaesdefaultsFromRow(DataRow row)
        {
            Vaesdefaults entity = new Vaesdefaults();

            entity.vano          = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf         = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.dfltlbrprod   = row.IsNull("dfltlbrprod") ? string.Empty : row.Field <string>("dfltlbrprod");
            entity.dfltlbrcharge = row.IsNull("dfltlbrcharge") ? decimal.Zero : row.Field <decimal>("dfltlbrcharge");
            entity.vaesRowID     = row.Field <byte[]>("vaesRowID").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Build a class from a database row
        /// </summary>
        public static Vaes BuildVaesFromRow(DataRow row)
        {
            var entity = BuildVaesBaseFromRow <Vaes>(row);

            if (entity != null)
            {
                var childRowP_ttblvaesdefaults = row.GetChildRows("P_ttblvaesdefaults").FirstOrDefault();
                if (childRowP_ttblvaesdefaults != null)
                {
                    entity.vaesdefaults = (Vaesdefaults)SetKeyFields(entity, Vaesdefaults.BuildVaesdefaultsFromRow(childRowP_ttblvaesdefaults), "vano,vasuf,seqno", "vano,vasuf,seqno");
                }
            }
            return(entity);
        }