Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastcupdate(ref DataRow row, Sastcupdate entity)
 {
     row.SetField("currencyty", entity.currencyty);
     row.SetField("descrip", entity.descrip);
     row.SetField("shortdesc", entity.shortdesc);
     row.SetField("rowID", entity.rowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Sastcupdate BuildSastcupdateFromRow(DataRow row)
        {
            Sastcupdate entity = new Sastcupdate();

            entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.shortdesc  = row.IsNull("shortdesc") ? string.Empty : row.Field <string>("shortdesc");
            entity.rowID      = row.Field <byte[]>("rowID").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }