Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeieventresults(ref DataRow row, Saeieventresults entity)
 {
     row.SetField("eventname", entity.eventname);
     row.SetField("eventdt", entity.eventdt);
     row.SetField("eventtm", entity.eventtm);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("custname", entity.custname);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("vendname", entity.vendname);
     row.SetField("documentdata", entity.documentdata);
     row.SetField("numberofactions", entity.numberofactions);
     row.SetField("docorderno", entity.docorderno);
     row.SetField("docordersuf", entity.docordersuf);
     row.SetField("docjobid", entity.docjobid);
     row.SetField("doctype", entity.doctype);
     row.SetField("rowid-event", entity.rowidEvent.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Saeieventresults BuildSaeieventresultsFromRow(DataRow row)
        {
            Saeieventresults entity = new Saeieventresults();

            entity.eventname       = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname");
            entity.eventdt         = row.Field <DateTime?>("eventdt");
            entity.eventtm         = row.IsNull("eventtm") ? string.Empty : row.Field <string>("eventtm");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custname        = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno          = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno        = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.vendname        = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.documentdata    = row.IsNull("documentdata") ? string.Empty : row.Field <string>("documentdata");
            entity.numberofactions = row.IsNull("numberofactions") ? 0 : row.Field <int>("numberofactions");
            entity.docorderno      = row.IsNull("docorderno") ? 0 : row.Field <int>("docorderno");
            entity.docordersuf     = row.IsNull("docordersuf") ? 0 : row.Field <int>("docordersuf");
            entity.docjobid        = row.IsNull("docjobid") ? string.Empty : row.Field <string>("docjobid");
            entity.doctype         = row.IsNull("doctype") ? string.Empty : row.Field <string>("doctype");
            entity.rowidEvent      = row.Field <byte[]>("rowid-event").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }