예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlaccountcopy(ref DataRow row, Glaccountcopy entity)
 {
     row.SetField("fromyr", entity.fromyr);
     row.SetField("toyr", entity.toyr);
     row.SetField("fromglno", entity.fromglno);
     row.SetField("toglno", entity.toglno);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Glaccountcopy BuildGlaccountcopyFromRow(DataRow row)
        {
            Glaccountcopy entity = new Glaccountcopy();

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