示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamuinvvalchgresults(ref DataRow row, Icamuinvvalchgresults entity)
 {
     row.SetField("rectype", entity.rectype);
     row.SetField("whse", entity.whse);
     row.SetField("dettype", entity.dettype);
     row.SetField("whserank", entity.whserank);
     row.SetField("disptext", entity.disptext);
     row.SetField("asqamt", entity.asqamt);
     row.SetField("fivehiamt", entity.fivehiamt);
     row.SetField("thresholdamt", entity.thresholdamt);
     row.SetField("totalamt", entity.totalamt);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Icamuinvvalchgresults BuildIcamuinvvalchgresultsFromRow(DataRow row)
        {
            Icamuinvvalchgresults entity = new Icamuinvvalchgresults();

            entity.rectype      = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.dettype      = row.IsNull("dettype") ? string.Empty : row.Field <string>("dettype");
            entity.whserank     = row.IsNull("whserank") ? string.Empty : row.Field <string>("whserank");
            entity.disptext     = row.IsNull("disptext") ? string.Empty : row.Field <string>("disptext");
            entity.asqamt       = row.IsNull("asqamt") ? decimal.Zero : row.Field <decimal>("asqamt");
            entity.fivehiamt    = row.IsNull("fivehiamt") ? decimal.Zero : row.Field <decimal>("fivehiamt");
            entity.thresholdamt = row.IsNull("thresholdamt") ? decimal.Zero : row.Field <decimal>("thresholdamt");
            entity.totalamt     = row.IsNull("totalamt") ? decimal.Zero : row.Field <decimal>("totalamt");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }