Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoebtgetdataresults(ref DataRow row, Poebtgetdataresults entity)
 {
     row.SetField("shipmentid", entity.shipmentid);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("ponotes", entity.ponotes);
     row.SetField("vendname", entity.vendname);
     row.SetField("vendnotes", entity.vendnotes);
     row.SetField("receivefl", entity.receivefl);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("edishipmentid", entity.edishipmentid);
     row.SetField("edipackageid", entity.edipackageid);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Poebtgetdataresults BuildPoebtgetdataresultsFromRow(DataRow row)
        {
            Poebtgetdataresults entity = new Poebtgetdataresults();

            entity.shipmentid    = row.IsNull("shipmentid") ? string.Empty : row.Field <string>("shipmentid");
            entity.pono          = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf         = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.ponotes       = row.IsNull("ponotes") ? string.Empty : row.Field <string>("ponotes");
            entity.vendname      = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.vendnotes     = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes");
            entity.receivefl     = row.Field <bool>("receivefl");
            entity.receiptdt     = row.Field <DateTime?>("receiptdt");
            entity.edishipmentid = row.IsNull("edishipmentid") ? string.Empty : row.Field <string>("edishipmentid");
            entity.edipackageid  = row.IsNull("edipackageid") ? string.Empty : row.Field <string>("edipackageid");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }