Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsbcopycriteria(ref DataRow row, Glsbcopycriteria entity)
 {
     row.SetField("toyr", entity.toyr);
     row.SetField("toglno", entity.toglno);
     row.SetField("torevno", entity.torevno);
     row.SetField("rowid-glsb", entity.rowidGlsb.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Glsbcopycriteria BuildGlsbcopycriteriaFromRow(DataRow row)
        {
            Glsbcopycriteria entity = new Glsbcopycriteria();

            entity.toyr      = row.IsNull("toyr") ? 0 : row.Field <int>("toyr");
            entity.toglno    = row.IsNull("toglno") ? string.Empty : row.Field <string>("toglno");
            entity.torevno   = row.IsNull("torevno") ? 0 : row.Field <int>("torevno");
            entity.rowidGlsb = row.Field <byte[]>("rowid-glsb").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }