예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArembsingle(ref DataRow row, Arembsingle entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("changefield", entity.changefield);
     row.SetField("changedate", entity.changedate);
     row.SetField("changetime", entity.changetime);
     row.SetField("changeoper", entity.changeoper);
     row.SetField("changetype", entity.changetype);
     row.SetField("changevalue", entity.changevalue);
     row.SetField("newvalue", entity.newvalue);
     row.SetField("oldvalue", entity.oldvalue);
     row.SetField("reason", entity.reason);
     row.SetField("appliedfl", entity.appliedfl);
     row.SetField("arscnotesfl", entity.arscnotesfl);
     row.SetField("arssnotesfl", entity.arssnotesfl);
     row.SetField("arscrowid", entity.arscrowid.ToByteArray());
     row.SetField("arssrowid", entity.arssrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Arembsingle BuildArembsingleFromRow(DataRow row)
        {
            Arembsingle entity = new Arembsingle();

            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.changefield = row.IsNull("changefield") ? string.Empty : row.Field <string>("changefield");
            entity.changedate  = row.Field <DateTime?>("changedate");
            entity.changetime  = row.IsNull("changetime") ? string.Empty : row.Field <string>("changetime");
            entity.changeoper  = row.IsNull("changeoper") ? string.Empty : row.Field <string>("changeoper");
            entity.changetype  = row.IsNull("changetype") ? string.Empty : row.Field <string>("changetype");
            entity.changevalue = row.IsNull("changevalue") ? string.Empty : row.Field <string>("changevalue");
            entity.newvalue    = row.IsNull("newvalue") ? string.Empty : row.Field <string>("newvalue");
            entity.oldvalue    = row.IsNull("oldvalue") ? string.Empty : row.Field <string>("oldvalue");
            entity.reason      = row.IsNull("reason") ? string.Empty : row.Field <string>("reason");
            entity.appliedfl   = row.Field <bool>("appliedfl");
            entity.arscnotesfl = row.IsNull("arscnotesfl") ? string.Empty : row.Field <string>("arscnotesfl");
            entity.arssnotesfl = row.IsNull("arssnotesfl") ? string.Empty : row.Field <string>("arssnotesfl");
            entity.arscrowid   = row.Field <byte[]>("arscrowid").ToStringEncoded();
            entity.arssrowid   = row.Field <byte[]>("arssrowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }