コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSmcommissioncopy(ref DataRow row, Smcommissioncopy entity)
 {
     row.SetField("fromcommtype", entity.fromcommtype);
     row.SetField("fromslsrep", entity.fromslsrep);
     row.SetField("tocommtype", entity.tocommtype);
     row.SetField("toslsrep", entity.toslsrep);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Smcommissioncopy BuildSmcommissioncopyFromRow(DataRow row)
        {
            Smcommissioncopy entity = new Smcommissioncopy();

            entity.fromcommtype = row.IsNull("fromcommtype") ? string.Empty : row.Field <string>("fromcommtype");
            entity.fromslsrep   = row.IsNull("fromslsrep") ? string.Empty : row.Field <string>("fromslsrep");
            entity.tocommtype   = row.IsNull("tocommtype") ? string.Empty : row.Field <string>("tocommtype");
            entity.toslsrep     = row.IsNull("toslsrep") ? string.Empty : row.Field <string>("toslsrep");
            entity.rowid        = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }