示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCoresretorddetresults(ref DataRow row, Coresretorddetresults entity)
 {
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("qty", entity.qty);
 }
示例#2
0
        public static Coresretorddetresults BuildCoresretorddetresultsFromRow(DataRow row)
        {
            Coresretorddetresults entity = new Coresretorddetresults();

            entity.retorderno  = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordersuf = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.retlineno   = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.commentfl   = row.IsNull("commentfl") ? string.Empty : row.Field <string>("commentfl");
            entity.qty         = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            return(entity);
        }