Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastfsearchresults(ref DataRow row, Sastfsearchresults entity)
 {
     row.SetField("billlevelcd", entity.billlevelcd);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("name", entity.name);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("carrierid", entity.carrierid);
     row.SetField("billaccount", entity.billaccount);
     row.SetField("sastfrowid", entity.sastfrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Sastfsearchresults BuildSastfsearchresultsFromRow(DataRow row)
        {
            Sastfsearchresults entity = new Sastfsearchresults();

            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.name          = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.srcrowpointer = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.carrierid     = row.IsNull("carrierid") ? string.Empty : row.Field <string>("carrierid");
            entity.billaccount   = row.IsNull("billaccount") ? string.Empty : row.Field <string>("billaccount");
            entity.sastfrowid    = row.Field <byte[]>("sastfrowid").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }