Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCalccreditavailresults(ref DataRow row, Calccreditavailresults entity)
 {
     row.SetField("ordbal", entity.ordbal);
     row.SetField("credlim", entity.credlim);
     row.SetField("credrem", entity.credrem);
     row.SetField("holdpercd", entity.holdpercd);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Calccreditavailresults BuildCalccreditavailresultsFromRow(DataRow row)
        {
            Calccreditavailresults entity = new Calccreditavailresults();

            entity.ordbal    = row.IsNull("ordbal") ? decimal.Zero : row.Field <decimal>("ordbal");
            entity.credlim   = row.IsNull("credlim") ? decimal.Zero : row.Field <decimal>("credlim");
            entity.credrem   = row.IsNull("credrem") ? decimal.Zero : row.Field <decimal>("credrem");
            entity.holdpercd = row.IsNull("holdpercd") ? 0 : row.Field <int>("holdpercd");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }