Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCalccreditavailcriteria(ref DataRow row, Calccreditavailcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("groupid", entity.groupid);
     row.SetField("totalty", entity.totalty);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Calccreditavailcriteria BuildCalccreditavailcriteriaFromRow(DataRow row)
        {
            Calccreditavailcriteria entity = new Calccreditavailcriteria();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.groupid   = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.totalty   = row.IsNull("totalty") ? string.Empty : row.Field <string>("totalty");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }