Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastfsearchcriteria(ref DataRow row, Sastfsearchcriteria entity)
 {
     row.SetField("billlevelcd", entity.billlevelcd);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("carrierid", entity.carrierid);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Sastfsearchcriteria BuildSastfsearchcriteriaFromRow(DataRow row)
        {
            Sastfsearchcriteria entity = new Sastfsearchcriteria();

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